Skip to content

Names and ids in the chip title, the held-key frame announcement and the commit error are isolated - #647

Merged
MerciHanrim merged 2 commits into
mainfrom
i2-isolate-frame-chip
Nov 22, 2026
Merged

MerciHanrim merged 2 commits into
mainfrom
i2-isolate-frame-chip

Conversation

@MerciHanrim

@MerciHanrim MerciHanrim commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Part of #646 (review item I2, held there) and of #621 (its first item, the checker gap).

What was confirmed, and how

Reproduced on main 8876e879 in the Arabic interface, desktop 1280 × 800 (<html lang="ar" dir="ltr">; the layout direction is the constant ltr).

Frame announcements: confirmed in the DOM text. With an arrow key held on a selected frame, the live region's text written 300 ms after the last press (announceLater, FrameLayer.tsx:349 and :366) carried the frame name with no isolate: نُقل Intake (A-1) إلى x 0، y 48. The text written at the keyup (:405, :410) had it: نُقل <FSI>Intake (A-1)<PDI> إلى …. The same for resize and for a mixed Arabic and Latin name. The live region is sr-only (1 × 1, clipped), so nothing of it is visible. What a screen reader speaks was not checked, here or in this PR's tests.

Revision chip title: confirmed in the title string; the layout is a drawn comparison. The title was المشروع 7v4as8 · revision rev_6S4M…, with no isolate (the visible label was already isolated). The chip's computed direction is ltr.

  • Laid out in a test-only box with that direction and unicode-bidi: isolate, a project id that starts with a digit came apart: the 7 landed left of the Arabic word, 57 px from the v after it.
  • With the ids and the role in LRI…PDI (the candidate), the id stayed whole in ltr and rtl, for a digit-first and a letter-first id.
  • The browser's own tooltip was not captured. Under the app's unicode-bidi: plaintext rule for chrome prose the Arabic word decides the direction and the raw id does not come apart, so how the native tooltip lays the string out is not settled by this; the drawn box is the reproduction's condition, and the test pins that.

The checker gap: confirmed in the scripts. check-icu-arguments.mjs read only an object literal written at the call, and check-isolate-arguments.mjs the same; an argument object passed in a variable gave no rows and no arguments. Today's sites of that shape:

Site Object Before After
RevisionChip.tsx (two calls) titleParams raw ids written at each call, isolateLtr
FrameLayer.tsx announceLater params (a parameter) raw name on the held path the callers pass the finished sentence, isolateAuto
DataImportWizard.tsx issue text detail value isolated by an assignment unchanged; now read by the checker
DataImportRefreshWizard.tsx issue text detail the same unchanged; now read by the checker
DataImportWizard.tsx commit error commitError.detail as … raw table and frame names written at the call, isolateAuto

The fifth row was not in the review's count of five calls: it passes a property access, not a bare variable. The stricter checker found it. {table} (frame-placement-failed) and {frame} (frame-insufficient-space) quote the user's own names, so it is fixed here rather than declared. Not reproduced in a browser (a commit failure is hard to provoke); the change is the same isolate as the other two.

The change

  • FrameLayer.tsx: announceLater takes the finished sentence; its two callers write t('canvas.frame.a11y.moved' | 'resized', { label: isolateAuto(g.name), … }) like the keyup path.
  • RevisionChip.tsx: the title's project, role and revision are written in each t() call, each isolateLtr.
  • DataImportWizard.tsx: the commit error passes { table, frame }, each isolateAuto.
  • check-icu-arguments.mjs: an argument object in a variable is read when it is a const of the same function initialized with an object literal, with every <name>.<prop> = … that runs before the call (in that function, ahead of the call). An assignment after the call or in a nested function makes the variable unreadable. Anything unreadable, a ...spread inside the object included, must be declared under opaque in icu-argument-disposition.json with the reason it is safe; an unread object with no entry, an entry with no reason and a stale entry all fail.
  • check-isolate-arguments.mjs: reads the same const objects under the same rule; in a declared file it fails on an object it cannot read unless a producer obligation claims the call, and a producer assignment counts only where it runs before the call it feeds.
  • The two import wizards' ...(issue.detail ?? {}) are the only opaque entries. Their reason: the messages read only {value} and four numbers, and {value} is the isolated cell set right after the spread, which the checker now reads (obligations wizard-issue-value, refresh-issue-value).
  • Manifests:
    • isolate obligations 88 → 90, call sites 175 → 180, rows 143 → 148 (review-i2: 5);
    • ICU arguments 561 → 577 (6 chip, 6 frame, 2 commit error, 2 traced value), opaque 2.
  • docs/localization.md §L9.4 says how a variable argument is read.

Tests

Failing first on main's code:

  • e2e/rtl-bidi-isolation.spec.ts, "review I2 — the frame name is FSI-isolated WHILE the arrow key is held, and after it is released": failed on main's code (move, key held: no FSI), passes now. It reads the live region's DOM text on both paths; the existing frame test presses (down and up) and reads only the keyup path.
  • e2e/rtl-bidi-isolation.spec.ts, "review I2 — the chip TITLE isolates …": failed on main's code (glyph 1 of 7v4as8 touches glyph 0: 57 px apart), passes now. It lays the chip's real title out in a box with the chip's direction and unicode-bidi: isolate (the reproduction's condition), checks that the id's glyphs are in order and touching, then the exact title with its LRI…PDI pairs, clean and dirty.
  • scripts/check-argument-variables.test.mjs, 13 cases. Each puts back main's shape in a stand-in copy of one file (LOOP_CHECK_SOURCE_OVERRIDES) or removes a declaration:
    • main's chip and frame and commit-error shapes each fail;
    • a spread with no opaque entry, an entry with no reason and a stale entry each fail;
    • dropping the import wizard's isolating assignment fails;
    • the same assignment moved below t(key, detail) fails in both checkers (added after Lumi's review of 3f981181; both cases passed on that head's checkers, exit 0);
    • the real tree passes both checkers.
    • Main's own CI passed both checkers with main's shapes.

Local:

  • every check:* script: 0 failed;
  • tsc -b: clean;
  • lint: 88 warnings, the baseline;
  • unit: 5718 passed;
  • related e2e on chromium, one worker, no retries: 128 passed (rtl-bidi-isolation, frame-a11y, a11y-announcement-contract, a11y-direction-invisible, revision, data-import-refresh-errors, data-import-wizard-state, data-import-wizard). None of them compares a snapshot image.

Not checked: screen-reader speech, the native tooltip's own layout.

…the commit error are isolated

Review I2, part of #646 and #621. The revision chip's title, the frame announcement written while an arrow key is held, and the import wizard's commit error passed user or wire values raw through an argument object neither checker could read. Each call now writes its arguments at the call, isolated. Both argument checkers read a const object of the same function and fail on any object they cannot read unless it is declared with a reason (ICU check) or claimed by a producer obligation (isolate check).
@MerciHanrim MerciHanrim added the bug Something isn't working label Nov 22, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Deploying cozy-loop-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1eb4f33
Status: ✅  Deploy successful!
Preview URL: https://3fc8abdd.cozy-loop-studio.pages.dev
Branch Preview URL: https://i2-isolate-frame-chip.cozy-loop-studio.pages.dev

View logs

…e call

Review of #647: both checkers took a later assignment to the argument object as an argument, so an isolating assignment moved below t(key, detail) still read as isolated. An assignment counts now only in the call's own function and ahead of it; one after the call or in a nested function makes the object unreadable, and a producer assignment must precede its located call. Two planted cases, each passing on the previous checkers and failing now.
@MerciHanrim

Copy link
Copy Markdown
Owner Author

New head 1eb4f331, from Lumi's review of 3f981181: both checkers took any later detail.<prop> = … as an argument, so an isolating assignment moved below t(key, detail) still read as isolated.

  • Both checkers now count an assignment only when it runs before the call: in the call's own function, ahead of the call in the source. One after the call or inside a nested function makes the object unreadable (ICU check: UNTRACEABLE; isolate check: the call is not read).
  • A producer obligation's assignment (wizard-issue-value, refresh-issue-value) must also precede the call it feeds; the message names the call and counts the ones that cannot run before it.
  • Two planted cases move the import wizard's detail.value = isolateAuto(…) below the call. Run against 3f981181's checkers, both passed (exit 0); now both fail. The product code is unchanged: the real assignments are before their calls, and both checkers pass on the tree.

Local on the new head:

  • every check:* script: 0 failed;
  • tsc -b: clean;
  • lint: 88 warnings, the baseline;
  • unit: 5718 passed, the 13 checker cases included.

The related e2e were not rerun: no product or e2e file changed.

@MerciHanrim

Copy link
Copy Markdown
Owner Author

CI record for head 1eb4f331, before the merge (Lumi approved this head):

  • Run 45021177445, attempt 1: all 12 jobs passed and the e2e gate passed; all 13 checks are green. No job was rerun.
  • Two tests passed on their retry, both in e2e (shard 2/8):
  • Neither spec runs a path this PR changed (the frame announcements, the revision chip's title, the import wizard's commit error, the two argument checkers). No other test was retried.
  • The previous head 3f981181's run (45020633523) was cancelled by the push of this head: checks, production bundle and PWA had passed, every shard was cancelled.

@MerciHanrim
MerciHanrim merged commit f0415d1 into main Nov 22, 2026
13 checks passed
@MerciHanrim
MerciHanrim deleted the i2-isolate-frame-chip branch November 22, 2026 13:03
@MerciHanrim MerciHanrim mentioned this pull request Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant