Skip to content

feat(fork): remove Petals from web - #606

Merged
NoahHendrickson merged 5 commits into
customfrom
t3/remove-petals-web
Nov 29, 2026
Merged

NoahHendrickson merged 5 commits into
customfrom
t3/remove-petals-web

Conversation

@NoahHendrickson

@NoahHendrickson NoahHendrickson commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Petal bots are being removed (owner, 2026-11-29). This is steps 1 and 2 of context/petal-removal-scope.md: move the shared parts out of Petal files, then remove every Petal surface from the web client. Sprints and coordinators run on the same bot machinery, so that machinery stays. Only the Petal face goes.

What's removed

  • The sidebar's Petals section, its grid and List/Grid picker, its Compact cards option, and the New petal row
  • Mascots: the art, the mascot menu, the thread details Mascot section, the collapsed-strip mascot track, and the done-celebration hop
  • The "give this thread to a Petal" crew menu
  • The digest dock above a Petal's composer
  • The Petal Threads panel and the Petal empty conversation
  • Petal seeding and Petal rules refresh
  • The Automations page's "By Petal" grouping
  • The Petal Storybook stories and Code Connect files, the Petal docs section, the fork-bot-crew and fork-bot-rules-refresh manifest entries, and the Petal CSS

What moved or stays (sprint machinery)

  • The list sections' fold store moved to custom/SidebarV2ListSection.tsx. It still decodes the old "bots" value, so a saved fold never resets.
  • The run revision behind a sprint's folder reads now lives in client-runtime (fork-thread-runs-revision, with a test). Web reads it directly, and the mobile digest uses it through an alias until mobile drops Petals.
  • The rules-refresh engine has one mode, the sprint's. Its behaviour is unchanged.
  • From review:
    • BotMascot.tsx became BotHeaderIcon.tsx. It draws the Package04 and workflow icons.
    • The empty-conversation slot is sprints/SprintEmptyConversation.tsx SprintEmptyConversationOr.
    • isListedBot became isListedSprint.
    • Sidebar.tsx's trailing group is back inline, so Sidebar.tsx has no fork-bots fences left.
    • The wider bots//Bot* → sprint rename is a follow-up PR after the removal steps (owner's call).
  • Kept: the bot tag, isBotThread, unread from the server report, work attention on sprint cards, the shared panel frame, list, rows and controls, sprint starters, quiet wakes, failure alerts and useBotThreadCreation.
  • fork-bot-digest is trimmed to what mobile still uses. Mobile keeps its grid and digest until step 3.

A thread tagged bot alone

The thread list now hides only sprints (isSprintThread). A bot-only thread (a Petal from before the removal; the owner confirmed none exists anywhere) lists as an ordinary thread, so it can be found and archived. Its bot-work: threads list too. It gets no Threads panel, and its mascot tag is ignored.

Figma

The Basic UI kit keeps the Petal components on one archive page, "Archive · Petals" (118:8), where the owner merged them through the Kit bridge. The 7 Petal component sets are marked ARCHIVED in their descriptions. The Sidebar block components hide (not delete) the New petal row, the Petals header and the Petal cards. The design-lint B6 stamps for the stories this touches are re-recorded against their kit nodes, or marked not in the kit.

What I checked

  • vp run check:changed: format, lint, knip, design lint, typecheck (45 packages), 176 test files, 16 browser test files and react compiler all pass.
  • node .fork/design-lint.mjs --check is clean after rebasing onto fix(fork): restamp the 15 B6 stories #605 left stale #612. The B6 stamps for the stories this touches are re-recorded against their kit nodes, or marked not in the kit.
  • The web fork guards and every custom/ test pass (239 files, 1679 tests), and so do the Sidebar and ChatView browser suites and the client-runtime tests.
  • node .fork/lint-owned.mjs passes, and its no-untranslated-copy baseline drops from 965 to 903.
  • Headless real-client pass against a seeded scratch dev server (Replay provider, no page errors):
    • Sprints and Coordinators sections render, and there's no New petal row.
    • Opening a sprint shows its header icon, inline question and approval cards, and work-report rows.
    • The sprint panel's Threads, Pull requests, Goal, Library, Instructions and Memory tabs all work.
    • Opening a child thread from the panel works.
    • Coordinator panel child rows work.
    • New sprint creates a sprint, which lists, gets its folder seeded with rules v11, and runs a turn when sent a message.
    • A bot-only fixture opens as a plain conversation with no panel and no mascot. This pass ran before the listing change, when that fixture was hidden; it now lists as an ordinary thread, which the guard tests pin.
    • The Automations page renders without the group-by control.
  • I didn't recheck the server work-report and wake paths here, because this PR doesn't touch them.

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


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

  • Review: GPT-6.1 Sol (gpt-6.1-sol, high effort) via Codex in T3 Code, two rounds of review, no findings

🤖 Generated with Claude Code

@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 bc5245ec4d594995e8b99026ce9e4be0aa5d9899. Not an approval.

The deletion itself is clean. No file crosses 1k lines (Sidebar.tsx shrinks by ~250 to 6013), knip is green, and nothing Petal-only is left exported. The problem is what was left behind. The bot layer now has exactly one listed kind (a sprint), but its abstractions were kept in their two-kind shape, with comments reworded to explain why. Several of them are now single-variant modes, a copied helper, or names that no longer describe what they hold. That is easiest to collapse now, while the Petal context is fresh, not after step 3.

1. Duplicated canonical helper (blocker). useSprintReadKey adds SETTLED_RUN + sprintRunsRevision, a verbatim copy of botDigestRevision in packages/client-runtime/src/forkBotDigest.ts. That one is still exported, tested in forkBotDigest.test.ts, and imported by mobile (no3yBotDigestAnswers.ts). Now two copies of a "run status only moves forward" invariant can drift, and the web copy has no test. The manifest already treats botThreadRowPullRequests as a function that outlives the digest. Do the same here: move botDigestRevision (as e.g. threadRunsRevision) into a neutral client-runtime module that web and mobile both import, so step 3 can delete forkBotDigest without orphaning it.

2. Single-variant modes left in place. Each of these existed only to tell a Petal from a sprint, and now has one value:

  • refreshFolderRules: kind: "sprint" is a one-literal union, and the withoutRules: "write" branch is dead (only refreshBotRules passed it). The "engine" has one caller, refreshSprintRules. Drop both options, or fold the engine into the sprint module and keep only the shared RulesSeedFile type.
  • BotThreadsPanel.tsx: ROW_DENSITY is a one-entry lookup. Inline the three class strings.
  • Sidebar.tsx: trailingGroup was hoisted into a value (df3d53d) so SidebarV2BotCardBody could place it. It now has one use site, yet it still sits under a fork-bots fence with a rewritten comment. Put it back inline where upstream renders it. That deletes a fence and shrinks the fork's delta in a 6k-line upstream file. The fork-bots fence around useSidebarV2CollapsedListSections also no longer belongs to fork-bots.

3. Names that no longer describe what they hold. BotMascot.tsx has no mascot. BotHeaderMascot draws the Package04 and workflow icons, and BotEmptyConversation is just "sprint starters, else fallback". BotThreadsPanel.tsx has no BotThreadsPanel. isListedBot now means "live sprint". Each of these needed its doc comment and its design-rules entry rewritten to explain the gap. A reader has to hold "bot = sprint, except tags, except leftovers" in their head. Rename them to what they are: BotHeaderIcon (or move it next to the section icons), let the timeline call SprintEmptyConversation directly, and use isListedSprint (or define the bot predicate once in sprint terms). Either do the renames here, or name the step in petal-removal-scope that does them.

4. "Lists nowhere" comes from two predicates disagreeing. A leftover Petal is hidden from the threads because filterSidebarV2VisibleThreads keys on isBotThread (the tag). It is missing from the Sprints section because isListedBot now keys on isSprintThread. The result is a thread that is invisible but still wakes on a schedule. The PR documents that state in four places (Sidebar.logic, botThreads, botWork and the manifest) instead of letting it fall out of one model. If the threads filter keyed on the same predicate as the section (isListedBot), the leftover would list as an ordinary thread that can be found and archived, and the special case and its comments would go away. That is a behavior change, so it's a question, not a demand, but it's the code-judo version of this.

Smaller: in ChatView, the panel ternary's trailing null arm can't be reached now that botThreadsPanelBotId only returns sprints and coordinators. Fine to leave, but isSprint ? Sprint : Coordinator would read more directly.

Comment thread apps/web/src/components/Sidebar.tsx Resolved
Comment thread apps/web/src/custom/bots/BotMascot.tsx Resolved
Comment thread apps/web/src/custom/bots/botThreads.ts Resolved

@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: bc5245ec4d594995e8b99026ce9e4be0aa5d9899

I found no correctness bugs. The deletions don't leave any live callers behind, and the new logic holds up:

  • isListedBot now keys on the sprint tag.
  • The Threads panel's bot id now keys on isSprintThread.
  • The fold store moved to SidebarV2ListSection.tsx and still decodes the old "bots" value.
  • useSprintReadKey now computes its own run revision.

Five minor findings, all nits. Three are inline. Two are on lines outside the diff, so they're here:

Stale mobile header comments. apps/mobile/fork/forkBots.ts:1-4 says it mirrors apps/web/src/custom/bots/botThreads.ts, botMascotTags.ts and is "parity-guarded in no3yMobileRedesign.test.ts". apps/mobile/fork/botMascotArt.ts:1-4 says it copies apps/web/src/custom/bots/botMascotArt.ts and that "the no3yMobileRedesign guard pins every sprite to the Mac's". This PR deletes botMascotTags.ts, botMascotArt.ts and that parity test. Someone editing mobile mascot or listing rules could assume a guard protects the change when nothing checks it. Suggest rewording both comments to say the mobile copies are now the only source until step 3.

User docs drop Petals while iOS still shows them. The whole Petals section of docs/user/thread-sidebar.md (old lines 215-286) is deleted. Mobile keeps its Petal grid, digest and mascots until step 3, so an iOS user who looks up the feature finds nothing. Suggest keeping a short mobile-only note until mobile drops them, or moving the deletion to step 3.


🤖 Review: Claude Opus 5.5 (claude-opus-5-5) via Claude Code /code-review (high)

@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: 1c30bbe · 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.

NoahHendrickson pushed a commit that referenced this pull request Nov 29, 2026
Share the run revision from client-runtime, give the rules refresh its one
mode, inline the panel row's type and the sidebar's trailing group, name the
header icon and the starters' slot for what they draw, rename isListedBot to
isListedSprint, and list a bot-only thread as an ordinary thread.

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

Copy link
Copy Markdown
Owner Author

Answers to the out-of-diff nits in the code review:

  • Stale mobile header comments: fixed in 8d2b6e1. apps/mobile/fork/forkBots.ts and botMascotArt.ts now say they're the only copy, with no guard comparing them to the Mac, until mobile drops Petals (step 3).
  • User docs drop Petals while iOS still shows them: declined. The owner confirmed no machine has a Petal left: this Mac's were deleted, and no other machine had any. So no iOS user can see one, and the step 3 PR removes the grid next.

Also on this PR: custom's own CI Lint has been red since #602 merged, with 13 stale design-lint B6 stamps (CheckboxPill, ComposerCardParts, DraftProjectMenu, Glyphs, ListItem, SidebarControls, SidebarSectionHeader, StageHeaderControls, StarterCard, StatusMark, ThreadCardMeta, ThreadHookRow, Icons). This PR's Lint and Check fail on exactly those 13. This PR clears the two Petal stamps among the 15 that custom reports and adds none.

Sol (GPT-6.1 Sol, high effort) reviewed 8d2b6e1 in round 2 and approved it with no findings.

xxxxxxxxxxxxx and others added 5 commits November 29, 2026 17:06
Petals are gone from web: the Petals section, grid and layout picker, the New
petal row, mascots and the mascot menu and details section, the crew menu, the
digest dock, the Petal panel and empty conversation, Petal seeding and rules
refresh, the Automations By Petal grouping and the done hop. Sprints keep the
bot machinery they run on: the bot tag, the fold store, work linking, panels,
reports and the wake limits. A Petal left on another machine lists nowhere,
and its work lists as ordinary threads.

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

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Share the run revision from client-runtime, give the rules refresh its one
mode, inline the panel row's type and the sidebar's trailing group, name the
header icon and the starters' slot for what they draw, rename isListedBot to
isListedSprint, and list a bot-only thread as an ordinary thread.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NoahHendrickson
NoahHendrickson merged commit 886efca into custom Nov 29, 2026
33 checks passed
@NoahHendrickson
NoahHendrickson deleted the t3/remove-petals-web branch November 29, 2026 22:20
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