Skip to content

web: mark the shared shell of the 20 ungated pages for translation (#3479) - #3480

Merged
Birfy merged 1 commit into
mainfrom
dev/3479-shell-locale-markers
Dec 1, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/3479-shell-locale-markers

Conversation

@Birfy

@Birfy Birfy commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

What

Marks the shared shell chrome on the 20 pages that are still outside the locale gate, so that a later page-family slice can translate the rail, account menu and help menu by opening the gate instead of editing each page's markup.

Related #3479. Refs #3438.

Scope

  • 19 sidebar pages (agents, artifacts, automations, contacts, discover, download, guide, help, home, meetings, members, memory, onboarding, privacy, profile, skills, team-runs, team, terms) + about.
  • 364 data-ui-* markers: 19 per sidebar page, 3 on about (which has no app-rail, so it gets only shell.skip, settings.back, shell.settings). Skip link, rail aria-label, rail item title/aria-label/text, appearance toggle, account menu, help menu, sign out.
  • docs/inventory/visible-controls.json regenerated with scripts/visible_inventory.py: 230 records gain the new attributes in their data field, no line shifts.
  • The 21st ungated page, register, is out of scope: it does not use the shared shell (own chrome, no app-rail), so there is nothing on it to mark.

Deliberately not in this slice: no pages.js change, no page added to a locale allowlist, no import of shell/system-locale.mjs on these pages, and chat/settings untouched (already gated by #3438 / #3478).

Why markers and not the gate

Opening the gate now would serve these pages with lang="en" and content-language: en while 17–349 lines of Chinese body copy per page remain — a WCAG 3.1.1 mislabelling. Markers are inert until a page's own copy lands, so this slice cannot mislabel anything.

Byte equality

Adding attributes changes bytes, so "response byte-identical to 1f2cf1b7" cannot hold by construction. Equivalent check, for 23 pages × 2 languages (zh-CN, en), rendered through the shipped handler: the HTML is identical once every data-ui-* attribute and every marker-only <span> wrapper is removed, and status plus content-language are equal everywhere. Zero differences. Text, title/aria-label wording and lang are unchanged on both languages.

Effect, measured with the gate temporarily opened in a scratch copy (not part of this patch)

Shell-block CJK lines across the 20 pages: 362 → 1; CJK characters in shell text nodes: 2; CJK attribute values: 0. The single residual line is discover/index.html's own #login-panel link inside the rail — page slice scope, not shared chrome.

Tests (local, not CI)

  • node --test --test-concurrency=2 tests/*.test.mjs: 974/974 pass, exit 0.
  • tests.test_visible_inventory 2 OK, tests.test_settings_page 21 OK, tests.test_shell_page 5 OK, tests.test_skills_page 4 OK, tests.test_docs_pages 3 OK, tests.test_agents_page 12 OK.

Known delta

38 data-ui-title markers (2 per sidebar page) reference catalog keys whose Chinese phrasing differs from the page's current wording (shell.appearance.hint, shell.issue.hint). They are left untouched here to keep this slice byte-neutral; /settings aligned the same two strings in #3478, so the page slices should pick one wording on purpose.

Related #3479

…3479)

Add data-ui-* markers to the skip link, rail, account menu and help menu on the
19 sidebar pages and about, and regenerate docs/inventory/visible-controls.json
with scripts/visible_inventory.py (230 records gain attributes, no line shifts).

The markers are inert: pages.js still gates locale rendering to /chat and
/settings, so no page's text, wording or lang attribute changes.

Related #3479
@github-actions github-actions Bot added the risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff label Nov 30, 2026
@Birfy

Birfy commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator Author

Lead review — head 19c4c2dc425016bddd718220752c0a47969c8e12

Scope matches one reviewable slice: the shared shell chrome of the 20 pages that are still outside the locale gate, plus the regenerated control inventory. 21 files, +498/−498, no line-count drift. pages.js, shell/system-locale.mjs, shell/system-locale-catalog.mjs and both gated pages are untouched, so nothing here can translate or re-label a page.

Acceptance basis

Literal "server response byte-identical to 1f2cf1b7" cannot hold once attributes are added, so the accepted equivalent is: the response is byte-identical after removing every data-ui-* attribute and every marker-only <span> wrapper, status and content-language equal, and the en channel equals the zh channel of the same tree (proof that no marker is translated). QA Engineer bound this at this exact head independently: 40/40 page-language renderings identical after stripping, markers 294 → 658, content-language absent on all 21 pages in both trees and both languages, en == zh per page, en-channel CJK distribution unchanged at 1987 lines with 0 page drift.

Lead-side checks at this same head, recomputed from a clean codeload tree:

  • base tree 809dc4a3, head tree 02471a11; identical path set (2229), exactly the 21 expected blobs differ, 21/21 upload blobs equal TREE:<path>.
  • 364 new markers on 20 pages; 37 distinct marker values all resolve to keys in shell/system-locale-catalog.mjs (237 keys) — no dead markers.
  • docs/inventory/visible-controls.json: 1913 controls, 230 changed, all of them data-only (line, path, source moved 0), the other five top-level sections byte-identical.
  • tests.test_visible_inventory on the head tree: 2 tests OK (local, not CI).

Known delta, deliberately out of this slice: 38 data-ui-title markers whose catalog phrasing differs from the current page wording; the page-family slices pick one wording on purpose.

CI at this head (read from check runs, not from local runs)

18/18 checks success, including FlyBot required checks, upstream suite Node 22/24, Pin and vendor tree, Image recipe contract tests, Build and smoke under the manager contract, Management API 3.11/3.13, browser screenshots, provenance and social-host.

This is a review of the slice, not a claim of parity or of completed acceptance for the 21 pages: register keeps its own chrome and its 14 en-channel CJK lines, and every page still needs its body copy.

Related #3479

@Birfy
Birfy added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit c695df8 Dec 1, 2026
18 checks passed
@Birfy
Birfy deleted the dev/3479-shell-locale-markers branch December 1, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant