Repository navigation
feat(FIX-2153): Claude Code-style lab front end, on fixtures - #3793
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
@codex review |
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. |
Second look + architecture pass (read-only review)Overall: the approach earns its scope. A single Worth fixing in this PR
Minor, optional
Architecture notes (no change needed here)
Nothing here blocks the acceptance claimed (layout, mid-turn card, stop via main session on fixtures). Item 1 is the only one I would hold the PR for. Generated by Claude Code |
There was a problem hiding this comment.
/simplify review — FIX-2153 lab front end
Verdict: The layered shape (adapter seam, timer fixture, inventory guardrail, tri-pane React shell) is heavier than a throwaway demo, but it matches what the spec and FIX-2152 ER-1 are trying to prove: the app adds only config + UI + small flows, gaps are named, and the five-step UX can be exercised before wiring. I would not replace this with a single static mock page or by importing Shift Manager components — you would lose the watch/push behavior the fixture script and screen.test.tsx are buying, or blur the package boundary.
A smaller lab that only screenshots layout could ship with ~200 lines of static JSON and no inventory.mjs; that would be simpler code and weaker evidence for leg (a). For this PR’s stated goal, the approach is defensible.
What looks like excess (worth trimming now or at wiring)
| Area | Observation | Simpler path (if you want less surface) |
|---|---|---|
components.json |
shadcn config + @/components/ui alias, but no components/ui and hand-rolled controls |
Drop until first fsdev ui add, or one README line that it is install scaffolding only |
| Docs triplication | Verb→package table in README, long adapter.ts header, fixtures.ts header |
Keep README/spec; shorten adapter to a pointer |
useWatch → undefined |
Forces ?? [] / optional chaining everywhere though watches emit synchronously on subscribe |
useSyncExternalStore or defined empty defaults on first emit |
createLabAdapter() |
One-line wrapper; tests import createFixtureLab directly |
Forward FixtureOptions (e.g. speed) through createLabAdapter so tests use the same entry as production |
modes.ts |
Two modes, one disabled | Fine for D1/D6; could colocate in SessionsList until Threads ships |
task-status.ts |
Seven statuses; fixtures use three | OK if wiring parity is intentional; otherwise trim to rendered statuses |
lib/utils.ts + tailwind-merge |
Three cn() call sites |
Inline clsx until shadcn components land |
| Third column placeholder | Empty aside when pane !== "tasks" |
Collapse to two columns until FIX-2157 |
What I would not simplify away
LabAdapterverbs — thin, stable seam for FIX-2158/2159 wiring (aligned with shift-manager’s client layer, without importing that app).fixtures.ts~277 lines — annoying, but it encodes mid-turn result cards, queued sends, interrupt, and post-turn background progress; static snapshots do not cover that without reintroducing a mini simulator anyway.scripts/inventory.mjs— bespoke, but it is the ER-1 closure (--wired, plantedglue.tscontrol). Not a good candidate for a npm package; shared script only pays off if more labs copy the same rules.workforce/teams/desk/**— inert at runtime today, but inventory counts it as config the real app will ship; matches devteam / docs conventions.- Design tokens —
@flow-state-dev/design-system+ vendoredtokens.cssmirrors shift-manager; correct reuse.
Performance / fixture mechanics (non-blocking)
- Global
notify()re-runs every watcher (sessions sort included) on each fixture step — fine at lab scale; narrow subscriptions only if session count grows. endTurnclears thetimersarray withoutclearTimeoutwhile latervendorScriptsteps still fire — looks like a leak but is intentional (Globex progress after the main turn ends). A one-line comment there would prevent a future “fix” that breaks the demo.useNow(1s)inThreadre-renders allEntryrows; isolate elapsed UI in a child if threads get long.
Reuse at wiring (not this PR)
- Types:
TaskStatusfrom@flow-state-dev/orchestrationinstead of a parallel union. - UI/stream:
@flow-state-dev/react+ client patterns frompackages/shift-manager(serve-labtests,readConversationTasks). - Vite:
recordBuildInputs+.fsdevignore whenfsdev.config.mtslands (shift-manager already has this).
Skipped (larger than this diff)
- Shared
createFsdevAppViteConfig()— two consumers. - MSW / recorded SSE fixtures — no repo precedent; timer fixture matches current verification story.
- Merging lab into shift-manager — contradicts FIX-2153 scope.
Approval: No blocking concerns for a fixture-phase PR; the complexity tracks the epic evidence model. Optional nits above are polish, not direction changes.
Sent by Cursor Automation: Review For Best Approach
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4cc5ceb225
ℹ️ 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. Three Codex P2s are still open and look real: the StrictMode effect replay can create two sessions on mount ( — FSD Architect |
There was a problem hiding this comment.
Code Snob — already tight. No POC.
Read src/adapter.ts, src/fixtures.ts, src/modes.ts, src/App.tsx, src/lib/use-watch.ts, src/lib/task-status.ts, src/lib/utils.ts, Composer.tsx, Entry.tsx, SessionsList.tsx, TasksPane.tsx, Thread.tsx, scripts/inventory.mjs, cli/index.ts, tokens.css, styles.css, both tests, and the lab README. cli/index.ts, styles.css, and cn match the Shift Manager app contract and registry scaffold this lab is supposed to copy.
A rewrite would not shrink the contract.
- The seven verbs are the wiring seam, and each has a caller.
createLabAdapteris the one function wiring replaces. The header table is the binding column beside those verbs. say/file/progress/settleare the script in its short form. A data table plus an interpreter repeats those bodies and adds an op type. FlatteningSession.rowreplacestouch()with the same assignments.FixtureOptions.nowhas no caller; removing it leaves the screen the same size.modeByIdandmodeOfWorkerare the two directions of the recorded mode rule. The disabled Threads row is the menu that rule and the test both require.useWatch,useNow,age,elapsed, andTASK_STATUSeach have a caller.cnis what letsborder-primarywin overborder-transparent. One component per pane is already the split; merging the files keeps the same lines.inventory.mjsis the check this issue owns: classify, README table, 200-line flows,--control,--wired. Writing the README twice is the short way for it to count its own lines.cli/index.tsandtokens.cssare the copied launch module and the registry tokens item.
The screen tests are the six UI claims. A shared “Compare Acme” helper costs about what it saves.
Sent by Cursor Automation: Code Snob
…terrupted 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
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
|
@codex review Head 312a16c fixes your three findings. Please look hardest at the fixture's split between turn steps and background steps in Generated by Claude Code |
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
|
@codex review Head 1d16cef replaces the New session mode menu with a Sessions / Projects view switch, so the view now sets the mode. Please look hardest at Generated by Claude Code |
…to claude/project-thread-m4a4yn
…aps 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
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d16ceff6d
ℹ️ 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 613a7e701e
ℹ️ 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".
…e 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
…ished 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
|
@codex review Head 9b99211 fixes the P1 (Thread is now keyed by session) and both stop-script P2s. Please look hardest at the stop path in Generated by Claude Code |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…to claude/project-thread-m4a4yn
…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
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85e73492ff
ℹ️ 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".
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw
…to claude/project-thread-m4a4yn
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
|
@codex review Please review d5ec70f. Two areas I'd like checked closely. First, the project rule in Generated by Claude Code |
|
Codex Review: Didn't find any major issues. Keep them coming! 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". |
…point-labs/flow-state-dev into claude/project-thread-m4a4yn
…gets 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
|
Codex Review: Didn't find any major issues. Delightful! 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". |
…to claude/project-thread-m4a4yn
…to claude/project-thread-m4a4yn
…lock 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
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a3b2a0a29
ℹ️ 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".
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
|
@codex review Please review 9c851c3, in particular the stop-line task lookup in Generated by Claude Code |
|
Codex Review: Didn't find any major issues. You're on a roll. 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". |
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
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


Requested by Jake · project thread
Stacked on #3788 (the FIX-2153 spec, merged in at 6111c3b). Base:
claude/project-thread-ul1hzg. When #3788 merges, retarget tomain.Also carries threads mode now. #3818 (FIX-2157, the threads-mode front end, stacked on this PR) was merged into this branch at cbe5b43. Its description is the record for that part. After the merge, all 43 lab tests pass, the inventory passes with 43 files, and typecheck is clean.
What this does
Adds the front end of the Claude Code-style lab (
labs/claude-code-style), session mode, on fixtures. It matches the spec's UI design: sessions on the left, the main thread in the center, background tasks on the right, read only.src/adapter.ts, one interface of verbs (watchSessions,listProjects,openSession,send,interrupt,watchThread,watchTasks,watchTaskWork). Until wiring,src/fixtures.ts(markedfixture:) plays the five-step script on a timer. At wiring the fixtures are deleted and each verb calls the package (FIX-2158; FIX-2161'ssetWorkProject;respond;listTasks). The mid-turn result card reads the item the take emits when the main worker setsanswerAgain: true(FIX-2159), so it needs no change at wiring.src/modes.tsnames each mode's view, main worker and right pane. A session's mode is read from its worker and never stored.projectWorkspace()applies to a run; a project they can only read is left out, and opening a session on it is refused withnot-a-member. The header showsin project: <name>. A session with no project shows "Choose a project" in place of the composer, so nothing runs without one.listProjects()andopenSession(mode, projectId)run on fixtures until FIX-2161.scripts/inventory.mjsis the ER-1 check FIX-2154 copies. It sorts every file into config, React UI, small flows, checks or fixtures, writes the README's "what this app adds" table, and fails on an other row, a flow over 200 lines, or (with--wired) a fixture that is left.desk.mainwith delegatedesk.researcher, and theresearchskill) are written now as config. The host andfsdev.config.mtscome at wiring.Acceptance is the UI only. This PR proves the layout, the project question, the mid-turn result card and stopping through the main session, on fixtures. It is not progress on the goal check, which runs at wiring with a real model.
Evidence
pnpm --filter @flow-state-dev/claude-code-style test: 43 pass after feat(FIX-2157): Claude Code-style lab, threads mode front end, on fixtures #3818's merge. Of those, session mode accounts for 18: 11 screen tests in happy-dom, 4 fixture tests and 3 inventory tests.data-during-turnisfalse).isComposingand Safari'skeyCode 229; it fails with either half of the guard removed.node scripts/inventory.mjs: PASS, 43 files, no other row.--control(a plantedsrc/glue.ts) fails as required, and a real planted file and a 230-line flow both fail.check-retired-termsPASS.FIX-2153/:app-project-picker-light.png(the question at New session),app-project-header-light.png(mid-turn, with the project in the header), andapp-views-light.png(the view switch).No changeset: the lab is private.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Y9TRWA2LdDYuigzG4MLQQw