Skip to content

[Maintainer] i18n: room-name and count follow-ups - #1179

Merged
Aymericr merged 3 commits into
mainfrom
cursor/i18n-room-name-count-followups-8160
Oct 27, 2026
Merged

Aymericr merged 3 commits into
mainfrom
cursor/i18n-room-name-count-followups-8160

Conversation

@Aymericr

@Aymericr Aymericr commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Fixes the four P3 follow-ups from Tooling's review of #1174. Part of #621. Stored scene data is unchanged: in every UI language the scene stores exactly what main stores.

  • (a) Shared labels on Enter. Two catalog names can share a translation; in French, Living room and Lounge are both "Salon". roomNameOptions now takes the room's stored name. When the typed text matches a shared label, the room's own entry becomes the active row, so typing "Salon" on a Lounge and pressing Enter keeps Lounge. Any other room still falls back to the first suggestion. Tests:

    • roomNameOptions: the shared-label active row for a Lounge, a Lounge 2, a Living room, and another room.
    • room-name-storage: Enter on a shared label stores the same English in French as in English.
  • (b) Exact English wins on Enter. This is a behaviour change from main, and it is kept. Typing "Closet" (or "closet") and pressing Enter picks Closet. main picked Walk-in closet, the first name containing the text. A test covers it.

  • (c) Ungrouped counts. Lingui formats # with grouping (1,234), but main wrote these counts as 1234. The plural counts added in [Maintainer] i18n: migrate properties and inspector panels #1174 now use a plain {number} value inside the plural, the same pattern as the openings count. That covers:

    • hole points ("# pts"), walls and open sides, MEP runs (system check and the floating action menu), curtain-wall and glazing rows and columns, and "Lower/Raise all #".

    The existing drafts were rewritten with the same substitution, so no translation changed wording.

  • (d) Layer-tree rename. A new RoomRenameInput is used for room and zone rows. While you edit, it shows the name as displayRoomName does ("Chambre 1" for "Bedroom 1" in French). It commits through commitRoomNameEdit, via a new commitTreeRoomRename. That keeps the tree's own write path (updateNode, trimmed text, undefined when cleared), so "Salon 3" on a Lounge 2 stores "Lounge 3", free text is stored as typed, and an English UI writes exactly what main writes. A test checks renumbering, a padded name, free text and clearing in French against English.

  • Accessibility found by the new surface:

    • the inline rename input is named "Rename";
    • the wall, ceiling and roof attachment badge icons in the layer tree and item catalog now have translated alt text.
  • Audit. New layer-room-rename surface: it expands the Scene panel and opens the rename field on "Bedroom 1". openLayer now shares the expansion step (expandLayers).

  • Catalogs. 3 new messages, 11 changed. zh-CN, fr, es and ja drafts are fuzzy with Review: required, so they show English until reviewed.

How to test

  1. bun run i18n:check passes, with 2,526 entries per locale awaiting review.
  2. Run bun dev and open the two-bedroom project with ?lang=en-XA. In the Scene panel, click the pencil on "Bedroom 1": the field shows the bracketed, accented name plus "1". Change the number and press Enter. The stored name, as seen in English or through MCP get_zones, is "Bedroom 3".
  3. In a room's construction rows, "8 walls" stays ungrouped. The counts only differ from grouped output at 1,000 or more.
  4. bun run i18n:pseudo-audit -- layer-room-rename layers-panel room-panel floor-foundation-panel: all four pass. I ran this.
  5. Tests I ran:
    • packages/editor bun test src: 2,704 pass.
    • packages/nodes: 5,025 pass, 1 skip.
    • bun test scripts/: 131 pass.
    • Editor and nodes type checks are clean, and bun run check reports no new findings.

Still English after this PR

Unchanged from #1174: the remaining inspectors (cabinets, column, chimney, elevator, vents, dormer, skylight, solar panel, fences, MEP), which are the next PRs; external plugin copy; command messages; material names; unit suffixes.

Screenshots / screen recording

en-XA, captured by i18n:pseudo-audit (UTC, metric). The images are served from the image-only branch cursor/i18n-audit-screenshots-8160, which is never merged.

Layer-tree rename on "Bedroom 1" (the field edits the localized name):
Layer rename en-XA

Room panel (walls count):
Room panel en-XA

Floor & foundation:
Floor and foundation en-XA

Layers panel:
Layers panel en-XA

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch
Open in Web Open in Cursor 

Note

Medium Risk
Changes how room names are resolved on Enter and how layer-tree renames are committed, which can alter stored names in localized UIs; plural message shape is broad but display-only.

Reviewed by Cursor Bugbot for commit 64fe370. Bugbot is set up for automated code reviews on this repo. Configure here.

…me edits the shown name

- roomNameOptions takes the room's stored name: a label two catalog names share
  is the exact match for that room's own entry, so Enter on a Lounge keeps Lounge.
- The layer tree's room rename shows displayRoomName while editing and commits
  through commitRoomNameEdit (updateNode, trimmed, cleared as before).
- The rename input and the snap-target badge get accessible names.
- New pseudo-audit surface layer-room-rename.
@Aymericr Aymericr added the bot:maintainer label Oct 27, 2026 — with Cursor
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T15:00:25.773926Z 64fe370 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Member Author

Tooling cross-review at 64fe370: APPROVE

No P0/P1/P2. All four #1174 follow-ups verified locally at this SHA.

  • (a) Shared label: roomNameOptions(..., current) prefers the room's own entry only when the label is shared; value match still comes first. Reverting just that line to the old byLabel.length === 1 ? byLabel[0] : undefined fails both new tests (a shared label is exact only for the room’s own entry, Enter on a shared label keeps the room its own entry); restored, they pass.
  • (b) Exact English (case-insensitive) wins on Enter; test added; the behaviour change is called out in the body.
  • (c) pts / walls / open sides / runs / rows / columns / Lower-Raise all now use a plain {number} string inside the plural, so 1234 renders as 1234. Drafts in fr/es/ja/zh-CN use the same placeholders.
  • (d) Zone and room tree rows use RoomRenameInput: the field edits displayRoomName(stored) and commits via commitTreeRoomRename → commitRoomNameEdit (keeps the tree's updateNode / trim / undefined-on-clear). No path stores a translated catalog label: an unchanged shared label ("Salon" on Lounge) writes nothing, a renumber stores English, and free text is stored as typed, per the [Maintainer] i18n: migrate properties and inspector panels #1174 rule. No Security areas are touched.

Findings

  • P3: [Maintainer] i18n: migrate properties and inspector panels #1174 added other # plurals that still group at ≥1000: room-panel door/window counts, stair # risers, site # surveyed lines, floor shared with # room(s), roof The floor's # roofs. Main wrote these ungrouped too. Realistically only surveyed lines could reach 1000. Fine as a follow-up.
  • P3 (note): the snap-badge alt and rename aria-label messages are outside the P3 scope, but they are small, correct, and their drafts are fuzzy.

Checks run locally (Node 22): editor 2704 pass; core 6165 tests, 0 fail; nodes 5026 tests, 0 fail; mcp 1338 pass; scripts/i18n*.test.ts 56 pass; editor and nodes tsc clean; biome clean; i18n:check PASS (catalogs in sync, 2526 drafts for each locale); release-check --base origin/main shows no reviewed regression and no draft compiled in. Catalogs: reviewed stays at 85 for each locale, with 3 new entries, all fuzzy.

CI at this SHA: Changed paths, quality, cli-smoke and Cursor Bugbot all succeeded; mergeable_state is clean.

@Aymericr
Aymericr merged commit aee0c84 into main Oct 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants