Skip to content

Agent docs and props: fewer follow-up reads, Kbar from a button, breakpoint hide fix - #226

Merged
lorant-one merged 9 commits into
previewfrom
chore/benchmark-dry-run-rl26k0
Oct 19, 2026
Merged

lorant-one merged 9 commits into
previewfrom
chore/benchmark-dry-run-rl26k0

Conversation

@lorant-one

@lorant-one lorant-one commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Requested by Lorant · project thread

Before: an agent building an app shell, a list page or a dashboard read its task bundle, then came back for what was missing: the shell components, selectNavHref, props hidden behind "Extends", which chart key is the x axis, and the project's app/layout.tsx. Each extra turn re-sends a 9-14k token bundle. Agents also kept writing props that don't exist (<Text flex={1}>, s={{ hide: true }} on Text, height="fit"), and could not open Kbar from a header button. s={{ hide: open }} on a Column hid it on desktop whenever open was false.

After: the agent docs answer those questions in the first read, the props agents reach for exist, Kbar takes open/onOpenChange, and hide: false at a breakpoint no longer hides anything. An internal dry run of the eight pre-registered Lumen v2 tasks (3 replicates each; a simulation, not a benchmark result) measured Once UI at about 2.1x shadcn/ui's tokens before and about 1.2x after. First-try gate passes were 24 of 24 on the final commit.

How:

  • Agent docs:
    • New ai/tasks/app-shell.json bundle: sidebar and header components, selectNavHref, useTheme, and both layouts.md shell sections.
    • generate-ai-spec.js: bundles include the props of extended parents and list the task's hooks. Types already given as mixins are skipped, and layout can be a list.
    • AGENTS.md: read app/layout.tsx with the bundle; an "Adds" column names extra slices to fetch up front.
    • Rules and gotchas: native attributes, the skip link, the Chart.xAxis key, Text/Heading layout limits.
  • Components:
    • Kbar: open and onOpenChange make it controlled, children is optional, and ⌘K still toggles it. Docs page updated.
    • ServerFlex/ServerGrid: a -show class is display: none outside its media query, so it is now emitted only where a wider breakpoint hides the element (hiddenAboveBreakpoints).
    • Text/Heading: flex, and xl-xs with hide only.
    • Width and height take "auto" and "fit" (fit-content). VisuallyHidden as="a" takes href.
    • RevealFx clears its mask timer on unmount.
  • Some unrelated ai/components/*.json diffs are generator drift or literal-union order.

Checks:

  • Core vitest passes: 2015 tests, no unhandled errors.
  • lint-gate is below its baseline.
  • check:docs reports 0 problems.

Findings: /mnt/project-files/benchmark/dry-run-2026-10-18/README.md in the project.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz

An internal dry run of the eight Lumen v2 tasks showed agents re-reading
the task bundle on two or three extra turns: no bundle covered app shells,
selectNavHref was undocumented, inherited props (ToggleButton, User,
DropdownWrapper) were hidden behind "Extends", and chart x-axis keys were
a guess. Each extra turn re-sends a 9-14k token bundle.

- New app-shell task bundle (shell components, selectNavHref, useTheme,
  both layouts.md shell sections).
- Bundles list the props of extended parents and the task's hooks.
- Types skip names already given as mixins.
- AGENTS.md: read app/layout.tsx with the bundle in one step; table gains
  an "Adds" column naming extra slices worth fetching up front.
- Native-attributes row in rules.compact.md; Chart.xAxis gotcha on the
  dashboard bundle; DropdownWrapper and Option on list-page.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
@lorant-one lorant-one added the no-demo label Oct 18, 2026 — with Claude
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
core-docs Ignored Ignored Preview Oct 19, 2026 7:01am UTC

@lorant-one lorant-one self-assigned this Oct 18, 2026
…o href

A dry-run reply wrote <VisuallyHidden as="a" href> from the rules table and
failed strict typecheck.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
Three of 24 dry-run replies failed typecheck on s={{ width: "auto" }} or a
bordered Text. The responsive-props gotcha now gives the working forms.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
… href

- Kbar takes open and onOpenChange, and children is optional. A header
  Search button, a menu item or a sidebar link can now open the palette;
  before, the only way in was Kbar's own wrapper row (a Button inside it
  made two tab stops). The shortcut, Escape, options and route changes
  report through onOpenChange; a palette that starts open stays open.
- Flex/Grid width accepts "auto", so a breakpoint can undo a fixed width
  (width={10} s={{ width: "auto" }}).
- VisuallyHidden accepts href, so <VisuallyHidden as="a" href="#main"
  focusable> is a skip link.

All three came out of the agent dry run: replies used these forms and
failed strict typecheck, or hand-built a palette on Dialog.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
Four of 24 dry-run replies put s, flex or border on a Text. The Text and
Heading slices now say so where the props are listed, and the rules table
names Kbd for a key cap.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
…t and Heading

A bare s={{ hide: false }} emitted .s-flex-show, which is display: none
outside its media query, so the element vanished above s. Show classes
are now emitted only where a wider breakpoint hides the element (Flex
and Grid). Text and Heading take flex, the most common typecheck slip
in the internal dry run.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
…mount

s={{ hide: true }} on Text was the remaining repeated typecheck slip in
the internal dry run. Text and Heading now take xl/l/m/s/xs with hide
only, emitted as the existing flex-hide classes. RevealFx left its
mask timer running after unmount, which set state after teardown.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
height="fit" was a repeated typecheck slip in the internal dry run;
it now means fit-content, like fitHeight and fitWidth.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
@lorant-one lorant-one changed the title Agent docs: app-shell bundle and fewer follow-up reads Agent docs and props: fewer follow-up reads, Kbar from a button, breakpoint hide fix Oct 18, 2026
@lorant-one lorant-one removed the no-demo label Oct 18, 2026 — with Claude
Kbar keeps preview's trigger role and aria attributes inside the
children guard; generated ai/ files are regenerated.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNHpynr3DB5GWLbBGiBSFz
@lorant-one
lorant-one merged commit 107e336 into preview Oct 19, 2026
10 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 19, 2026
30 tasks done
@lorant-one lorant-one added the approved label Oct 20, 2026 — with Claude
lorant-one pushed a commit that referenced this pull request Oct 20, 2026
Main's fixes are carried into 3.0's props rather than taken as written:

- Breakpoint show classes only under a wider hide (Flex, Grid), sizes take
  "auto" and "fit", Text and Heading take s={{ hide }} (#226, #245).
- ThemeInit/ThemeProvider: defaultTheme and exact scheme scales beside 3.0's
  density (#246). Kbar's trigger is optional.
- AI harness: main's leaner bundle writer (grouped props, word-list types)
  with 3.0's mixin and key-diff compression; gotchas keep 3.0's wording and
  take main's inRules flags; the app-shell task and app starter, codemodded.
- FileTree follows the state contract: onExpandChange is onExpandedIdsChange
  (codemod entry), onSelectedIdChange is new, onSelect stays the action.
- Main's new native components (#224) take 3.0's props (textVariant,
  aria-label, onValueChange, onPageChange) and point units: their rem
  defaults are written as "Nrem". Native docs pages say points, not rem.
- Effects and Swiper fixes ported to their 3.0 homes (packages/fx,
  Carousel/SnapCarousel).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants