Repository navigation
Names and ids in the chip title, the held-key frame announcement and the commit error are isolated - #647
Merged
Conversation
…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).
Deploying cozy-loop-studio with
|
| 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 |
…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.
Owner
Author
|
New head
Local on the new head:
The related e2e were not rerun: no product or e2e file changed. |
Owner
Author
|
CI record for head
|
This was referenced Nov 22, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
8876e879in the Arabic interface, desktop 1280 × 800 (<html lang="ar" dir="ltr">; the layout direction is the constantltr).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:349and: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 issr-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
titlewasالمشروع 7v4as8 · revision rev_6S4M…, with no isolate (the visible label was already isolated). The chip's computed direction isltr.unicode-bidi: isolate, a project id that starts with a digit came apart: the7landed left of the Arabic word, 57 px from thevafter it.ltrandrtl, for a digit-first and a letter-first id.unicode-bidi: plaintextrule 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.mjsread only an object literal written at the call, andcheck-isolate-arguments.mjsthe same; an argument object passed in a variable gave no rows and no arguments. Today's sites of that shape:RevisionChip.tsx(two calls)titleParamsisolateLtrFrameLayer.tsxannounceLaterparams(a parameter)isolateAutoDataImportWizard.tsxissue textdetailvalueisolated by an assignmentDataImportRefreshWizard.tsxissue textdetailDataImportWizard.tsxcommit errorcommitError.detail as …isolateAutoThe 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:announceLatertakes the finished sentence; its two callers writet('canvas.frame.a11y.moved' | 'resized', { label: isolateAuto(g.name), … })like the keyup path.RevisionChip.tsx: the title'sproject,roleandrevisionare written in eacht()call, eachisolateLtr.DataImportWizard.tsx: the commit error passes{ table, frame }, eachisolateAuto.check-icu-arguments.mjs: an argument object in a variable is read when it is aconstof 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...spreadinside the object included, must be declared underopaqueinicu-argument-disposition.jsonwith 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 sameconstobjects 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....(issue.detail ?? {})are the onlyopaqueentries. 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 (obligationswizard-issue-value,refresh-issue-value).review-i2: 5);value),opaque2.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 realtitleout in a box with the chip's direction andunicode-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:opaqueentry, an entry with no reason and a stale entry each fail;t(key, detail)fails in both checkers (added after Lumi's review of3f981181; both cases passed on that head's checkers, exit 0);Local:
check:*script: 0 failed;tsc -b: clean;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.