Repository navigation
feat(1190): 审计三条 P0 + DS-01 字体 + 引导措辞(1.19.0 加做四项) - #529
Merged
Merged
Conversation
1.19.0 scope 裁定(#528)里的三项: - OVL-01/02:注入层(字幕叠层 / 字幕控制菜单)的颜色登记进 build/palette.config.js 的 overlay* 一组、运行时读注册表(extension 侧走 window.MT_PALETTE —— 该文件早有先例,src 侧走 lib/registry.js 的桥),并把 content/subtitle-adapter.js 与 content/sub-menu.bundle.js 加进 palette 门禁的 pinned 名单:原先这两个文件整片漏过门禁(#ffb3b3 / #d6d6d6 / #4caf50 就是 这么躲过 registry 的)。圆角并入三档(指示性 8px / 面板 16px / 控件胶囊), design/handoff.md §2 同步记档。 - POP-01:键盘焦点基线(:focus-visible)写进共享 token sheet —— 四个面共用一条, 扩展三页各自 link 它、App 壳由 build/app-bundle.js prepend。页面自己的 :focus 规则在后,仍覆盖它。 - 引导首屏主按钮下的「两步,约 30 秒」去掉时长承诺(12 语种)—— 点了「我只要 网页翻译」之后的 ext 屏要人离开 App 手工操作,承诺与事实不符(ONB-04 残留); 出口维持 #493。telemetry-design.md §3.9 记一笔。 npm test 2313 绿;node build.js 通过(含扩了 pinned 名单的 palette 门禁)。 (#528) (#524) Co-Authored-By: opencode <noreply@opencode.ai> Co-Authored-By: DeepSeek V4.1 Flash <noreply@deepseek.com> Co-Authored-By: GLM 5.3 <noreply@zhipuai.cn>
设计系统 handoff §2 一直承诺这两个家族、实现里零落地(审计 DS-01)。按裁定「引入」, 且照设计系统的家族分工引两个(Caprasimo = 展示字、Figtree = 正文),不是只引一个。 - extension/fonts/:两个家族都只带**拉丁子集**(Caprasimo 21KB + Figtree 可变字重 20KB —— Google 对可变字体各档返回同一份文件,所以只留一份);CJK 由后面的系统字 兜底,中英混排时中文落在系统字上(handoff §2 的「CJK 自动回落」);OFL 许可随包 - extension/styles/typography.css:@font-face + --font-heading / --font-body (变量名取设计稿里用的那两个);body 走 Figtree,h1/h2/h3 走 Caprasimo - 五个扩展页面(popup / options / review / docs / onboard)link 它,且**放在各自 CSS 之后**:三页的 body 字体栈与它同特异性,靠顺序取胜 - README ×2 的结构树补上 fonts/(readme-facts 门禁) npm test 2313 绿;node build.js 通过(包 3692 → 3739 KB)。 (#528) (#524) Co-Authored-By: opencode <noreply@opencode.ai> Co-Authored-By: DeepSeek V4.1 Flash <noreply@deepseek.com> Co-Authored-By: GLM 5.3 <noreply@zhipuai.cn>
belliedmonkey
added a commit
that referenced
this pull request
Sep 30, 2026
scope 裁定(#528)加做四项,发布说明三节各补四条:字体(Figtree 正文 + Caprasimo 标题,仅拉丁)、键盘焦点环、注入层圆角与勾选号颜色、引导去时长承诺。 CHANGELOG.md 由 node scripts/gen-changelog.js 重生成(30 个版本,本版紧邻 1.18.0 不跳号);站点那份 changelog.html 按发布清单**只在发版那刻提交**,已还原。 (#528) (#529) Co-Authored-By: opencode <noreply@opencode.ai> Co-Authored-By: DeepSeek V4.1 Flash <noreply@deepseek.com> Co-Authored-By: GLM 5.3 <noreply@zhipuai.cn>
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.
1.19.0 scope 裁定(#528)里的四项全部落在这个分支上。跟踪 issue:#528(关联审计 #524)。
1 · OVL-01 / OVL-02(P0):注入层收进 token 体系
审计原话:「页内注入层完全脱离 token 体系,palette 门禁管不到」。洞很具体:
pinned名单只覆盖页面 CSS,注入层的 JS 不在里面,于是#ffb3b3/#d6d6d6/#4caf50这类六位色整片漏过 registry。build/palette.config.js的overlay*一组;extension/content/subtitle-adapter.js走window.MT_PALETTE(该文件早有先例),src/content/sub-menu.jsx走lib/registry.js的palette()getter(该文件有一条src-boundaries门禁盯着「零 MT_ 全局」,只能走桥);content/subtitle-adapter.js与content/sub-menu.bundle.js加进pinned名单 ⇒ 门禁从此覆盖这一层;overlayTick(sage600 = handoff §1 的「已开启/勾选」角色);design/handoff.md§2 记档。如实说:
pinned只校验六位 hex,rgba()字面量(面板底 / hover / 分隔线)登记了但仍不受门禁约束(阴影等合法用法太多,扩面会淹在误报里)。写进了build.js与注册表的注释。2 · POP-01(P0):键盘焦点基线
:focus-visible基线写进共享 token sheet,四个面共用一条:扩展三页各自 link,App 壳由build/app-bundle.jsprepend。写在页面样式之前,各页自己的:focus规则仍覆盖它。3 · DS-01(P1,同日裁定「引入」):Caprasimo + Figtree
照设计系统
handoff.md §2的分工引两个家族(Caprasimo 展示字 / Figtree 正文),都只带拉丁子集、CJK 回落系统字。extension/fonts/:Caprasimo 21KB + Figtree 可变字体 20KB(Google 对各字重返回同一份文件,只留一份)+ 两份 OFL;extension/styles/typography.css:@font-face+--font-heading/--font-body(变量名取设计稿),body走 Figtree、h1/h2/h3走 Caprasimo;4 · 引导措辞:去掉时长承诺
「两步,约 30 秒」→「两步就好」一类(12 语种)。点了「我只要网页翻译」之后的 ext 屏要人离开 App 手工操作,承诺与事实不符(ONB-04 残留);出口维持 #493。
docs/telemetry-design.md§3.9 记一笔。验证
npm test→ 2313 passed, 0 failednode build.js→ 通过(含扩了pinned名单的 palette 门禁);包 3692 → 3739 KB(+字体)*.woff2魔数校验为wOF2;挂链顺序已核对