Files
omarchy/plans/omarchycn.md
T

56 lines
6.7 KiB
Markdown

# OmarchyCN task list
Progress source of truth for the `omarchycn` branches of `omarchy`, `omarchy-iso` and `omarchy-pkgs`. Work top to bottom, one item at a time. Each item closes only after a codex review (GPT 6.1 Sol, xhigh, in a herdr split) passes; at most 5 reviews per item.
## Decisions (confirmed with the owner, 2026-10-05)
- Region is machine state in `/etc/omarchy/region` (`china`); absent means Global.
- Arch and Omarchy repos follow the domain plan: every `*.omarchy.org` server gets a `*.omarchy.cn` twin listed first. `pkgs.omarchy.cn` is live; `stable-mirror`, `rc-mirror` and `mirror.omarchy.cn` do not resolve yet, so pacman falls through to `.org`.
- China means a Chinese UI: `LANG=zh_CN.UTF-8` and Chinese menu labels. Global means `en_US.UTF-8`. `omarchy update` never touches the locale.
- Input method: rime-ice-installer (omarchy-pkgs PR 265, not merged yet). The ISO bundles the package, the Rime Ice `full.zip` and the Wanxiang grammar model; the install finishes with Rime and US keyboard ready, Ctrl+Space toggles. The installer gets a local patch: `--asset-dir` and no sudo when its packages are present.
- China to Global: switch sources and language, keep CJK fonts and the input method, remove the Claude Code third-party provider entry and the env it wrote, hide the China software entry. Dim and Kimi stay for every region.
- Deferred provisioning and factory reset get the region's system setup but no offline input method (deferred).
## Shipping prerequisites
- The region screen, Rime bundling and local `rime-ice-installer` build exist only on the `omarchycn` branches: a China-ready ISO is built by running `./bin/omarchy-iso-make --local-source ../omarchy ../omarchy-pkgs` from `omarchy-iso/` until they are merged and published.
- omarchy-pkgs PR 265 (rime-ice-installer) must merge, with `omarchy-offline.patch` upstreamed to manateelazycat/rime-ice-installer, before non-local ISO builds can list it.
- omarchy-iso PR 210 (stop passing `offline` to archinstall 4.5's `sanity_check`) is cherry-picked on `omarchy-iso/omarchycn`; the edge snapshot already ships archinstall 4.5.
- `stable-mirror.omarchy.cn`, `rc-mirror.omarchy.cn` and `mirror.omarchy.cn` must resolve for Arch packages to come from China; until then pacman falls through to `.org`.
## Tasks
- [x] T0 Branches and this list
- [x] T1 China package sources (PRD 1): region state, `omarchy-region` reader, `default/region/china/pacman.sed`, applied by `omarchy-refresh-pacman` and `install/post-install/pacman.sh`; tests
- [x] T2 Region choice in the installer (PRD 2): `omarchy_prompt_region` in `setup-form.sh`, ISO configurator screen, orchestrator passes `OMARCHY_REGION`, `install/config/region.sh` records it
- [x] T3 Input method (PRD 3): rime-ice-installer patch and PKGBUILD in omarchy-pkgs, IME packages in `omarchy-other.packages`, install-time package add, user step runs the installer from bundled assets, ISO build bundles assets and the package
- [x] T4 CJK fontconfig fix (PRD 4): rebuild PR 9693 on the current base
- [x] T5 AI (PRD 5): Dim and Kimi Code for every region (rebuild PR 9694), Claude Code third-party provider setup shown only in China
- [x] T6 Developer mirrors (PRD 6): npm, PyPI/uv, Go, rustup, crates.io, RubyGems, Maven via system drop-ins under `default/region/china/`
- [x] T7 China software (PRD 7): Install menu entry shown only in China
- [x] T8 Region switching and Chinese UI (PRD 8): `omarchy-region china|global`, Setup > Region, locale, Chinese menu overlay chosen by `LANG`
- [x] T9 Logo (PRD 9): stock Omarchy logo everywhere
- [x] T10 Docs: `AGENTS.md`, manual
- [x] T11 Test ISO build (local source)
- [x] T12 QEMU install and verification: China and Global installs, region switch, `omarchy update` keeps region and language
- [x] T13 Acceptance checklist
## Acceptance checklist
Evidence comes from the T12 runs of `omarchy-iso/release/omarchy-2026.10.06-x86_64-local.iso` in QEMU (omarchy 4e323342, omarchy-iso 8d069b0, omarchy-pkgs a84ad64c).
| # | Requirement | Result | Evidence |
|---|---|---|---|
| 1 | China package sources: `pkgs.omarchy.cn` before `.org`, Arch `.cn` mirrors before `.org`, `omarchy update` keeps them | Pass | China install has a `.cn` twin above each `.org` server in `pacman.conf` and `mirrorlist`; `omarchy update -y` keeps them; `region-test.sh`, `region-switch-test.sh`. Arch `.cn` hosts do not resolve yet, so pacman falls through to `.org`. |
| 2 | Region choice on the installer's first screen | Pass | Configurator asks Global/China before the keyboard; summary shows the region; `test_region.py`, `setup-form-test.sh`; both QEMU installs answered it. |
| 3 | Chinese input ready at first login, Ctrl+Space toggles | Pass | China install: Rime Ice and the Wanxiang model from the ISO, no prompt; after reboot Ctrl+Space typed 中文, then Ctrl+Space typed `ok`. Global install has no Rime. |
| 4 | CJK font fix (PR 9693) | Pass | `50-omarchy.conf` rebuilt; `fontconfig-cjk-test.sh` covers fc-match and the string lang path apps use; China VM resolves SC, JP and Latin mono as expected. |
| 5 | Claude Code third-party API in settings; Kimi Code and Dim | Pass | Setup > Claude Code API (China only) wrote the DeepSeek env; `claude -p` reached api.deepseek.com (401 for a fake key). Both regions install the `dim` and `kimi` launchers; in China `dim` 0.5.16 and `kimi` 2.1.1 ran. |
| 6 | China mirrors for npm, Arch, Ruby, Go, Rust, Python, Java | Pass | China VM: npm, pip, uv, go, rustup, cargo, gem, bundler and maven each exit 0 and leave the artifact; eight log an npmmirror or Aliyun URL, cargo logs the `aliyun` registry and caches under `mirrors.aliyun.com-*`. |
| 7 | China software entry | Pass | Install > China Apps lists WeChat and the others only in China; `china-apps-test.sh`. |
| 8 | Region switch in settings | Pass | China to Global: `.org` only, `en_US`, drop-ins and Claude env removed, CJK fonts and Rime kept, China rows hidden, `omarchy update -y` stays Global and English (old bug fixed). Global to China: `.cn` twins, `zh_CN`, Rime set up, update keeps it. Global from the start installs no Rime. Dim and Kimi stay in every case. |
| 9 | Stock Omarchy logo only | Pass | No OmarchyCN asset in any of the three branches; screens show the stock logo. |
| - | Test ISO built and tested in QEMU | Pass | Local-source ISO; China guest checks 16/16, Global 9/9; in-guest `./test/all`: 4635 passing assertions, run exited 1 (`ascii-test` fails only without `LANG` over ssh; the guest has no `omarchy-pkgs` checkout). |
Open items outside this branch: the shipping prerequisites above; upstream acceptance-suite failures (surfaces kept mapped at 1x1, English OCR on a Chinese UI, notification OCR timeout); deferred provisioning and factory reset get no offline input method; the menu's "Go…" prompt and keybinding and notification texts stay English.