OhGithubLost 4.0.0 · 正式版 / Stable
主题 · Theme — 可靠性重构版:自底向上逐层修复,并把多个自研模块替换为成熟库。 A reliability-focused rebuild: layer-by-layer fixes from the bottom up, replacing several home-grown modules with established packages.
变更 · Changed
- 权限 · Permissions
权限申请由纯 Dart 网关改为
permission_handler:Android / iOS / macOS 会真正调起系统权限弹窗。此前实现只做「写入探针 + 打开设置」,且用的是 iOS 专用的app-settings:URI(在 Android 上无效)。Android 11+ 的「所有文件访问」走manageExternalStorage;Android 13+ 运行时请求POST_NOTIFICATIONS。
Permission requests moved topermission_handler, so Android/iOS/macOS now show real system dialogs; the old implementation only probed by writing and then opened settings via an iOS-only URI that does nothing on Android. Android 11+ usesmanageExternalStoragefor all-files access, and Android 13+ requestsPOST_NOTIFICATIONSat runtime. - 下载 · Downloads
自研分块下载器换成
background_downloader(断点续传 / 队列 / 暂停 / 继续 / 取消),IxDownloadManager等对外契约保持不变、相关页面零改动;落盘位置随库能力调整为「应用文档目录 / ogl / download / <分类>」(该库只支持其 `BaseDirectory` 枚举,不接受任意绝对路径)。 The in-house chunked downloader was replaced by `background_downloader` (resume, queue, pause, resume, cancel) while keeping the public contracts unchanged, so no page needed edits. Download destinations follow the library’s `BaseDirectory` enum (app documents / ogl / download / category) rather than arbitrary absolute paths.分类> - 编辑器 · Editor
编辑区改为「高亮图层 + 透明输入层」叠加(复用既有词法器),撤销 / 重做改用 Flutter 内建
UndoHistoryController,替换自研防抖快照栈。
The editor now stacks a highlight layer over a transparent input layer using the existing lexer, and undo/redo moved to Flutter’s built-inUndoHistoryControllerinstead of a custom debounced snapshot stack. - 认证 · Auth
GhAuthService改为ChangeNotifier并引入GhAuthState(unknown / signedOut / signingIn / signedIn / expired / guest);HTTP 401 是唯一失效出口,外壳订阅状态,令牌失效后自动回到登录门;切号 / 登出会通知订阅方。
GhAuthServicebecame aChangeNotifierbacked byGhAuthState(unknown / signedOut / signingIn / signedIn / expired / guest). HTTP 401 is the single invalidation trigger; the shell subscribes and returns to the sign-in gate automatically, and account switches/logouts notify subscribers. - 通知 · Notifications
统一通知入口:内核诊断的 error 与引导层信任告警经 sink 转发至
OgLNoticeCenter,无BuildContext的底座 / 中枢也能把告警送达界面;通知中心新增历史记录列表。
Unified notification entry: kernel errors and boot-layer trust warnings funnel through a sink intoOgLNoticeCenter, so base/hub code without aBuildContextcan still reach the UI; the notification centre gained a history list. - 草稿 · Drafts
DraftStore改为ChangeNotifier并经GhApi.draftsChanged暴露,草稿箱与「我的」页订阅后实时刷新(此前是一次性查询)。
DraftStorebecame aChangeNotifierexposed throughGhApi.draftsChanged; the drafts box and profile page now refresh live instead of querying once. - 依赖 · Dependencies
新增
permission_handler ^13.0.2、background_downloader ^9.6.3、archive ^3.6.1;新增dependency_overrides: connectivity_plus: 6.1.4(其 7.x 的 macOS/iOS Swift 用到构建环境尚未提供的NWPath.isUltraConstrained,会把这两个目标构建打挂)。未引入highlight/flutter_highlight/flutter_code_editor:它们的 SDK 约束为 Dart < 3,与当前 Dart 3.13 不兼容。
Addedpermission_handler,background_downloaderandarchive, plus aconnectivity_plus: 6.1.4override because 7.x used an SDK symbol missing in the build environment and broke macOS/iOS builds.highlight/flutter_highlight/flutter_code_editorwere deliberately not adopted — they constrain Dart < 3 and conflict with Dart 3.13.
新增 · Added
- Actions 运行日志 · Actions run logs
带令牌下载日志 zip、经
archive解压,按 job 展示与搜索(ix_action_logs.dart+action_log_page.dart);新增产物(artifacts)列表与下载地址端点。
Logs are downloaded as a token-authenticated zip, unpacked witharchive, then shown and searched per job (ix_action_logs.dart+action_log_page.dart); artifact listing and download endpoints were added too. - 构建期脚本:
tool/inject_android_gradle.py(幂等提升宿主compileSdk)、tool/inject_windows_cmake.py(为permission_handler_windows注入 MSVC 兼容宏)。
Build-time scripts:inject_android_gradle.pyraises the hostcompileSdkidempotently, andinject_windows_cmake.pyinjects an MSVC compatibility macro forpermission_handler_windows. - 列表入场动效统一走
OgLReveal与动效档位(本次覆盖搜索等页面)。
List entrance animations now consistently useOgLRevealand the motion level (this round covered search and others).
修复 · Fixed
- Windows 上的构建期 Python 脚本改为 ASCII 输出并设置
PYTHONIOENCODING=utf-8:此前在 Windows 默认码页下打印非 ASCII 会抛UnicodeEncodeError,直接打挂该构建目标。
Build-time Python scripts now print ASCII and setPYTHONIOENCODING=utf-8; previously, printing non-ASCII under the Windows default code page raisedUnicodeEncodeErrorand failed that build target. - Android 发布护栏新增
POST_NOTIFICATIONS断言;关于页依赖许可清单补齐新增依赖。
The Android release guard now assertsPOST_NOTIFICATIONS, and the about page’s licence list includes the new dependencies.
已知限制 · Known limitations
- 本版本为预发布(pre-release):随后进入 4.1 → 4.2 → 4.3 正式线。
This is a pre-release; the stable line continues with 4.1 → 4.2 → 4.3. background_downloader 9.6.3的flutter.plugin.platforms只声明 android / ios:桌面端不注册该插件,桌面端下载不可用。
background_downloader9.6.3 only declares android/ios, so the plugin is not registered on desktop and desktop downloads are unavailable.- 编辑器高亮为图层叠加实现,长文件的滚动同步与自动换行场景尚未逐一验证。
Editor highlighting is layer-based; scroll sync and soft-wrap behaviour for very long files were not exhaustively verified. - 动效为逐页补齐,尚未覆盖全部页面。
Motion was added page by page and does not yet cover every screen.
产物 · Artifacts
Android(arm64-v8a / armeabi-v7a / x86_64 / universal APK / AAB)、Windows、Linux、macOS、iOS —— 13 个构建目标、共 19 个文件。
Android (arm64-v8a / armeabi-v7a / x86_64 / universal APK / AAB), Windows, Linux, macOS, iOS — 13 build targets, 19 files in total.
下载 / Download
本版本共 19 个构件产物。
Android
| 文件 | 大小 |
|---|---|
| Android.AAB.zip | 56 MB |
| Android.arm64-v8a.zip | 9.5 MB |
| Android.armeabi-v7a.zip | 9.1 MB |
| Android.universal-APK.zip | 26 MB |
| Android.x86_64.zip | 9.6 MB |
Windows
| 文件 | 大小 |
|---|---|
| Windows.arm64-best-effort.zip | 12 MB |
| Windows.x64.zip | 13 MB |
Linux
| 文件 | 大小 |
|---|---|
| Linux.arm64-best-effort.zip | 10 MB |
| Linux.x64.zip | 11 MB |
macOS
| 文件 | 大小 |
|---|---|
| macOS.arm64.zip | 60 MB |
| macOS.x64.zip | 60 MB |
iOS
| 文件 | 大小 |
|---|---|
| iOS.device-arm64.zip | 8.7 MB |
| iOS.simulator.zip | 57 MB |
完整列表与校验信息见 Releases v4.0.0。