[Chakra exit · Phase 1 · PR 4/14] frontend: SingleSelect and the error/not-found surfaces on Registry components, plus two guard tests - #2629
Open
SpicyPete wants to merge 1 commit into
Conversation
Contributor
✅ Clean — no registry drift, off-token colours, or ad-hoc classesApp:
Generated by lookout audit-changes. |
SpicyPete
requested review from
a team,
Mateoc,
graham-rp,
jvorcak and
yougotashovel
and removed request for
a team
September 2, 2026 22:15
SpicyPete
force-pushed
the
chakra-exit/03-display-primitives
branch
from
September 3, 2026 15:30
a3fe072 to
8e31d03
Compare
SpicyPete
force-pushed
the
chakra-exit/04-interactive-surfaces
branch
from
September 3, 2026 15:30
e664510 to
3de4dd2
Compare
SpicyPete
force-pushed
the
chakra-exit/03-display-primitives
branch
from
September 3, 2026 15:53
8e31d03 to
85b9ef3
Compare
SpicyPete
force-pushed
the
chakra-exit/04-interactive-surfaces
branch
from
September 3, 2026 15:53
3de4dd2 to
718f6b8
Compare
SpicyPete
force-pushed
the
chakra-exit/03-display-primitives
branch
from
September 3, 2026 23:08
85b9ef3 to
dd5ebb7
Compare
SpicyPete
force-pushed
the
chakra-exit/04-interactive-surfaces
branch
from
September 3, 2026 23:08
718f6b8 to
0e22b80
Compare
SpicyPete
force-pushed
the
chakra-exit/03-display-primitives
branch
from
September 4, 2026 14:06
dd5ebb7 to
fad9e0b
Compare
SpicyPete
force-pushed
the
chakra-exit/04-interactive-surfaces
branch
from
September 4, 2026 14:06
0e22b80 to
88ffd56
Compare
SpicyPete
force-pushed
the
chakra-exit/03-display-primitives
branch
from
September 4, 2026 14:55
fad9e0b to
fb58adc
Compare
SpicyPete
force-pushed
the
chakra-exit/04-interactive-surfaces
branch
2 times, most recently
from
September 4, 2026 15:17
37a4888 to
ecdd0a9
Compare
…omponents, plus two guard tests
Last Phase 1 PR of the Chakra exit. Every wrapper keeps its export.
- misc/select: SingleSelect<T> on the Registry Select; values round-trip
through a string key so enum/number callers keep their types, an unset
value selects nothing (no collision with an empty-string option), and an
`id` lands on the trigger for <label htmlFor>. The one `creatable`
caller (preview-settings) goes to the Registry Combobox with the old
cannot-clear behaviour kept. `data-testid` still wraps the control in a
div, which is the e2e page object's contract. login.tsx drops a no-op
chakraStyles prop and labels the SASL select through FormControl's id.
tests/mock-react-select.tsx and its two setup imports are gone; nothing
rendered react-select under test.
- Tab.Messages column-settings and preview-fields-modal: the two Chakra
modals that host SingleSelect provide a PortalContainer, so Base UI
popups render inside the modal's focus and scroll lock.
- misc/error-result: flex divs + text-heading-lg/text-body-lg, Registry
SimpleCodeBlock, the local ErrorBananaSlip.svg instead of Chakra Avatars.
- misc/error-display: Chakra Result -> Registry Empty + Button; Chakra
Section -> the app Section wrapper; List -> a plain ul.
- misc/error-modal: Chakra Modal -> Registry Dialog size="xl" (keeps the
old 3xl footprint); Base UI's onOpenChangeComplete(false) replaces
onCloseComplete for the queue.
- misc/error-boundary: Box/Flex/Icon -> divs; Registry Button size="lg"
with leading icons and isLoading.
- misc/not-found-page, not-found-content: divs + h1.text-heading-xl (keeps
the level-1 heading the test asserts); the test's Chakra mock is deleted.
- utils/modal-container: Box -> div.
- src/components/registry-guards/: app-owned tests for two registry
contracts the registry ships untested - an expanded DataTable row
survives a data swap (fails with autoResetExpanded: true), and Alert
paints exactly one icon by default, replaces it for `icon`, and paints
none for `icon={null}`. Not under components/ui/ because Biome ignores
that directory.
Importers of @redpanda-data/ui: 89 -> 81.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SpicyPete
force-pushed
the
chakra-exit/03-display-primitives
branch
from
September 4, 2026 15:56
ba59065 to
2a6dbb6
Compare
SpicyPete
force-pushed
the
chakra-exit/04-interactive-surfaces
branch
from
September 4, 2026 15:56
ecdd0a9 to
054ad0d
Compare
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.
Chakra exit · Phase 1 (wrappers) · PR 4 of 14
Part of the Chakra exit plan and live tracker. Phase 1 re-implements the shared wrappers behind their existing exports, so page code does not change. Last PR of the phase. Branch
chakra-exit/04-interactive-surfaces, stacked on #2628; each PR on the ladder shows only its own diff and re-targetsmasteras its base merges.The last Phase 1 PR.
SingleSelectkeeps its export and moves onto the Registry Select (and the Registry Combobox for its onecreatablecaller); the error, not-found and modal-container surfaces move onto Tailwind and Registry Dialog / Empty / Button. Two app-owned guard tests pin registry contracts the registry itself ships untested.misc/select.tsx— the hunk that carries judgementSingleSelect<T>keepsoptions/value/onChange/isDisabled/placeholder/creatable/data-testid, so its 9 call sites in 7 files do not change — exceptlogin.tsx, which passed achakraStylesobject that returnedprovidedunchanged;type:checkflagged it and it is gone.SASLMechanism,SCRAMAuth_Mechanism), numbers (schema versions) and string unions.toKey(value)maps each option toString(value)and back, soonChangestill receives the typed value. Avaluethat matches no option (create-connector'sundefinedcluster) renders the placeholder instead of an empty label.creatablegoes to the Registry Combobox, which is the searchable/creatable one; the plain Select has no text input. Onlypreview-settings.tsxuses it, with string values.clearable={false}keeps the old "no clear button" behaviour. BecauseonChangefires with the typed text on create,Tmust bestringthere — noted on the prop.data-testidstill wraps the control in adiv, as before. The e2e page object clicks that wrapper and then an option by exact text, which the Registry Select satisfies; the only live spec assertions on these three ids aretoBeVisible().tests/mock-react-select.tsxand its two setup-file imports are gone. Nothing rendered a react-select under test any more, so no test changes.Error and not-found surfaces (exports unchanged)
misc/error-resultHStack/Stack/Heading/Text, ChakraCodeBlock, ChakraAvatarsassetdivs,text-heading-lg/text-body-lg, RegistrySimpleCodeBlock, the localErrorBananaSlip.svgthe not-found page already usesmisc/error-displayResult+Button, ChakraSection,List/ListItem/ListIconEmpty(title, description, RetryButton), the appSectionwrapper, a plainulwith the existingWarningIconmisc/error-modalModalwithonCloseCompletedriving the modal queueDialog size="lg"; Base UI'sonOpenChangeComplete(false)is the same hook, so the queue'safterClosestill fires after the exit transition. The Dialog adds its close button; it routes throughonCloselike OK doesmisc/error-boundaryBox/Flex/Icon, ChakraButton size="large" isLoadingdivs, RegistryButton size="lg"withiconandisLoadingmisc/not-found-page,misc/not-found-contentCenter/Stack/Image/Heading as="h1"divs,img,h1.text-heading-xl— theh1keeps the test'sgetByRole('heading', { level: 1 })contract; the test's hand-written Chakra mock is deletedutils/modal-containerBoxdivGuard tests (new, app-owned, in
src/components/registry-guards/)data-table-expanded-rows.test.tsx): expands a row, replaces thedataarray, flushes TanStack's scheduled reset, and expects the sub-row to stay. Verified negative: withtableOptions={{ autoResetExpanded: true }}the same test fails.alert-default-icon.test.tsx): default icon, customiconreplacing it,icon={null}painting none. The Chakra pattern (an icon child) paints two, which is the case every<AlertIcon />swap in Phase 2 must avoid; 11 files still pass<AlertIcon />to Chakra'sAlertand are listed in the plan.Not in
src/components/ui/because Biome ignores that directory; these must stay linted.Effect
Files importing
@redpanda-data/ui: 89 → 81.misc/is down to the chrome leftovers PR 8 owns.Gates
bun run type:check·bun run lint(no dirty tree; remaining findings on touched files are pre-existing on master) · unit suite · integration suite (123 files / 1274 tests), includingnot-found-page.test.tsxand the two guards. To exercise by hand: the debug dialog's "Throw in render (ErrorBoundary)" button, and any failing backend call forErrorDisplay/showErrorModal.Review pass (2026-09-03)
SingleSelectis the first Registry popup rendered inside a ChakraModal(column settings, preview fields). Chakra's scroll lock swallows wheel events outside the modal and its focus lock pulls focus back, so both modals now provide aPortalContainerand the popups render inside them. Noted for the feat: new topic messages page behind enableNewTopicMessagesPage flag #2588 stream, which owns those files.SingleSelect: an unset value selects nothing instead of colliding with an empty-string option; the Combobox's clear signals (re-select, Escape, blur) are ignored so a preview-tag pattern can no longer be emptied by accident;idlands on the trigger and the login form's "SASL Mechanism" label points at it again; options are mapped once.size="xl"to keep its old width; the Alert guard drops the test that asserted the footgun itself, keeping the three contract tests.Plan (internal): https://claude.ai/code/artifact/1861e21c-624b-4270-98ad-9921b22c2498
🤖 Generated with Claude Code