feat(app): declare platform capabilities and font fallback - #178
Merged
Merged
Conversation
Capabilities list only what the app implements; Linux, macOS and iOS declare none and open an unsupported-platform screen. Android leaves CJK glyph choice to the text locale, which picks Traditional forms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
內容
M1 PR 4:平台層與能力宣告(ADR 0009 §決定 1–4、ADR 0024 §決定 2;
.trellis/tasks/archive/2026-09/09-29-platform-layer/prd.md)。PlatformCapabilities:只有 M1 用到的三個欄位,dataDirectory、singleInstance、fontFallback,不預留其他能力的欄位(ADR 0009「不寫空實作」)。播放後端在 PR 10 加。AppPlatform:唯一判斷平台的組裝點。Noto Sans TC對不到任何字型。繁簡字形改由文字的 locale 決定,ADR 0024 已補更正。實機
Android 模擬器:以臨時探測頁顯示「骨直這說」,探測頁未提交。
zh-Hant-TW、zh-Hant-HK、zh_TW都是繁中字形;zh-Hans-CN是簡中字形;ja_JP是日文字形。實作代理原本從原始碼推論「Android 一律拿到簡中字形」,實測推翻了這點,研究檔記下了兩者。
Windows dev:畫面與 PR 2 相同,顯示「FMP Dev / dev」與資料目錄。
Review 指南
lib/platform/platform.dart是唯一有平台判斷的地方,fmp_platform_checks守整個lib/platform/以外。AppPlatform.assemble(TargetPlatform.x, …)注入平台,不讀真實的Platform。驗證
app/:dart analyze --fatal-infos、flutter analyze乾淨;flutter test:46 過、1 跳過(live);