Repository navigation
feat(FIX-2157): Claude Code-style lab, threads mode front end, on fixtures - #3818
Conversation
…to claude/project-thread-i80jta
The Projects view is now threads mode: the main session is the desk.lead coordinator, each thread is a card where the lead filed it, and the right pane is the Threads status board (Pinned, Working, Waiting on you, Ready for review, Resolved), read from the task row alone. A thread's view replaces the board: talk in it, answer its question, resolve it or request changes, pin it. A code change runs as a desk.coder thread tagged Claude Code. The adapter gains sayInThread, resolve, requestChanges and the pins verbs; fixtures play the script until wiring. Also corrects the spec: a task always works in its session's project (ownProjectIn; projectWorkspace refuses other-project). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RNUDVs3QxrstrvHVDuS9a
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
@codex review Please pay special attention to Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RNUDVs3QxrstrvHVDuS9a
Second look + architecture passReviewed against the approved FIX-2157 spec (direction not re-opened). Overall the shape is right: one adapter, 🔴 Fix: fixture crashes on a later line after a code thread
t.title.split(" ").slice(1).some((word) => new RegExp(`\\b${word}\\b`, "i").test(text))Titles were fixed strings before. 🟡 Simplify: drop the cast in
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83cfbc782f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Simplify pass (FIX-2157 threads UI)
Verdict: The overall shape is right for this issue — a fixtures-first lab extension with a small pure columnOf layer, adapter verbs, and four focused components instead of pulling Shift Manager, TaskPlan, or a kanban/DnD stack into a private lab. I would not swap in third-party board libraries here; the right pane is grouped read-only buckets, not draggable lanes, and the repo has no precedent for that in labs.
Where complexity crept in is mostly duplication and subscription fan-out, not the column model or component split.
What I’d simplify before wiring (or in a quick follow-up)
- One
watchTaskssubscription per session —ThreadandThreadsBoardboth subscribe today. Liftingtasks(or atasksByIdmap) toAppand passing props down is the smallest structural win; it also makes the center/board stay in sync without double fixture notifies. tasks.findinside the main-threadentries.map— build aMaponce per tasks snapshot (memoized) before renderingThreadCards.- Review actions — Resolve / Request changes / shared button classes appear in both
ThreadCardandThreadView. Either extract a tinyThreadReviewActions+ shared class strings, or pick one surface for Resolve (the card comment says answering happens in thread view, but Resolve already runs from the card — worth aligning copy, spec intent, and UI so we don’t maintain two paths). - Work transcript —
TaskWorkViewandThreadViewshare the samewatchTaskWork+Entrylist; an in-packageTaskWorkFeedwould shrink the diff without cross-importing shift-manager. - Fixture
sayInThread— the post-answer script is hard-wired to the “Vendor B · regions” narrative. Parameterize bytask.title/ id so other demo threads don’t get misleading copy when you extend the script. - Board polish (optional) —
useNow(true)whileThreadViewis open;pins.includesinside every filter;groupsrecomputed every render — all fine at fixture scale;Set+useMemo+ gating the clock are cheap cleanups.
What I would not chase in this PR
- Merging lab
columnOfwith Shift ManagercolumnFor— different contracts (wait-kind / review column vs stored status only). Correct to keep local. - Wiring
@flow-state-dev/react/TaskPlannow — spec goal is prove UI on fixtures first; SSE-shaped integration belongs in the wiring PR. - Radix
Collapsible/ new UI kit deps solely for ▸/▾ groups unless the lab adopts design-system primitives anyway.
Spec + code bundle
Large retained spec under specs/issues/FIX-2157/ is appropriate for direction; it didn’t force unnecessary runtime abstraction in the lab code. The workforce WORKER.md deltas are proportional.
Skipped (needs product call, not simplify-only)
- Whether Resolve must be available on center cards as well as board/thread view (spec verification is click-based; both may be intentional).
- Global fixture
notify()fan-out — acceptable for the lab; narrow listeners when replacing fixtures with real streams.
Approval: Direction and decomposition look good; remaining items are targeted dedupe and small perf hygiene, not a wrong approach.
Sent by Cursor Automation: Review For Best Approach
|
"Typecheck & Test" failed on 83cfbc7 because its test shards were cancelled when I pushed 7a6a152, which supersedes that commit. No test failed. CI is running on 7a6a152 now. Generated by Claude Code |
- Fixtures advance each thread by its id, mark the line that asked for threads (not one queued behind it), and match a stop line literally. - A finished thread's composer is off (D3); its view points to the main session. - A harness run that completed at the review deadline (review: "deadline") lands in Resolved marked Not reviewed; only "accepted" counts as approved (FIX-2163). DECISIONS notes it, dated. - The vocabulary check lets the lab's workers say "thread", Claude Code's threads mode, not a mailbox's. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RNUDVs3QxrstrvHVDuS9a
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RNUDVs3QxrstrvHVDuS9a
|
@codex review Head abd031e changes three things. It fixes the four findings: thread lookup by id, marking the originating line, the composer off on a finished thread, and literal stop matching. It adds a Not reviewed mark on a Resolved harness run whose review field is "deadline" (FIX-2163). It adds a check-retired-terms exception so the lab's worker files may say "thread". Please check that exception's scope, and check that only Generated by Claude Code |
|
"Process guards" failed on 7a6a152. Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RNUDVs3QxrstrvHVDuS9a
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abd031e4fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…nizer for both sides Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RNUDVs3QxrstrvHVDuS9a
|
@codex review On 4fd624d, the stop line picks the task whose title shares the most words with the line, using one tokenizer for both. Generated by Claude Code |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Code Snob — a smaller shape exists, on 4fd624df.
Fold 476f00aa3 from draft #3822 onto 4fd624df. Do not fold a747360ff (that commit was against 7a6a152, before the review fixes). Do not reset onto the POC branch. The POC body still names a747360ff; this note is the one to follow. Close #3822 unmerged after this PR lands.
file,fileThread, and the seeded rows are onestartTask.progress,settle, andadvancecall onewriteStep. Threads still advance by the filed id.- Drop
LINE_LABEL. The status line readsCOLUMNS. The cast onstatusColumnonly indexed that copy. A deadline completion still says Resolved · not reviewed. SplittingcolumnOfand overlaying pins in the board is the longer shape. - One View thread button. Comments that restated the next function are one line. The verb table already names
sayInThread,resolve,requestChanges, andwatchPins.
Net −70 (+52/−122) against 4fd624df. pnpm --filter @flow-state-dev/claude-code-style test: 42 passed. writeStep returning immediately failed 9 (Acme stayed in progress; review cards stayed working, including two code requests with one title and the finished composer).
Left: rowNote (moving it next to statusLine ties), the two banners (the words are shorter than a lookup), the separate adapter verbs, the stop-line tokenizer, and the not-reviewed mark.
Sent by Cursor Automation: Code Snob
…eads COLUMNS Folded from Cursor's 476f00a (draft #3822), keeping the doc comments on exported functions and components (BP-007). Co-Authored-By: Cursor Agent <cursoragent@cursor.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RNUDVs3QxrstrvHVDuS9a
|
Folded 476f00a in 779601b, with the shared Generated by Claude Code |
|
Resolve conflicts |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5baeaffd02
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Architect: not approving yet. This PR has merge conflicts with its base — FSD Architect |
Resolves two conflicts in the lab's fixtures. The stop lookup keeps FIX-2157's tokenizer and best-score match, and takes FIX-2153's rule that the named task can already be finished. The settle step keeps writeStep and takes the answerAgain comment. The README inventory is regenerated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RNUDVs3QxrstrvHVDuS9a
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RNUDVs3QxrstrvHVDuS9a
9da17aa to
94abcf4
Compare
|
This PR is now rebased onto the current #3793 branch (
Generated by Claude Code |
* feat(FIX-2153): Claude Code-style lab front end, on fixtures The session-mode screen of the FIX-2152 Claude Code-style lab: sessions on the left, the main thread in the center, read-only background tasks on the right. Everything goes through one adapter of verbs; until the package pieces land (FIX-2158, FIX-2159) fixtures play the scripted session on a timer. Adds the lab's inventory check (config, React UI, small flows; checks and fixtures listed apart) with a planted-file control, and screen tests for the mid-turn result card and stopping a task through the main session. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Afupg1DNVRUaS1VEW2HnMn * fix(FIX-2153): keep background task steps running when the turn is interrupted The fixture kept a turn's steps and its tasks' later steps in one timer list, so Stop froze both research tasks in progress. Task steps now live in their own list that Stop leaves alone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * fix(FIX-2153): one new session under StrictMode; scroll the tasks list StrictMode replays the mount effect, so the dev page opened two blank sessions; a ref now keeps it to one per adapter. The tasks list had no bounded scroll region, so a long list overflowed the pane and squeezed the open task's work to nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * feat(FIX-2153): the view sets the mode: Sessions and Projects switch Per product's change, a session's mode comes from the view a person is in, not from a choice at New session. The left pane gets a Sessions / Projects switch (Projects disabled until threads mode), lists only the view's sessions, and New session opens straight into the view's mode. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * feat(FIX-2153): each view keeps its own open session; mid-turn card maps to the loop-back flow Follows #3788 at 350aa36: a view remembers its open session when you switch away and back, and the mid-turn result card is fed by the lab's loop-back flow at wiring rather than waiting on FIX-2159. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * fix(FIX-2153): reset the thread per session so a draft can't go to the wrong one Thread kept its composer state across a session switch, so a draft typed in one session sent through the next. Thread is now keyed by the session id. Also runs the step-4 screen test at 1/20 speed: at 1/100 the card had ~22ms inside the turn and a loaded run could miss it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * fix(FIX-2153): stop the task the person named, and never cancel a finished one The fixture's stop script took the first running task whatever the line said, and cancelled it after a delay without checking it was still running. It now matches the task named in the line and re-reads its status before cancelling. Covered by fake-timer tests of the adapter. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * feat(FIX-2153): a project per session: New session asks for one, the header shows it Spec D3 (#3788 at af5f9a2): a session works in a project picked at New session, with no default. Two adapter verbs, listProjects() and openSession(mode, project), run on fixtures until FIX-2161. The app opens on the picker instead of a blank session, the header names the project, and a session with none shows "Choose a project" in place of the composer, so nothing runs without one. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * fix(FIX-2153): don't send on Enter that confirms an IME composition Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * feat(FIX-2153): offer only projects the person may work in The fixture's project list follows projectWorkspace()'s rule: a member of a shared project or the owner of a private one. A project the person can only read is left out, and opening a session on it is refused with not-a-member. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * docs(FIX-2153): name answerAgain and setWorkProject as the wiring targets Follows the spec at 0a92ed6: the mid-turn result comes from the lab's answerAgain source block (FIX-2159), and a session's project is set by setWorkProject (FIX-2161). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * docs(FIX-2153): the mid-turn result is answerAgain: true, not a lab block Follows the spec at 6111c3b: with FIX-2159 merged, the main worker sets answerAgain: true and the lab writes no block. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * fix(FIX-2153): a stop line names a task even after it has finished Resolving the name only among running tasks fell through to the other running task, so "Stop Acme" after Acme settled cancelled Globex. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw * feat(FIX-2157): Claude Code-style lab, threads mode front end, on fixtures (#3818) --------- Co-authored-by: Claude <noreply@anthropic.com>
…on IME Enter (#3827) * fix(FIX-2154): keep a draft with its worker, and don't send on IME Enter The conversation is keyed by session, so switching workers starts an empty composer instead of carrying a draft to the wrong worker. Enter that ends an input method's composition no longer sends. Codex review on #3818. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0147y64Do6d4RkSqzyXhUyKg * test(FIX-2154): a plain Enter still sends after an IME Enter is ignored Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0147y64Do6d4RkSqzyXhUyKg * fix(FIX-2154): ignore Safari's committing IME Enter (keyCode 229); name the draft test for what it proves Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0147y64Do6d4RkSqzyXhUyKg --------- Co-authored-by: Claude <noreply@anthropic.com>


The problem
The Claude Code-style lab has only its Sessions view. Threads mode, the closest familiar app to Shift Manager's coordinator and task board, had a spec (#3792) but no screen. The package pieces it needs are still being refactored, so wiring waits, but the UI can be built and seen now.
What this does
It adds threads mode to the lab on fixtures, behind the same adapter as session mode. It matches the spec's UI design.
desk.lead, a coordinator. New session asks for a project first, as in session mode.src/lib/columns.ts, the spec's columns table), and the lab keeps no status of its own.desk.coder, tagged Claude Code. When it's ready for review, the judge's verdict shows as information.sayInThread,resolve,requestChanges,watchPins,pinandunpin. The fixtures play the script, and the README names the gap or package piece each one stands for. The new gaps are FIX-2163 (the review wait) and FIX-2164 (step progress).lead,threadandcoder, as the spec writes them. Theharness-threadandpinsflows come at wiring, with the host.Acceptance is the UI only. This PR is not progress on the goal check, which runs at wiring with a real model.
Screenshots are in the project files under
FIX-2157/:threads-board-light.png,threads-question-light.pngandthreads-harness-light.png.What's asked of you
Nothing new. The direction is the merged spec. Merge order: after #3788 and #3793.
Parts worth reviewing closely
src/lib/columns.ts: the one table. A failed task lands in Waiting on you, and a held task with no open question stays in Working.src/components/ThreadView.tsx: when the thread is ready for review, the box feeds Request changes and there is no Send. Otherwise your line is a steer.src/fixtures.ts: the threads and code scripts, andsayInThread,resolveandrequestChanges. The last two do nothing unless a review is open.Stacked on #3793 (FIX-2153's front end). Base:
claude/project-thread-m4a4yn. This branch also mergesclaude/project-thread-ul1hzg, because #3792 merged into #3788's branch after #3793 was cut. That is why the diff shows the FIX-2157 spec files. They are #3788's own text, already reviewed, and they drop out once #3793 picks up its base. This PR makes no spec edits of its own.Spec:
specs/issues/FIX-2157/· Linear FIX-2157 · epic FIX-2152 · merges after #3788 and #3793.How to review this
This implements an approved spec. The approach and the numbered decisions in its
DECISIONS.mdare already signed off by a human, so please review the code against that direction, not the direction itself. The canonical set is retained atspecs/issues/FIX-2157/. Linear links to it and to the original merged spec PR, which keeps the review history.Most valuable here: correctness on the second path (the legacy shape, the null boundary, the concurrent case, the cancel path), anything deriving an auth or routing decision from caller-controllable input, and a behaviour the tests assert around rather than on.
Already settled upstream: the approach and every decision in the spec's
DECISIONS.md, and the conventions indocs/contributing/best-practices.md.Evidence
pnpm --filter @flow-state-dev/claude-code-style test: 37 pass. These are 7 new threads-mode screen tests, 11 column cases, 2 new fixture tests, and the 17 session-mode tests (the view test is updated now that Projects is enabled).columnOf, 4 screen tests fail.node scripts/inventory.mjs: PASS, 43 files, no other row.--controlfails as required.check-retired-terms: PASS.No changeset: the lab is private.
https://claude.ai/code/session_017RNUDVs3QxrstrvHVDuS9a
Generated by Claude Code