Repository navigation
feat(fork): remove Petals from web - #606
Conversation
NoahHendrickson
left a comment
There was a problem hiding this comment.
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 thewithoutRules: "write"branch is dead (onlyrefreshBotRulespassed it). The "engine" has one caller,refreshSprintRules. Drop both options, or fold the engine into the sprint module and keep only the sharedRulesSeedFiletype.BotThreadsPanel.tsx:ROW_DENSITYis a one-entry lookup. Inline the three class strings.Sidebar.tsx:trailingGroupwas hoisted into a value (df3d53d) soSidebarV2BotCardBodycould place it. It now has one use site, yet it still sits under afork-botsfence 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. Thefork-botsfence arounduseSidebarV2CollapsedListSectionsalso 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.
NoahHendrickson
left a comment
There was a problem hiding this comment.
Code review: bc5245ec4d594995e8b99026ce9e4be0aa5d9899
I found no correctness bugs. The deletions don't leave any live callers behind, and the new logic holds up:
isListedBotnow keys on the sprint tag.- The Threads panel's bot id now keys on
isSprintThread. - The fold store moved to
SidebarV2ListSection.tsxand still decodes the old"bots"value. useSprintReadKeynow 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)
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
bc5245e to
428bf5b
Compare
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>
428bf5b to
8d2b6e1
Compare
|
Answers to the out-of-diff nits in the code review:
Also on this PR: Sol (GPT-6.1 Sol, high effort) reviewed 8d2b6e1 in round 2 and approved it with no findings. |
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>
8d2b6e1 to
1c30bbe
Compare
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 samebotmachinery, so that machinery stays. Only the Petal face goes.What's removed
fork-bot-crewandfork-bot-rules-refreshmanifest entries, and the Petal CSSWhat moved or stays (sprint machinery)
custom/SidebarV2ListSection.tsx. It still decodes the old"bots"value, so a saved fold never resets.fork-thread-runs-revision, with a test). Web reads it directly, and the mobile digest uses it through an alias until mobile drops Petals.BotMascot.tsxbecameBotHeaderIcon.tsx. It draws the Package04 and workflow icons.sprints/SprintEmptyConversation.tsxSprintEmptyConversationOr.isListedBotbecameisListedSprint.fork-botsfences left.bots//Bot*→ sprint rename is a follow-up PR after the removal steps (owner's call).bottag,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 anduseBotThreadCreation.fork-bot-digestis trimmed to what mobile still uses. Mobile keeps its grid and digest until step 3.A thread tagged
botaloneThe thread list now hides only sprints (
isSprintThread). Abot-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. Itsbot-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 --checkis 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.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.mjspasses, and itsno-untranslated-copybaseline drops from 965 to 903.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.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 Codegpt-6.1-sol, high effort) via Codex in T3 Code, two rounds of review, no findings🤖 Generated with Claude Code