Repository navigation
refactor(dashboard): Header with ProductSwitcher, CommandPalette on Dialog, Footer (KEA-7886, trilha G) - #17313
Merged
Merged
Conversation
…k product switcher (KEA-7886, trilha G)
…r/eyebrow (KEA-7886, trilha G)
…rilha G UI tests use (KEA-7886, trilha G)
… beside its own clear button (KEA-7886, trilha G)
…eld styles the input shell; language selector name follows label-in-name; no banner inside main (KEA-7886, trilha G)
…kit-G # Conflicts: # tests/e2e/sidebar-navigation.spec.ts # tests/unit/ui/rtl-logical-classes.test.tsx
…iption keys match the live items (KEA-7886, trilha G)
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.
Trilha G: Header, CommandPalette and Footer on the Keak CI UI Kit (KEA-7886)
Spec §3.7 (shell: header, product switcher, command palette, footer) and §3.9 (i18n); plan Tasks 28–29.
Merge after A, C, D, E and F. This branch contains E's and C's commits (base
feat/new-uikit-E, withorigin/feat/new-uikit-Cmerged for theforwardRefInputadapter the palette focuses).What changes
Headernow renders on the kit shell header (<header class="ci-sidebar-shell-header">, without an explicit banner role, because F mounts it inside the kit inset's<main>). Its fixed kit height grows by the safe-area inset (height: calc(4rem + var(--ci-border-default) + safeTop), withpaddingTop: safeTop), so the macOS Electron / iOS standalone offsets of §3.7 still apply without squeezing the 36 px controls. Kit imports use subpaths (@omniroute/ui-kit/sidebar,/keak-brand,/dialog,/separator,/dropdown-menu), never the barrel:SidebarTrigger, labelled by state: "Collapse sidebar" / "Expand sidebar" on desktop, "Open menu" / "Close" on mobile;<h1 class="ci-heading">;ProductSwitcherwithKEAK_PRODUCT_LINKS/KEAK_ACTIVE_PRODUCT, labelledheader.products;LanguageSelector,ThemeToggleand logout, all on theButtonadapter (ghost/outline) with<Icon>. No Material spans are left.onMenuClickandshowMenuButtonwere removed in fix round 2, together with F'sShellHeaderthat passed them.HeadercallsuseSidebar(), so it must render inside the kitSidebarProvider. F's kit shell provides that, and the legacy shell uses F's ownHeaderLegacycopy.ThemeToggle: aButtonwithvariant="ghost"("outline"for thecardvariant),size="icon",<Icon light_mode|dark_mode>, and a translatedaria-labelthat flips.LanguageSelector: the kitDropdownMenuwith oneDropdownMenuRadioItemper locale inside aDropdownMenuRadioGroup. Choosing a locale still callspersistLocale+router.refresh(), and choosing the current one does nothing. The hand-rolled outside-click panel is gone.CommandPalette: the kitDialog/DialogContentwithshowCloseButton={false}and an sr-onlyDialogTitle("Command palette"). Search uses theInputadapter (type="search",icon="search", ref-focused). Thelistbox/group/option[aria-selected]structure, search, grouping,handleNavigateand arrow/Enter keys are unchanged.onOpenChange, so it is no longer handled twice by the document listener.Footer: column titles useci-eyebrow, a kitSeparatorsits above the bottom row, and links usehover:text-heading. All links and the brand/social block are kept.link.label, which does not exist, so Features, Pricing, Documentation, API Reference, Terms and Privacy showed empty text. They now rendert(link.key).header.openMenu("Open menu" / "Abrir menu") andheader.products("Keak products" / "Produtos Keak") added toen.jsonandpt-BR.jsononly. The other 65 locales get them in the i18n wave (check-key-completeness --warnlists them as missing).Files
src/shared/components/{Header,ThemeToggle,LanguageSelector,CommandPalette,Footer}.tsxsrc/i18n/messages/{en,pt-BR}.jsontests/unit/ui/{header-kit,language-selector-kit,command-palette-kit,footer-kit}.test.tsxsrc/shared/components/layouts/DashboardShell.tsx,src/shared/components/Sidebar.tsx(the trigger is mobile-only), andconfig/quality/dashboard-typecheck-baseline.json(only theHeader.tsxentry is removed)tests/unit/ui/shell-single-trigger.test.tsxtests/unit/ui/rtl-logical-classes.test.tsx,tests/e2e/sidebar-navigation.spec.ts, and, in round 2,tests/unit/ui/sidebar-kit-render.test.tsxandtests/unit/sidebar-hierarchy-a11y-12869.test.tsx(shell-trigger stand-in in the harness)Tests realigned
tests/unit/ui/rtl-logical-classes.test.tsx: the "uses end-0 for the dropdown panel" check is now "anchors the kit DropdownMenuContent to the inline end (align="end")". The absoluteend-0panel no longer exists; floating-ui resolvesalign="end"against the document direction, so the menu still mirrors underdir=rtl. The "noright-0", "text-start" and "notext-left" checks are kept as they were. lint-staged also re-ran Prettier over the whole file on commit, which accounts for the rest of the diff (quote style only).tests/e2e/sidebar-navigation.spec.ts(shared with trilha F, one locator only): the mobile opener moves fromgetByRole("button", { name: "menu", exact: true })togetByRole("button", { name: "Open menu" }), because the trigger now carries the translated label (controller ruling).Conflicts with F (resolved in fix round 2)
F also edits
tests/e2e/sidebar-navigation.spec.tsandtests/unit/ui/rtl-logical-classes.test.tsx. Resolution (verified withgit merge-treeagainstorigin/feat/new-uikit-F1e8125f, and re-verified by the independent review against F's head 881b8cd: same two hunks):name: "menu"click withgetByRole("button", { name: "Open menu" });end-0check for thealign="end"check above.The e2e run below used exactly this resolved tree.
Fix round 2 (after F #17320 merged)
10a04838: back-merge oforigin/feat/new-uikit(now containing F). The two expected conflicts were resolved exactly as described above, and no other file conflicted.e5728a03: one sidebar trigger in the kit shell.SidebarTriggeris the only collapse/expand control. F's in-sidebar trigger now renders only inside the mobile Sheet, as its Close control; the modal Sheet hides the header while it is open.ShellHeader, and theonMenuClick/showMenuButtonprops it passed (which the Header ignored), are gone.HEADER_DESCRIPTIONSgets the same key-pair fix F applied toHeaderLegacy: the key type namesproxy, and the deadsettingskey is dropped. This lets theHeader.tsxentry (TS2353 ×2) leavedashboard-typecheck-baseline.json: the baseline only shrinks.mobileBreakpoint=1024stays. It is the legacylgdrawer breakpoint, and it matches the header title'slg:flex.tests/unit/ui/shell-single-trigger.test.tsx(real shell, Header and Sidebar): desktop has exactly one collapse/expand trigger, in the header, before and after collapsing; mobile has one "Open menu", and the open drawer has one "Close". It was RED with 2 desktop triggers.sidebar-kit-renderandsidebar-hierarchy-a11y-12869harnesses get a stand-in shell trigger;sidebar-navigation.spec.tstargetheader.ci-sidebar-shell-header.sidebar-navigation.spec.ts(desktop light/dark, and mobile 320/390 light/dark),navigation.spec.ts(4) andsmoke.spec.ts(4). This closes Task 29 Step 4, and the desktop sidebar overflow failures of the earlier run are gone._artifacts/G-header-light-1440.png(one trigger, in the header; brand fits) and_artifacts/G-palette-light-1440.png(borderless search row with a single ×), plus the dark and 390 px variants.Fix round 1 (review
batch-G-review.md)3f24b951: every trilha G file and the header test import kit subpaths instead of the barrel.d7d50b5a: the header height absorbs the safe-area inset; there is no explicitrole="banner"; the palette flattens.ci-input-shell(where the kit puts the border and focus ring) instead of the already borderless inner input; the language trigger's accessible name isLanguage: EN — English, which follows WCAG 2.5.3 label-in-name (the visibleENis in the name, plus the purpose) and overrides the brief'saria-label={currentLang.name}.typecheck:core0. Round 2 then re-captured the palette screenshots and ransmoke.spec.ts; see Fix round 2.Validation
Each check is listed with where it ran and its result. ".113" means the 32-core box via
gate113.sh. "Local" means this devbox, where load averages of 25–58 were coming from parallel tracks.npm run lintnpm run typecheck:corenpm run check:dashboard-typechecknpm run check:ui-icunpm run test:vitest:uimodelsCombosCatalogappears only in the first run's partial list.00233e15(E + C, before G) and on Gsidebar-pinned-items,sidebar-accordion-header-click,radar-admin-sidebar,rtk-context-page-load-failure,api-key-redis-auth-cache). The other 5 (manifestAdapter,proxySaveRefresh,api-key-routing-editor,burn-rate-chart,compressionPanel) only fail under full-suite load and pass alone.header-kit,language-selector-kit,command-palette-kit,footer-kit,rtl-logical-classes, adapters,theme-store-bridgenode --test:ui-kit-shell-flag,design-kit-bridge(accent-ink guard),sidebar-essentials-staticnpm run check:tracked-artifactsnpm run check:cycles(advisory)cycles=14, equal to the baseline; no SCC involves a trilha G filenode scripts/i18n/check-key-completeness.mjs --warnheader.openMenu/header.products(expected, handled by the i18n wave)check-ui-kit-snapshot, ai-attribution)npm run buildcolocate-standalone(only the tail was captured, so no warning count). The local build hit its 40-minute cap under load 58.sidebar-navigation.spec.ts+navigation.spec.ts+smoke.spec.tsnavigation4,smoke4. In the first pre-round-2 run (12 passed, 2 failed), the two desktop cases failed on F's sidebar brand overflow; round 2 resolved that.The first e2e run used a
git merge-treeG+F tree, which was never committed. The fix-round-2 run used the real branch after F was back-merged (10a04838) ande5728a03.After the full battery, one follow-up commit was validated with focused tests only:
0c3d2595(palette input hides the native::-webkit-search-cancel-button, which the first screenshots showed doubled next to the clear button). The back-merge oforigin/feat/new-uikit(A's merged PR #17279) was then re-checked on .113 with typecheck:core, dashboard-typecheck and the focused suites above.Screenshots
Re-captured in fix round 2 from the G+F production build on .113 (
/dashboard/providers):_artifacts/G-header-light-1440.png,_artifacts/G-header-dark-1440.png: the single sidebar trigger in the header; icon, title and description; "Keak OmniRoute" product switcher; Quick nav +Ctrl+K; language menu; theme toggle; logout. The sidebar brand fits its column._artifacts/G-header-light-390.png,_artifacts/G-header-dark-390.png: mobile header with "Open menu", search, language, theme and logout._artifacts/G-palette-light-1440.png,_artifacts/G-palette-dark-1440.png,_artifacts/G-palette-light-390.png,_artifacts/G-palette-dark-390.png: palette open with "prov". The search row is borderless with a single clear ×; section eyebrows, thesurface-2selection and the hints footer are visible.