Skip to content

Web UI: the other 21 pages have no locale path at all — shell markers, then one page family per pull request #3479

Backlog

Description

@Birfy

Summary

/chat and /settings are the only pages the server renders into English. The other
21 pages have no locale path at all, so every one of them still ships Chinese under
<html lang="zh-CN"> no matter what language the reader asks for: 1987 CJK lines across
23 pages, of which settings is down to 7 (language names) and chat is 0.

That residue is of two kinds, and the second kind cannot be fixed page by page without
duplicating the shell 21 times:

  • Shared shell — 32 distinct strings, 586 occurrences, each appearing on 10 or more
    pages: the skip link (跳到主要内容), the app rail aria-label (应用导航), and the
    nav items' title / aria-label. The catalog already carries the keys for these
    (shell.skip, shell.nav and the rest of the 44 shell.* entries); the markup on
    these pages has no data-ui-* marker. settings/index.html:18 already shows the shape
    (data-ui-text="shell.skip").
  • Page content — about 1475 occurrences (1320 distinct strings after dedup), each
    page's own body: artifacts 369, memory 210, automations 158, discover 153,
    meetings 151, agents 107, profile 102, help 101, team 74, team-runs 72,
    members 71, home 67, onboarding 61, skills 50, privacy 49, terms 42,
    contacts 37, download 37, guide 36, about 19, register 14.

Exact revision

  • main 1f2cf1b7, tree 809dc4a3 (2229 entries). Numbers above are re-derived on this
    tree by two independent measurements: CJK lines 1987 and CJK text nodes 2061 /
    1332 distinct, per page as listed.

Why the gate is the only place it can go

  • runtime/flybot-workspace-web/src/pages.js:234
    if ((shell || getSystemLanguage) && indexPage && ['chat', 'settings'].includes(parts[0]))
    — the server-side locale render is open for exactly two pages.
  • The browser-side renderer flybot_workspace/static/shell/system-locale.mjs is imported
    only by static/settings/app.mjs, so the other pages have no client path either; their
    markers would be inert.
  • flybot_workspace/static/shell/system-locale.mjs:81
    return translated.replace('<html lang="zh-CN">', '<html lang="en">') rewrites the
    document language unconditionally. Adding a page to the gate therefore declares it
    English for real: a half-translated page must not be gated, or the response lies about
    its language (WCAG 3.1.1).

Plan

  1. Shell markers, once, inert. Mark the shared shell (skip link, app rail, nav items,
    the per-page shell chrome) on the 21 ungated pages. No change to the gate and no
    pages.js change, so the response bytes of all pages stay as they are today: the
    markers cannot translate anything until a page enters the gate. This avoids 21 copies
    of the same 20 markers and is a zero-behaviour-change slice.
  2. One page family per pull request. Each following slice adds that page to the gate,
    adds its body catalog, and regenerates docs/inventory/visible-controls.json with the
    in-tree generator (markers move line numbers). First page: artifacts (largest body,
    369 lines).

Acceptance for a page slice

  • The English render of that page has 0 CJK lines outside the language names its own
    <option> list must keep, measured on the response bytes, not on the markup.
  • The Chinese render of that page keeps its visible text and aria-label / title /
    placeholder / alt values unchanged.
  • <html lang> and content-language match the language actually rendered.
  • docs/inventory/visible-controls.json regenerates idempotently and its test passes.
  • Binding is to an exact head sha; a later commit voids the reading.

Related #3438 (that issue stays scoped to /chat and /settings).

Activity

  1. added
    agent-ready
    agent-working
    on Nov 30, 2026
  2. Birfy commented on Nov 30, 2026

    @Birfy
    CollaboratorAuthor

    Claimed for the shell slice. Branch: dev/3479-shell-locale-markers, cut from main 1f2cf1b7 (tree 809dc4a3).

    Slice 1 is limited to the inert part: data-ui-* markers for the shared shell (skip link, app rail, nav items and the per-page shell chrome) on the 21 pages that are not in the gate at runtime/flybot-workspace-web/src/pages.js:234. No pages.js change, no new page in the gate, so every page's response bytes stay as they are today.

    Acceptance for this slice is byte equality, not translation: for all 23 pages the Chinese response and its content-language header must be identical to 1f2cf1b7, because a marker on an ungated page cannot translate anything. Findings will be bound to the exact head sha of the branch; CI and local readings are reported separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyagent-working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions