Skip to content

docs(shell-skill): 补 navop.i18n / navop.theme 用法,并修复仓库守卫的三条既存红 - #13

Merged
feigeCode merged 2 commits into
mainfrom
feat/shell-host-i18n-theme-docs
Oct 12, 2026
Merged

feigeCode merged 2 commits into
mainfrom
feat/shell-host-i18n-theme-docs

Conversation

@feigeCode

@feigeCode feigeCode commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Description

Two commits, both aimed at getting this branch to a state where CI can go green.

  1. 8a9b55c — documentation for the two new shell host modules added by feat(shell): 宿主新增 navop.i18n / navop.theme 两条 host 模块 navop#384
    (navop.i18n, navop.theme).
  2. b2fb914 — fixes for the three guards that have kept main's Repository checks red since
    2026-10-09, plus one version drift of the same family.

Commit 1 — the docs (why they have to travel with the host PR)

The extension skill is the only place an extension author learns the module surface, and nothing
generates it from the host enum. On its own, the host PR leaves every extension author reading a
table that is missing two rows.

  • references/manifest.md — two rows in the shellViews[].modules table + the module
    implementation path list.
  • references/script-api.md — the import block, and §6 reworked into 6.1/6.2/6.3.
  • SKILL.md — one checklist line.

Two things the docs now state explicitly, because getting either wrong is a silent failure:

  • cx.theme() and navop.theme are not one naming scheme. cx.theme().colors keeps serving
    gpui-base's 18 semantic tokens; the component-library names the host actually paints with
    (list_active, table_hover, sidebar_*, chart_*) only exist under navop.theme. The
    component theme has no surface / destructive — it has popover / danger.
  • navop.i18n hands over the language, not a catalogue, and the language must be read inside
    render(). A language switch re-runs the existing instance's render(), not init(), so a
    catalogue chosen once in init() stays stale and reports no error.

Commit 2 — main's three pre-existing guard failures

main has been red on Repository checks for five consecutive pushes (last green: 2026-10-08,
run 37758388874). Those three failures block the same check this PR renders on, so they are fixed
here. No version bumps and no releases beyond the one drift repair called out below.

a. Windows x86 backfill matrix resolves every supported published extension (expected 18 / actual 19)

4e3825a added the gemini-acp extension but did not update the hard-coded list inside the guard.
node scripts/backfill-windows-x86.mjs matrix all returns 19 entries; the extra one is
gemini-acp, sorted after duckdb. Count 18 → 19, one line added to the list.

b. IPC driver manifests expose context menu actions for supported object workflows

iotdb and tdengine both do implement schema/dump_ddl (iotdb:
internal/drivers/iotdb/server.go:188; tdengine: extensions/ipc/tdengine/src/handlers.rs:542
dispatched from src/driver.rs:167) but neither declares a single DumpSql* action in its
driver.json. So this is a missing menu, not a false method declaration — removing
schema/dump_ddl would have been the wrong repair.

The other seven drivers that declare schema/dump_ddl (dm, duckdb, gbase8a, gbase8s, kingbase,
opengauss, oscar) all use the same shape: ImportExport.export_* labels,
Database/Schema/Table targets, ContextMenu. Both drivers now declare the three actions in
that shape. The label keys come from the host
(crates/db_view/locales/db_view.yml:1818/1822/1826), so no driver locale needed a new key.

c. repository manifest is maintained as a lightweight marketplace index

gemini-acp's entry in manifest.json (also hand-added by 4e3825a) carried two fields no other
entry has:

  • artifacts — R2 plugin-manifest data; the lightweight index explicitly forbids it (the guard
    asserts artifacts / asset_urls / fallback_asset_urls / sha256s are absent).
  • engines — not present in gemini-acp's own source manifest at all, and the 42 other entries omit
    it even where the source manifest declares it (dm, duckdb, the composite extensions). It was
    fabricated by the hand edit.

Both removed, restoring the uniform 8-field entry shape.

d. Version drift in the same family

fba18c4 release(acp-agent) bumped claude-acp / codex-acp to 0.1.1 in the index only. The
normal release pattern (4e435b5) updates the source manifest and the index together, and the
remote tags claude-acp-v0.1.1 / codex-acp-v0.1.1 both exist — so the release happened and the
source manifests were simply left behind. Both acp_agent.json files bumped to 0.1.1.

Observation, deliberately out of scope

oceanbase's driver.json labels its dump actions with ImportExport.dump_sql_structure /
dump_sql_data / dump_sql_structure_and_data. Those keys do not exist in the host locale
(only the export_* family does), so its three export menu entries cannot resolve a label. That is
a separate defect on a published extension, with a user-visible consequence, and it needs its own
decision — it is not fixed here.

Related

How to Test

node --test tests/scripts.test.mjs
# before this branch: 139 tests, 136 pass, 3 fail
# after:              139 tests, 139 pass, 0 fail

node scripts/changed-extensions.mjs <base-sha> <head-sha>
# -> 4 entries: iotdb, tdengine, claude-acp, codex-acp

Because the fix commit touches real extension directories, CI now runs more than Repository checks on this PR — the previous push had an empty matrix:
Test changed extensions for the four extensions, and Build Windows x86 for iotdb, claude-acp
and codex-acp (windows_x86: true). That path is known-good: run 37893458082 shows the acp test
and Windows-x86 packaging jobs passing, with only Repository checks failing.

Local runs of the two extension test suites whose files this PR edits:

CGO_ENABLED=0 go test ./internal/drivers/iotdb/...              # ok, 0.381s
cargo test --manifest-path extensions/ipc/tdengine/Cargo.toml   # 61 passed + 6 passed, 0 failed

iotdb's test only asserts that certain actions/forms are present, and tdengine's
declared_methods_cover_driver_json_set compares methods — which this PR does not touch — so
neither can regress from added actions. Verified anyway rather than assumed.

Note on the Go run: a plain go test fails to build on this machine with
unknown architecture ... arm64e ... tapi error: malformed file against the local
MacOSX27.0.sdk; that is a local SDK/linker mismatch, not code. CGO_ENABLED=0 builds and runs
the test, and CI runs it on ubuntu-latest regardless.

AI Assistance

AI-generated, human-reviewed. AI drafted the three markdown files and the four data-file repairs;
I reviewed each against the host implementation and against the existing repo conventions. No
generated Rust, Go, Java or JS was merged.

Specifics, since the fix commit reasons about facts that are easy to get wrong:

  • The direction of each repair was checked against evidence, not inferred: the iotdb/tdengine
    implementations were located before deciding to add menus rather than drop method declarations,
    and the acp version direction was confirmed by the presence of the remote release tags.
  • The label family to copy was chosen after enumerating all ten drivers that declare
    schema/dump_ddl — three shapes exist, and the dominant one (7 of 10) was used. The
    dump_sql_* family was rejected because the host locale does not define those keys.
  • The remaining out-of-scope defect (oceanbase) is reported rather than silently fixed.
  • Every number and file:line in this description was re-derived from the tree or from the CI log
    at the time of writing.

宿主侧已加这两条 host 模块(feat/shell-host-i18n-theme)。文档同步,重点是
**用法上的两个坑**,不是接口清单:

- `manifest.md` §7 模块表补 `i18n` / `theme` 两行,并说明它们不碰资源
  (不需要 `backends`,嵌入式工作台页面也可用);枚举源那一行补上
  `module_specifier()` 是「声明面拼写 ↔ 脚本 import 名字」的唯一来源。
- `script-api.md`:§6 拆成 6.1(`cx.theme()` 的 18 色闭集,原内容不动)/
  6.2(`navop.theme`,组件库那套一百多个名字)/ 6.3(`navop.i18n` + 扩展自带
  词条表);§1 可 import 模块清单加两条。
- `SKILL.md` 核对单加一条。

两个必须写明的点:

1. `navop.theme.color()` 取不到的名字返回 `null`,**不是**像 `cx.theme()` 那样
   整页 blank ⇒ 静态守卫救不了,必须自己兜底。
2. 切语言时宿主重建的是页面 **`render()`,不重跑 `init()`**
   (`ScriptView::refresh` → `rebuild` → 已有实例的 `render`)⇒ 在 `init` 里把
   词条表选好存起来,切语言后仍显示旧语言且不报任何错。

只改 markdown,未动任何 `ui/*.js` 与 manifest,`tests/scripts.test.mjs` 只看
`ui/*.js`,故本仓静态守卫不受影响。

AI 辅助:本改动由 AI 辅助完成,已人工复核。
`main` 自 2026-10-09 起 `Repository checks` 连红 5 次(最后绿是 10-08 的
run 37758388874)。这三条与本次文档改动无关,但挡在同一个 check 上,
一并修掉;本次只顾让守卫变绿,不动任何版本号、不发版。

1. `Windows x86 backfill matrix resolves every supported published extension`
   (expected 18 / actual 19)
   `4e3825a` 新增 gemini-acp 之后,守卫里那份硬编码名单没跟上。
   → 条数 18→19,名单在 duckdb 后插入 gemini-acp。

2. `IPC driver manifests expose context menu actions for supported object workflows`
   iotdb / tdengine 都**确实实现了** `schema/dump_ddl`
   (iotdb `internal/drivers/iotdb/server.go:188`;
   tdengine `extensions/ipc/tdengine/src/handlers.rs:542` + `driver.rs:167`),
   但 `driver.json` 里一个 `DumpSql*` 动作都没声明 —— 是**漏挂菜单**,不是该删声明。
   其余 7 个支持 dump_ddl 的驱动用的是 `ImportExport.export_*` 标签 +
   Database/Schema/Table 三 target + ContextMenu。
   → 两个 `driver.json` 各补 3 个动作,照抄该主流形态。
   标签键由宿主提供(`crates/db_view/locales/db_view.yml:1818/1822/1826`),
   驱动 locales 不需要加键。顺带记录:oceanbase 用的是另一套
   `ImportExport.dump_sql_*` 标签,而宿主 locale 里**没有**这些键(解析不到),
   属另一处潜伏问题,不在本次范围。

3. `repository manifest is maintained as a lightweight marketplace index`
   gemini-acp 的索引条目带了两处越界字段:
   - `artifacts`:R2 plugin manifest 的专有数据,轻量索引明令禁止
     (守卫直接断言这些键不存在);
   - `engines`:源清单 `acp_agent.json` 里根本没有这个字段(属手工添的伪造数据),
     而源清单真声明了 engines 的 dm / duckdb / composite 等,索引里也都不带
     (42/43 条都没有)。
   → 去掉这两个键,恢复索引统一的 8 字段形态。

另修一处同源漂移:`fba18c4 release(acp-agent)` 只把索引里的
claude-acp / codex-acp 提到 0.1.1,没同步源清单(正常发版 `4e435b5` 是
源清单与索引两边都改),而远端 tag `claude-acp-v0.1.1` / `codex-acp-v0.1.1`
都已存在 —— 发版发生过,只是源清单落在后面。
→ 两个 `acp_agent.json` 的 version 补到 0.1.1。

验证:`node --test tests/scripts.test.mjs`
修前 139 tests / 136 pass / 3 fail → 修后 139 / 139 / 0。
@feigeCode feigeCode changed the title docs(shell-skill): 补 navop.i18n / navop.theme 两个宿主模块的用法 docs(shell-skill): 补 navop.i18n / navop.theme 用法,并修复仓库守卫的三条既存红 Oct 12, 2026
@feigeCode
feigeCode merged commit 78a559d into main Oct 12, 2026
10 checks passed
@feigeCode
feigeCode deleted the feat/shell-host-i18n-theme-docs branch October 12, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant