Repository navigation
refactor(Tokenizer): check sheet rows for action during render, not in an Effect - #9808
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
Contributor
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| PowerSearch | 194.3 kB (0) · 21.6 kB CSS (0) | — | — · — · — |
| Tokenizer · Storybook | 71.3 kB (0) · 17.1 kB CSS (0) | 2,113 (−2) | ✓ · ✓ · ✓ |
Package size: @astryxdesign/core 6.24 MB packed (−8 B); no new dependencies.
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
Contributor
There was a problem hiding this comment.
This is ready to approve. The bottom sheet's action warning moves from an Effect into render. Its text, its once-per-page count and the rendered rows stay the same. The new StrictMode test pins the single warning.
Optional follow-ups, not blocking:
- The headers of
utils/devWarning.tsandhooks/useDevWarning.tsstill steer components away from callingwarnOnceduring render. One line there saying that a key-deduplicatedwarnOnceis render-safe would keep that guidance in step with this pattern. BaseTypeaheadandSelectorstill use an Effect for the sameactionwarning.
[Automated review]
cixzhang
marked this pull request as ready for review
November 3, 2026 22:03
3 tasks done
Closed
2 tasks done
3 tasks done
cixzhang
added a commit
that referenced
this pull request
Nov 4, 2026
…ved experimental prop #9808 added the test with experimental.presentation; #9836 removed that prop. Each was green alone; together main typecheck fails (TS2769). Same change as #9847, folded in here so one pull request turns main green. Co-authored-by: Xinzi Zhou <[email protected]>
2 tasks done
cixzhang
added a commit
that referenced
this pull request
Nov 4, 2026
…tion, and the recorded module resolutions follow core (#9851) * test(cli): the recorded module resolutions follow useLightbox's doc and drop the deleted usePressPin #9752 gave useLightbox its own doc; #9756 deleted the internal Layer/usePressPin.ts. Each was green alone because PR checks skip this fixture test; main test-node fails on both lines. * test(Tokenizer): the sheet-row test passes presentation, not the removed experimental prop #9808 added the test with experimental.presentation; #9836 removed that prop. Each was green alone; together main typecheck fails (TS2769). Same change as #9847, folded in here so one pull request turns main green. Co-authored-by: Xinzi Zhou <[email protected]>
This branch was successfully deployed
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.
Maintainer impact
The Tokenizer bottom sheet used an Effect to decide whether to print a development warning. The decision reads only rendered data (the result rows), so the render can make it. An Effect that does work the render can do makes the component harder to read, and it hides which Effects really sync an external system (
architecture:react-component-runtimeINV1 and INV3).Intended invariant
Rendered output and the development warning stay the same. The warning still prints one time per page when a result row carries
action, which the sheet rows do not render (component:Tokenizer,spec:AST-058FR9).Change
packages/core/src/Tokenizer/TokenizerBottomSheet.tsx:617: theuseEffectthat calledwarnOncewhen a result hasactionis removed. The same check now runs during render.warnOncekeeps a module-level set of keys, so a second render, a StrictMode double render or a rerender prints nothing new.Evidence
Scope
No behavior change. The only difference is timing in development: the warning can print during render instead of after the commit. A
[chore]Changeset covers the shipped source file.Risk
Low. The check is a
some()over the result rows, so it costs little on each render. Production builds skipwarnOnce, as before.Testing
vitest run --project ui packages/core/src/Tokenizer: 5 files, 197 tests pass (includes the new StrictMode test).pnpm -F @astryxdesign/core typecheck: pass.pnpm review:pre: 0 findings, merge into main clean.pnpm check:changesetsand Changeset coverage: pass.TokenizerEndLane.a11y.chromium.spec.ts: not run locally. It needs a Storybook build, and the shared machine is overloaded. It covers the inline field, which this change does not touch; CI runs it.