Skip to content

feat(ui): add custom branding and Chinese localization#165

Merged
Ark0N merged 2 commits into
Ark0N:masterfrom
shenlvkang-collab:feat/custom-name-i18n
Jul 23, 2026
Merged

feat(ui): add custom branding and Chinese localization#165
Ark0N merged 2 commits into
Ark0N:masterfrom
shenlvkang-collab:feat/custom-name-i18n

Conversation

@shenlvkang-collab

Copy link
Copy Markdown

Summary

  • add a server-synced custom display name under App Settings → Display
  • add a per-device English / Simplified Chinese interface language picker
  • localize static and dynamically inserted browser UI while preserving terminal, response, file, session-name, prompt, and path content
  • apply custom branding to browser/solo-window and notification titles without renaming CLI, API, storage, or package identifiers
  • validate and safely render Unicode display names

Validation

  • npm run test:ci — 180 files passed, 3651 tests passed (existing skips unchanged)
  • focused i18n/title/auth/render suite — 46 tests passed
  • frontend syntax and public-asset checks
  • TypeScript, ESLint, Prettier, lockfile validation
  • production build
  • desktop and 393px mobile browser QA, including live switching and reload persistence

Notes

English remains the canonical fallback. The display name syncs through server settings; language remains device-local, matching the existing display preference model.

codeman-local and others added 2 commits July 21, 2026 02:49
…olo renders

Resolves the CLAUDE.md paragraph conflict with Ark0N#162, skips the
windowTitle recompute for solo-session renders so a detached window
cannot reset the push-notification hostTitle prefix to the default,
and prettier-formats test/mobile/devices.ts (came in unformatted via
the Ark0N#162 merge; CI format:check only covers src/**).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Ark0N

Ark0N commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Thank you as always for the contribution! This is a thoughtfully engineered take on bolting i18n onto a plain-JS app: English-canonical keys with graceful fallback, the MutationObserver translating dynamic DOM while skipping terminal/response/file/user-content surfaces, language as a per-device display key (matching the skin pattern), and displayName strictly limited to user-facing copy with textContent/escaped-title rendering (the hostile-name test is appreciated). It also fits the project's existing direction with README.zh-CN.md and CJK input support.

Reviewed in detail and verified locally on the merged tree: the new i18n suite, typecheck, lint, frontend syntax, public assets, format, and the full test:ci sweep (3656 tests) all pass.

I updated the branch with a master merge (resolved the CLAUDE.md paragraph conflict with #162) plus two small additions in the same commit:

  1. renderIndexHtml no longer recomputes windowTitle on solo-session renders. Solo renders read no settings, so the recompute reset the shared push-notification hostTitle prefix back to the default name whenever a detached window rendered.
  2. Prettier-formatted test/mobile/devices.ts, which came in unformatted via the fix(mobile): preserve settings across foldable postures #162 merge (CI's format check only covers src/**, the pre-commit hook caught it).

Two non-blocking notes for future passes: the pre-paint language script in index.html picks the settings namespace by viewport width, which can briefly read the wrong blob on tablets and unfolded foldables until applyLocalization corrects it after load (the stable isHandheldDevice() classifier is not yet loaded at that point, so this is understandable); and the client caps displayName at 40 code points while the schema caps 40 UTF-16 units, so a name with more than 20 astral characters (e.g. many emoji) passes the client but fails the server validation.

Merging. Thanks again!

@Ark0N
Ark0N merged commit fad7cdc into Ark0N:master Jul 23, 2026
2 checks passed
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.

3 participants