Repository navigation
admin 0.9.0, parts 1–2: the frame and the list page - #21
Merged
Merged
Conversation
Pure logic for the Shopify-style admin frame (admin-patterns draft 3, pattern 1): nav as data, the deepest match current, its section open, the drawer below 1040 px (to measure). Not exported yet: the frame UI comes on the shared design system's components. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts, page header) on kit/ui and the admin theme Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… keyset cursor) and rough counts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s) that updates in place ResourceIndex on kit/ui and the URL state: views as link tabs, search and filters with removable chips, a real table (caption, sort buttons with aria-sort, mixed header checkbox, linked primary cell), the bulk bar over the header row (a fixed bottom bar on phones), keyset pages with a count. Changes update the rows in place: the previous rows stay with a thin loading bar, pages swap in a view transition, skeletons only on the first load. Whole rows open the record; j/k, x, Shift+x, Space and / on the keyboard. Bulk actions run optimistically with an Undo toast (a provisional admin toaster in the frame, until kit/ui's Toast lands). Words in four languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ft 5) The phone's second list (rowToMobile, MobileRow) is gone: each column says its part when the table stacks (`phone: 'line' | 'badge' | 'value' | 'hide'`, the primary column is the title), and each cell carries its column name for "Column: value" lines. It stacks on a container query (under 600 px of room), so a narrow card on a desktop stacks too. Table roles are set explicitly, as some browsers drop them when table parts change display. Wide screens: the header row sticks under the top bar; a table too wide for its room becomes a named, focusable region that scrolls, with the checkbox and primary columns sticky. The sort arrow follows aria-sort (none on unsorted columns). One view transition name. Bulk bar and Clear laid out by our own wrappers, not kit/ui's buttons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rlays' peers main's package.json has the UI SDK peers from the overlays PR; bun install adds them to bun.lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jgb-solutions
force-pushed
the
feat/admin-frame-logic
branch
from
December 6, 2026 01:51
5a54df6 to
f1b1367
Compare
… menus on one line with an edge fade Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jgb-solutions
marked this pull request as ready for review
December 6, 2026 01:54
The per-address limit counts in 60-second windows aligned to the clock. Eleven sign-ins with password hashing take seconds on a slow runner and can cross a minute's edge, which restarts the count: the 11th sign-in then passes. A fixed clock keeps each test's attempts in one window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
isLocalPath() accepts only a path starting with "/", not "//" or "/\\", and with no control characters. localLinks() draws every frame, page-header and list link through it; any other href becomes a disabled link that keeps its name. A row click opens only when the row's rowHref is a local path and the router's link stays on this origin. ListSpec.sorts is a non-empty tuple; parseListQuery throws on no sort key or a filter option with a comma (commas join values in the URL). Tests for both, for after winning over before, and for links to other sites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
kit-showcase | aa42431 | Commit Preview URL Branch Preview URL |
Dec 06 2026, 07:10 AM |
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.
The first parts of the new admin, which replaces
kit/adminin 0.9.0: the frame and the list page. It follows spec items 1–8 in section 10.3 of the design-system plan, built on kit/ui and the admin theme from #19. The code is insrc/admin-next/and is not exported yet. The swap intosrc/admin, its package exports and the CHANGELOG "Upgrading" note come in the last part, so main never ships half an admin.<dialog>: focus stays inside, Esc and the scrim close it, focus returns to the menu button, and choosing a page closes it. It moves to the kit's Sheet when Fable's overlays PR lands. There is one skip link, and the admin theme and compact density apply on the frame's root only.resolveNav. Exactly one item hasaria-current="page"; sub-items show only under the open section; groups have titles; Settings is pinned to the bottom. Number badges show "99+" but read the full count ("1,200 pending").onOpenuntil the ⌘K palette ships.adminFrameText*).src/admin-next/styles/10-frame.css, tokens only, every selector inside:where([data-slot…]), reduced motion respected, 44 px targets on touch screens./admin-next(?scheme=dark|light,?path=,?long=1). One route added toplayground/serve.ts, which Fable knows about.The list page (spec items 5–8), made to feel like Shopify's lists:
list/query.ts): view, search, filters, sort and keyset cursor live in the URL, checked against the list's spec (anything else is dropped). Back, Forward and shared links work. Defaults stay out of the URL. Counts are exact up to 1,000, then "about 31,500" (or exact when the app says the count is cheap).placeholderData: keepPreviousData,refreshing={isPlaceholderData}). Skeleton rows show only on the first load. Pages swap with a View Transition where the browser has one (none with reduced motion) and scroll back to the list's top.<table>with a caption, sort buttons witharia-sort, numbers right-aligned, and the primary cell as the row's header and link. The whole row opens the record (not on its checkbox or links, nor while text is selected)./focuses the list's search (the frame's search keeps ⌘K),j/kmove between rows,xor Space selects, Shift+x selects the range, Enter opens.phone: 'line' | 'badge' | 'value' | 'hide'(no morerowToMobile). Table roles are set explicitly, because some browsers drop them when table parts changedisplay. Filter menus sit in one row that scrolls sideways (a sheet once Fable's overlays land); 44 px targets.role="region",tabindex="0", labelled by the caption) that scrolls sideways, with the checkbox and primary columns staying in view. The sort arrow followsaria-sort, so unsorted columns show none.useAdminToast(), from a small toaster the frame now holds: bottom centre, 5 s with a timer that waits on hover and focus, and a toast with an action stays until it is used or closed. It moves onto kit/ui's Toast when that lands, with the same call.adminListText*; the frame gainednotificationsanddismiss). CSS:20-list.css,30-toast.css, tokens only, inside:where()./admin-next?path=/admin/users, 2,481 made-up users behind a pretend server that answers after 250–600 ms;?empty=1shows the first-time empty state.Next on this branch: detail and the save bar (items 9–10).
isLocalPath()accepts only a path starting with "/", not "//" or "/\", and with no control characters (browsers drop tabs and newlines, so "/\t/host" would become "//host"). Every link the kit draws goes throughlocalLinks(): nav, brand, back, record pager, list rows, views and pages. Any other href is drawn as a disabled link that keeps its name. Beforewindow.openorclick, a row click checks the rawhrefattribute too.sortsis a non-empty tuple type.parseListQuerythrows on a spec with no sort key, or with a filter option holding a comma, because commas join several values in one URL parameter.afterwinning overbefore(and a badafterfalling back tobefore), and links to other sites in the frame, the page header and list rows.src/auth/server.integration.test.ts) now uses a frozen clock for its rate-limit store. CI failed once on it: 11 hashed sign-ins crossed the edge of a 60-second window, and the count restarted. The auth code is unchanged and identical to main.Checks:
bun run test(286 pass: query, selection, list markup, words and link guards added),bun check,bun fmt --check, build,check:package,check:size,bun audit(none). E2E: the whole suite passes on desktop and phone (170 tests), includinge2e/admin-list.spec.ts(axe light/dark, fits at 390 px, skeleton then rows, filters without reload with old rows kept and the count announced, search follows typing,/and Escape, chips by keyboard and Back, views, paging and Back, optimistic suspend with an Undo toast that outlives 5 s, sorting andaria-sort, whole-row open and Back, j/k/x/Shift+x/Space, select page then all, the stacked cards with their labels and Select mode, the sticky header, the scroll region with the sticky name column, one sort arrow, 44 px targets, the compact Sort button and one-line filter menus on phones). Screenshots and a recording:e2e/admin-list-screenshots.spec.ts.Docs/skills: the design-system plan (section 10.3) and admin-patterns draft 3, the UI SDK skill (
data-slotconventions), MDN<dialog>/showModal(focus and Esc behaviour), WAI-ARIA APG (disclosure button,aria-current,aria-keyshortcuts), axe-core rules (label-content-name-mismatch); for the list: admin-patterns §3, §7, §8 and §13, WAI-ARIA APG (sortable table,aria-sort, mixed checkbox), MDN View Transitions (document.startViewTransition) with React'sflushSync, TanStack Query'splaceholderData(for the documented data hook), admin-patterns draft 5 (one stacking table, container query, sticky parts, scroll region), MDN container queries andposition: sticky. Icons are Lucide (ISC), inline.Security review: UI only; nothing reaches a server. Links and labels come from the app's own nav data and render as text and
hrefthrough React, with no raw HTML. The key handlers ignore text fields, modified keys and open dialogs. List input from the URL is parsed against an allow-list (cursor^[A-Za-z0-9_-]{1,512}$, search cut to 200 characters), and the search field has the samemaxLength. Ctrl/⌘-click on a row opens the app's own row link withnoopener. No raw HTML, no new dependencies. No findings.🤖 Generated with Claude Code