Skip to content

fix(fork): design lint holds new UI to a Figma kit component and a story - #602

Merged
NoahHendrickson merged 7 commits into
customfrom
t3/design-lint-coverage
Nov 29, 2026
Merged

NoahHendrickson merged 7 commits into
customfrom
t3/design-lint-coverage

Conversation

@NoahHendrickson

@NoahHendrickson NoahHendrickson commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

The design lint stayed green while the sprint and coordinator work shipped UI with no Figma kit component and, for the rows in a conversation, no Storybook story. There were three holes:

  • Agents could exempt their own rows and cards from the story rule (B5) as "section" or "page layout".
  • The Figma check (B6) was self-attested, and you could stamp a story the kit doesn't draw.
  • B6 only noticed changes to story files, not to the components a story draws.

The review is in the sprint library (sprints-review-design-lint.md).

Lint changes

  • B6 records the kit node. A stamp in .fork/figma-kit.json is now { hash, node }, or { hash, node: null, reason } when the kit doesn't draw it. You write it with node .fork/design-lint.mjs --figma-checked <stories…> --node <id> (or --not-in-kit "<why>"). A new or changed stamp with neither fails, and so does a null or malformed one. The stamps from before nodes were recorded now read node: null, reason: "predates kit node recording". They were re-hashed once under the new formula, which is not a claim that the kit was rechecked, and each needs a real node the next time its story or component changes.

  • B6 hashes the component too. A story's hash covers the story, the apps/web/src/custom/**/*.tsx files it imports directly, and their same-name .css. Editing a storied component's code or CSS now asks for a kit check even when the story didn't change.

  • B5 exemptions are typed. b5Exempt(kind, reason, byFile) takes a kind from B5_KINDS, and the lint checks each entry against it:

    • A layout kind (route page, page layout, section) can't hold a name ending in Row, Card, Chip, Pill, Button, Toggle, Mark or Badge.
    • A wrapper, frame or part names in wraps the storied component or story it draws. It fails if that has no story.
    • An upstream wrapper names the upstream export it wraps, and its file must import it from outside custom/.

    Rewording a reason no longer gets past the check. Every existing entry is refiled: the live components as wrappers around their storied views, and BotThreadsCloseButton as a wrapper around StagePanelCloseButton.

    • The sidebar's SidebarV2SprintsRow, SidebarV2CoordinatorsRow and SidebarV2BotsRow are renamed *Section, since they draw sections.
  • B5 and B6 read a story's imports through one parser, customImports. It covers alias and relative custom/ paths and named, default and namespace imports.

  • vp run check:changed runs the design lint, in a fork-fenced step in scripts/check-changed.ts, so agents see it before CI. It triggers on web source, stories, .fork, pnpm-lock.yaml and apps/web/package.json.

  • .fork/DESIGN-RULES.md and .fork/AGENTS.md › Figma kit ↔ code are updated to match. Tests in forkDesignLint.test.ts cover each new failure.

Stories

The rows and cards a sprint conversation draws now live as plain-props views in one leaf module, threadLaunchCards/threadCardViews.tsx, which imports nothing from the live containers. The containers read the thread and draw these views, and the app draws the same markup as before. The module holds:

  • ForkThreadHookRowView, PendingLaunchRow and ForkThreadRowMark (the one mark the app and the stories draw).
  • HookedCard, the shared frame.
  • ForkThreadReadyToMergeView and ForkMergeRequestChipView.
  • ForkThreadQuestionCardView, ForkThreadApprovalCardView and ForkAnsweredRequestCardView.
  • ForkThreadTypedAnswer and ForkThreadOpenButton.

New stories, each stamped against its Basic UI kit component:

Story Kit node
Fork/Thread hook row 563:10388
Fork/Ready to merge 563:10497
Fork/Thread request card 563:10659
Components/Tabs › Trackless strip 40:191

Checkbox pill (563:9915) and Starter card (563:11362) now record their nodes too.

Figma kit (not in this diff)

The missing kit components were built and are listed in sprints-figma-kit-build.md:

  • Row PR chip
  • Checkbox pill and icon/coordinator
  • Thread hook row (status on the provider mark), Ready to merge, Thread request card
  • Status chip: Merge PR, Sent, Go to thread
  • Tabs Track=None
  • Starter card › Sprint
  • Section label icon
  • Block / Sidebar: Sprints and Coordinators sections

The unused Subagent count component was removed.

Open owner calls, left as they are

  • The approval card under a thread row has no bottom border or rounded corners in the app; the kit draws the full card.
  • Coordinator icon: the sidebar label (feat(web): sprint and coordinator icons on their sidebar labels and headers #574) uses WorkflowSquare10Icon, while the Coordinator pill's work in thread f64ab9 uses the filled-top glyph. The kit uses the latter for both.
  • Whether to draw the sprint panel (its tabs and their bodies) and the New sprint dialog as a kit Block.
  • The light open PR chip fill differs: kit #dcf5e6, code #c8f2d6.

Checks

  • vp run check:changed: every step passes, design lint included.
  • vp test run src/__fork_guards__/: 1031/1031.
  • node .fork/lint-owned.mjs: no blocking warnings.
  • The new stories render in Storybook in Flat Glass and Basic Light.

Both automated PR reviews are addressed in ce0b3a5, c17f68a and 4cc6683, with a reply on each comment. One nit is declined: plural "Rows" lists stay allowed as sections.

Reviewed with sol-loop: 3 rounds with GPT-6.1 Sol on high. Sol verdict: approved


🤖 Signed: Claude Opus 5.5 (claude-opus-5-5) via Claude Code

  • Claude Opus 5.5 (claude-opus-5-5) via Claude Code, a delegated child, wrote the first lint changes, stories and view splits, which this PR rebuilt on the current custom.
  • GPT-6.1 Sol (gpt-6.1-sol, high) via Codex reviewed the change and approved it.

xxxxxxxxxxxxx and others added 3 commits November 29, 2026 13:59
…a story draws

B5 no longer lets a Row, Card, Chip, Pill, Button, Toggle, Mark or Badge be
exempted as a route page, page layout or section. The entries it caught are
storied, filed as wrappers around the storied view they draw, or renamed
(SidebarV2{Sprints,Coordinators,Bots}Row draw sections: now *Section).

B6 stamps name the kit node checked (--node <id>) or why the kit draws none
(--not-in-kit "<why>"); a stamp with neither fails. A story's hash now covers
the custom/ components it imports and their same-name CSS, so a component
change asks for a kit check too. Existing plain-hash stamps were re-hashed
under the new formula once and stay valid until their story changes; this is
not a claim that the kit was rechecked.

check:changed runs design-lint --check when web, desktop, Storybook or .fork
files change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge and request cards

ForkThreadHookRow, ForkThreadReadyToMerge, ForkMergeRequestChip and the request
cards now draw through plain-props views (ForkThreadHookRowView, HookedCard,
ForkThreadReadyToMergeView, ForkMergeRequestChipView, ForkThreadRequestCardView,
ForkThreadQuestionCardView, ForkAnsweredRequestCardView), so Storybook renders
them without live thread state. The app draws the same markup as before.

New stories: Fork/Thread hook row, Fork/Ready to merge, Fork/Thread request card,
and Components/Tabs › Trackless strip, each stamped against its Basic UI kit node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL labels Nov 29, 2026

@NoahHendrickson NoahHendrickson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code quality review of 2da4dcafe8f2cb7ae07da69895e23f85428998c5 (base 56d3924fea). Not approving. Two structural issues block approval, and four smaller ones follow.

The intent is right, and the view splits keep the rendered markup the same. I traced each of them: the ready-to-merge surface moved into the view, it has one consumer, and nothing draws the surface twice. But the way the PR builds this works against what it is trying to do.

1. The views share files with their live containers, and that adds an import cycle and makes B6 noisy (structural)

  • New cycle. ForkThreadReadyToMerge now imports FORK_THREAD_CARD_SURFACE from ForkThreadRequestCard. ForkThreadRequestCard imports from ForkThreadLaunchCards, which imports both of them. That makes ReadyToMerge → RequestCard → LaunchCards → ReadyToMerge. It only works because the constant is read at render time.
  • The views are mixed in with the wiring. The new plain-props views (ForkThreadHookRowView, HookedCard, PendingLaunchRow, and the *View cards) sit inside the container modules, tagged @public.
  • That collides with the PR's own B6 change. B6 now hashes each custom/**/*.tsx file a story imports, as a whole file. ForkThreadLaunchCards.tsx is 394 lines, and most of it is live wiring the stories never draw (ForkThreadRowList, ForkWorkReportRow, useOpenThreadBeside, router and store hooks). Any edit to that wiring will ask for a kit re-check on Thread hook row, Ready to merge and Thread request card. A lint that keeps raising false alarms teaches agents to re-stamp B6 without checking, which is the habit this PR is trying to stop.

Code judo: move the drawn layer into one leaf module, e.g. threadLaunchCards/threadCardViews.tsx. It would hold Hook, ROW, FORK_THREAD_CARD_SURFACE, CARD, HookedCard, ForkThreadHookRowView, PendingLaunchRow, the RequestCard and ReadyToMerge views and the row mark, and it would import nothing from the containers. The containers import the views. That one move:

  • breaks the cycle;
  • removes the @public markers;
  • makes the B6 hash cover exactly the markup the kit is checked against.

2. B5 exemption kinds are parsed out of free-text reasons (structural, type boundary)

  • The kind lives in prose. checkB5Exemptions matches LAYOUT_KIND against the start of entry.reason, and "wrapper" is just more prose ("wrapper: …", "wrapper around …").
  • The hole moves one word over. Retitling "section: …" to "wrapper: …" passes the check, and that is exactly how this PR refiles the entries.
  • The kinds already exist, just untyped. They are: route page, page layout, section, provider/host, screen backdrop, wrapper, frame, and part of a storied card.

Make them data: b5Exempt(kind, reason, byFile), with kind from a closed set. A kind: "wrapper" entry must also name wraps: "<StoriedView>", which the lint checks against storyImports. That deletes the regex, closes the follow-up this PR defers ("a wrapper exemption doesn't yet have to name the storied view"), and makes the rename-the-reason escape impossible.

3. Old stamps keep a second format for good

  • Two shapes, two branches. Stamps are now string | {hash, node} | {hash, node: null, reason}. recordsKit and checkFigmaStamps each branch on typeof stamp === "string".
  • The 98 were rewritten anyway. This PR already rewrote all 98 old entries under the new hash, so the migration happened, just back into the old shape.

Write them as { hash, node: null, reason: "predates kit node recording" } instead. That leaves one honest shape and no type-based branch. A bare string standing in for "grandfathered" is magic-by-type.

4. Two story-import parsers disagree

  • B5: storyImports (stories.mjs) counts named imports from any …custom/… path.
  • B6: storyComponents (figma.mjs) counts only from "~/custom/…".

A story that imports a component by a relative path counts as storied for B5 but adds nothing to its B6 hash. Have one parser return each specifier with its names, and have both rules use it.

5. The threadRowMark fixture copies ThreadMark

stories/fixtures/threadRowMark.tsx rebuilds SidebarV2StatusBadge + ForkThreadProviderMark by hand, and it already differs from the app:

  • ThreadMark leaves out the provider mark when driver === null;
  • the thread === null branch draws an empty badge;
  • the fixture always draws the provider mark.

So "the app draws the same markup" isn't true for the mark. Export a ForkThreadRowMark view (from the leaf in #1), and use it in both the app and the stories.

6. Smaller boundary leaks (fold these into #1)

  • HookedCard is the shared frame, but it takes requestKind only to stamp data-fork-thread-request-card. That is a request-card idea leaking into it.
  • ForkThreadRequestCardView branches on kind to decide whether to wrap opaque children in max-w-xl. It relies on the question child drawing its own surface, and the contract doesn't say so.

Give the approval its own view, so the request views own their wrapping and the frame stays generic.

Smaller still: main()'s hand-written findIndex/slice flag parsing is what node:util parseArgs is for, and stampFigma repeats the validation anyway.

Approval bar: #1 and #2 are presumptive blockers. #1 is a missed decomposition that also undermines the new B6 signal. #2 is a lint mechanism built on parsing prose where a typed model is clearly available. The rest should land in the same pass.

import { ThreadPullRequestChip } from "../ComposerPullRequestChip";
import { CheckIcon, GitMergeIcon } from "../icons/lucide-hugeicons";
import { useThreadAutoMerge } from "../threadAutoMerge";
import { FORK_THREAD_CARD_SURFACE } from "./ForkThreadRequestCard";

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds an import cycle: ReadyToMerge → RequestCard → LaunchCards → ReadyToMerge. Move FORK_THREAD_CARD_SURFACE and the other drawn pieces into a leaf views module that imports nothing from the containers (see #1 in the review body).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5. The drawn layer (FORK_THREAD_CARD_SURFACE, CARD, Hook, ROW, HookedCard, the row and card views, ForkThreadRowMark) moved to the leaf threadLaunchCards/threadCardViews.tsx, which imports nothing from the containers. The cycle is gone.

}

/** @public — a thread's hooked row as drawn, from plain props; Storybook renders it on its own. */
export function ForkThreadHookRowView(props: {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @public view sits in a 394-line container module. B6 now hashes this whole file for the Thread hook row, Ready to merge and Thread request card stories, so editing the ForkThreadRowList and ForkWorkReportRow wiring will ask for kit re-checks that have nothing to do with the drawn markup. Can we split the views into their own leaf module?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5. The views now live in threadCardViews.tsx, so the stories import only that module, and B6 hashes just the drawn markup, not ForkThreadRowList or the router and store wiring. The @public markers are gone because the containers use every view.

}

/** A row over the card it heads, its down arm dropping onto the card. */
export function HookedCard(props: {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requestKind brings a request-card idea into the shared frame. Let the request views stamp their own data attribute, or accept a generic one, so HookedCard doesn't need to know about requests.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5. HookedCard now takes any data-* attribute. RequestFrame passes data-fork-thread-request-card itself, so the frame knows nothing about requests.

Comment thread .fork/design-lint/rules/stories.mjs Outdated
}

const ATOMIC_NAME = /(?:Row|Card|Chip|Pill|Button|Toggle|Mark|Badge)$/u;
const LAYOUT_KIND = /^(?:route page|page layout|section)\b/u;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches the exemption kind out of free-text reason. Retitling an entry from section: … to wrapper: … passes the check, so the hole just moves one word over. Can we make kind a typed field on b5Exempt and require wraps: "<StoriedView>" for wrappers, checked against storyImports? That would delete this regex.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5. The kind is now data: b5Exempt(kind, reason, byFile) with kind from B5_KINDS. A wrapper, frame or part names in wraps the storied component or story it draws, and the lint checks that it is storied. An upstream wrapper names the upstream export it wraps, and its file must import it from outside custom/. Rewording a reason no longer changes what the check sees. Tests are in forkDesignLint.test.ts.

Comment thread .fork/design-lint/rules/figma.mjs Outdated

/** A stamp names the kit node it was checked against, or says why the kit draws none. A plain
hash is a stamp from before nodes were recorded; it holds until its story changes. */
const recordsKit = (stamp) =>

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bare-string stamps are a second format that keeps typeof stamp === "string" branches here and at line 58 for good. All 98 were rewritten in this PR anyway, so write them as { hash, node: null, reason: "predates kit node recording" } and drop the branch.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5. Every stamp is now { hash, node } or { hash, node: null, reason }. The 95 old ones read reason: "predates kit node recording", and the typeof stamp === \"string\" branches are gone.

Comment thread .fork/design-lint/rules/figma.mjs Outdated
/** The `custom/**\/*.tsx` files a story imports directly, each with its same-name `.css`. */
export function storyComponents(root, text) {
const paths = new Set();
for (const match of text.matchAll(/from\s+["']~\/custom\/([^"']+)["']/gu)) {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parser counts only ~/custom/ imports, while storyImports in stories.mjs counts any …custom/… path. A component imported by a relative path then counts as storied for B5 but adds nothing to its B6 hash. Have one parser serve both rules.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5 and c17f68a. B5 (storyImports) and B6 (storyComponents) now read one parser (customImports). It counts alias and relative custom/ paths, plus namespace and default imports (Icons.stories.tsx imports the shim as * as Icons). Tests cover the relative and namespace cases.

} from "~/custom/SidebarV2StatusIndicator";

/** A thread row's mark as ForkThreadHookRow draws it: the provider wearing the thread's status. */
export function threadRowMark(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This copies ThreadMark by hand and already differs from it: the app leaves out the provider mark when driver === null, and this fixture always draws it. Export one ForkThreadRowMark view and use it in both the app and the stories.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5. The fixture is deleted. ForkThreadRowMark in threadCardViews is the one mark: the app's ThreadMark draws it (status alone when the provider or its driver is unknown), and the stories draw it too.

</div>
{props.children}
<HookedCard row={props.row} requestKind={props.kind}>
{props.kind === "question" ? (

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Branching on kind to wrap opaque children only works if the question child draws its own surface, and the contract doesn't say so. Give the approval its own view, so this view doesn't need the conditional.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5. The approval has its own ForkThreadApprovalCardView (the max-w-xl wrapper), and the question draws ForkThreadQuestionCardView with its surface. RequestFrame no longer branches on kind to wrap opaque children. 4cc6683 keeps the approval's empty wrapper while its controls load, as before the split.

Comment thread .fork/design-lint.mjs Outdated
if (mode === "--figma-checked" && paths.length > 0) {
const [mode, ...rest] = process.argv.slice(2);
if (mode === "--figma-checked") {
const flag = rest.findIndex((arg) => arg === "--node" || arg === "--not-in-kit");

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: node:util parseArgs (string options node and not-in-kit, positionals allowed) would replace this hand-written index and slice parsing.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in ce0b3a5: the flags parse with node:util parseArgs.

@NoahHendrickson NoahHendrickson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review of commit 2da4dcafe8f2cb7ae07da69895e23f85428998c5 (base 56d3924fea).

I found no correctness bugs in the app code. The view splits keep the same markup, and the lint rules do what the description says. There are six nits, mostly gaps in the new B5/B6 coverage. Items 1–5 have inline comments:

  1. B6 misses components imported through story fixtures. storyComponents only hashes ~/custom/ imports that appear in the story file itself. The three new stories get the provider mark through stories/fixtures/threadRowMark.tsx, so restyling ForkThreadProviderMark won't trip B6 for them.
  2. A null stamp crashes the lint. checkFigmaStamps and recordsKit only guard against undefined, so a stamp set to null throws a TypeError instead of reporting a B6 finding.
  3. B5's atomic-name check misses plurals. ATOMIC_NAME requires the name to end in Row and so on, so SidebarV2ChromeActionRows and SidebarV2ChatActionRows keep their section exemption without being flagged.
  4. check:changed triggers the design lint on the wrong paths. It runs on apps/desktop/src, which the lint never reads. It doesn't run on pnpm-lock.yaml or apps/web/package.json, though C3 reads tailwindcss/theme.css.
  5. There is a three-module import cycle. It runs ForkThreadLaunchCards → ForkThreadReadyToMerge → ForkThreadRequestCard → back to ForkThreadLaunchCards, created by FORK_THREAD_CARD_SURFACE. It's safe today but fragile.
  6. customizations.yaml still names RequestFrame. At line ~6019, the fork-thread-launch-cards intent says the ready card is "inset ps-3 as RequestFrame does". This PR deletes RequestFrame. The inset now lives in HookedCard, and ForkThreadReadyToMergeView draws the surface. The line is outside the diff, so it has no inline comment.

One acknowledged item: rewriting about 45 plain-hash stamps under the new formula means components that had already drifted from the kit are approved without a kit check. The description already says this, so I'm not counting it as a finding. It's still worth checking those stories against the kit at some point.


🤖 Signed: Claude Opus 5.5 (claude-opus-5-5) via Claude Code

@@ -0,0 +1,27 @@
import { EnvironmentId, ProviderDriverKind } from "@t3tools/contracts";

import { ForkThreadProviderMark } from "~/custom/ForkThreadProviderMark";

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

storyComponents (figma.mjs) only hashes ~/custom/ modules that the story file imports itself. ThreadHookRow, ReadyToMerge and ThreadRequestCard get ForkThreadProviderMark and SidebarV2StatusBadge through this fixture, so a restyle of either keeps their hashes the same and B6 stays green. Either follow relative imports into stories/fixtures/, or import the mark straight from each story.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. The fixture is gone. The stories import ForkThreadRowMark from threadCardViews, which imports the provider mark and status badge itself.

if (stamp === storyHash(text)) continue;
const what = stamp === undefined ? "new story" : "story changed since the kit was checked";
out.push(finding("B6", path, 1, `${what}: ${fix(path)}`));
if (stamp === undefined) {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only guards undefined. If figma-kit.json contains "…stories.tsx": null (from a hand edit or a merge resolution), stamp.hash / stamp.node throws TypeError: Cannot read properties of null and both CI and check:changed fail with no useful message. Treat any stamp that isn't a string or a plain object as invalid and report it as a B6 finding.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5. A null or malformed stamp now reports "stamp names no kit node and no reason" instead of throwing. The test covers null and a bare string.

return out;
}

const ATOMIC_NAME = /(?:Row|Card|Chip|Pill|Button|Toggle|Mark|Badge)$/u;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't match plural names. SidebarV2ChromeActionRows and SidebarV2ChatActionRows are still exempted as section and aren't flagged, and a future ForkThreadRows exempted as a section would get through too. You moved ScheduledRunRows by hand, which suggests plurals were meant to count. Consider (?:Row|Card|Chip|Pill|Button|Toggle|Mark|Badge)s?$.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declined on purpose. A plural name like SidebarV2ChromeActionRows or ScheduledRunRows is a list that lays out storied rows, which is what a section is. The rule targets single atoms (one row, one card). Typed kinds also close the escape this would guard against: a list can't pass as a wrapper without naming a storied wraps.

Comment thread scripts/check-changed.ts Outdated
/* fork:begin fork-design-lint — see .fork/customizations.yaml#fork-design-lint */
// CI's Lint job runs the fork's design lint; it reads web and desktop source, stories and .fork.
const runDesignLint = files.some((file) =>
/^(?:apps\/web\/src|apps\/desktop\/src|apps\/fork-storybook|\.fork)\//.test(file),

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lint's sources are only apps/web/src and apps/fork-storybook/stories (see sources.mjs), so apps/desktop/src triggers the lint for nothing, and the comment above is inaccurate. On the other side, C3 resolves tailwindcss/theme.css, so a Tailwind bump in pnpm-lock.yaml / apps/web/package.json can change C3 results without triggering this step. CI's Lint job would then fail on findings the local check said it covers.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5. The trigger is now apps/web/src, apps/fork-storybook/stories, .fork, pnpm-lock.yaml and apps/web/package.json (C3 reads tailwindcss/theme.css), and the comment says so.

import { ThreadPullRequestChip } from "../ComposerPullRequestChip";
import { CheckIcon, GitMergeIcon } from "../icons/lucide-hugeicons";
import { useThreadAutoMerge } from "../threadAutoMerge";
import { FORK_THREAD_CARD_SURFACE } from "./ForkThreadRequestCard";

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import closes a cycle: ForkThreadLaunchCards → ForkThreadReadyToMerge → ForkThreadRequestCard → ForkThreadLaunchCards (which supplies HookedCard and ForkThreadHookRow). It works today because nothing reads another module's binding at top level. One top-level constant built from FORK_THREAD_CARD_SURFACE or HookedCard would break it, depending on which module loads first. Consider moving the shared surface/CARD constants and HookedCard into a small leaf module.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ce0b3a5 (same as the other cycle comment). FORK_THREAD_CARD_SURFACE now lives in the leaf threadCardViews.tsx, which imports nothing from the containers.

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: 8a22ccd · PR result: 4cc6683 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

xxxxxxxxxxxxx and others added 4 commits November 29, 2026 14:42
… one stamp shape

- The rows and cards a conversation draws move into threadLaunchCards/threadCardViews.tsx,
  which imports nothing from the containers. That breaks the ReadyToMerge, RequestCard,
  LaunchCards import cycle, and B6 hashes only the drawn markup. ForkThreadRowMark is the one
  mark the app and the stories draw. HookedCard takes any data attribute, and the approval has
  its own view.
- B5 exemptions carry a kind from B5_KINDS. A wrapper, frame or part names the storied
  component or story it draws (wraps); an upstream wrapper names an export its file imports.
  The lint checks each.
- Every figma-kit.json stamp is { hash, node } or { hash, node: null, reason }. Stamps from
  before nodes were recorded say so, and a null stamp reports instead of throwing.
- B5 and B6 read a story's custom/ imports through one parser, relative paths included.
- check:changed runs the design lint for web source, stories, .fork, the lockfile and
  apps/web/package.json. The flags parse with node:util parseArgs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the sol review

Icons.stories.tsx reads the icon shim through `import * as Icons`; the shared parser had kept
only named imports, so a shim change no longer asked for a kit check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rage

# Conflicts:
#	apps/web/src/custom/threadLaunchCards/ForkThreadLaunchCards.tsx
#	apps/web/src/custom/threadLaunchCards/ForkThreadReadyToMerge.tsx
#	apps/web/src/custom/threadLaunchCards/ForkThreadRequestCard.tsx
…the split

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NoahHendrickson

Copy link
Copy Markdown
Owner Author

Both reviews are answered in ce0b3a5, c17f68a and 4cc6683, with a reply on each inline comment. Two points had no inline comment:

  • customizations.yaml named RequestFrame. Fixed. The fork-thread-launch-cards intent now says the arm drops onto the card through HookedCard's ps-3 inset and that the drawn rows and cards live in threadCardViews. That file is also in the manifest's file list.
  • About 45 plain-hash stamps re-hashed without a kit check. Kept as acknowledged. They now say so explicitly (node: null, reason: "predates kit node recording"), and each one needs a real --node the next time its story or component changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants