Repository navigation
spec(FIX-1662): App Lab shell: sidebar, project and workstream views, and the contextual panel over a Lab's Workforce tree - #2424
Conversation
Retained spec set: a Lab opens through its own fsdev config (D1), a workstream is a declared channel and its boards (D2), four PRs with the frame first (D3). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
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 review: FIX-1662 specVerdict: The scope is right. Almost all of it traces to epic rules ER-1, ER-5 and ER-15. Two small pieces could go. The PR is spec-only (Markdown plus 4 SVGs), so it gives no code to refactor. I have no The ~4,500-line implementation figure is a rough forward estimate from 14 surfaces and 28 rules. It is not measured.
1. Parked-row questions. The spec's own decision says Inbox is "the pending approvals and questions in seats' sessions", read through the session's suspensions. BR-27 adds a second source (board rows) and a rule that a parked row with a reason counts as a question. The shell would be inventing that model, which ER-5 forbids. It also adds a second read to S3 just to draw an entry that can't be acted on. What you give up is seeing a parked row with no suspension in Inbox. FIX-1652 can add it when it defines the ask. 2. V9. It reads as leg-b readiness, but two existing checks already cover it:
V1 already covers startup over multi-seat-collab. A temp copy adds a fixture and a startup path that proves nothing further. Outside my lane (not sized)
Considered and deemed justified
These are advisory findings for the implementing agent to accept or decline. Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e78dac166
ℹ️ 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".
| |---|---|---|---| | ||
| | BR-1 | App Lab is started with a Lab's config | It serves that config's `FlowState` and its own pages from one process; the Lab's config is not edited or wrapped | CI · goal check | | ||
| | BR-2 | The config does not load, or its default export is not a `FlowState` | App Lab refuses to start and prints the loader's own message | CI | | ||
| | BR-3 | The Lab's server refuses a request for want of a verified organization | App Lab shows a screen that says so. No sidebar read is made | CI · goal check | |
There was a problem hiding this comment.
Provide an identity probe before requiring zero sidebar reads
For an organization-less browser request, this refusal cannot be rendered under the specified static-SPA architecture without first making an API read: serve() serves static files without invoking the Lab's principal resolver, and the public routes invoke it only while processing a resource, session, or action request. FlowState.resolveInProcessPrincipal() is server-only and cannot validate the browser's request credential, and there is no public current-principal endpoint. Add a dedicated authenticated identity route/probe (and allow the resulting request), or relax the requirement that no sidebar read occurs; otherwise BR-3 and V2 cannot be implemented.
AGENTS.md reference: AGENTS.md:L181-L183
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Correct: list_flows/capabilities resolve no principal and no route reports one on its own. Fixed in 7e590f0 as a correction, not a change of approach. The gate is now App Lab's first read being refused. The refusal screen renders, nothing from the tree is drawn, and no further read is made (BR-3, V2, DECISIONS → Decided). The org gate is still the Lab's own resolver, and no identity route is added.
Generated by Claude Code
|
|
||
| | # | When | Then | Proved by | | ||
| |---|---|---|---| | ||
| | BR-24 | Inbox opens | Every pending approval and question in the org's seat sessions, oldest first, with kind, task where known, workstream and wait; All, Approvals and Questions each count exactly theirs | Goal check | |
There was a problem hiding this comment.
Add an org-wide read before promising every seat's asks
When two people own sessions in the same organization, the existing /sessions listing cannot supply this Inbox: handleListSessions always scopes an authenticated query to both the resolved userId and orgId, and its userId query parameter can only narrow, never widen, so one person cannot discover another member's seat sessions. The only direct suspension listing is explicitly a privileged DevTool/debug API, while this spec forbids FSD package changes and rejects an org-wide ask endpoint. Either add the required authorized org-wide aggregation surface or narrow BR-24 to the current principal's sessions; otherwise the central Inbox silently omits valid asks.
AGENTS.md reference: AGENTS.md:L181-L183
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed against handleListSessions: an authenticated listing is scoped to the caller's userId and orgId, and the query can only narrow it. Folded in 7e590f0, taking the narrowing option. The spec already rejects an org-wide ask read and makes no FSD package changes. BR-24 now lists the asks in the seat sessions the person can list, and Inbox says in a line that other members' asks are FIX-1652's. DECISIONS (Decided, Considered and dropped, How it got here) and DOCS are updated to match.
Generated by Claude Code
| | S4 | `labs/app-lab` · the frame | Three columns; the routes and the right panel's slot ([pinned](#pinned-names)); tab in the URL; centre tabs mounted lazily | ER-1 BR-17 | | ||
| | S5 | `labs/app-lab` · the sidebar | Org switcher, Jump to (⌘K, incl. resources), Inbox and Tasks with counts, PROJECTS (workstreams directly while no projects ship), TEAMS with workers below each team, footer | BR-6 to BR-11 | | ||
| | S6 | `labs/app-lab` · the project level | Route and tabs Stream, Board, Workstreams, Brief, each its named empty state (FIX-1650); team strip from the inventory | BR-9 | | ||
| | S7 | `labs/app-lab` · the workstream level | Stream (transcript, registry cards, composer), Board (`BoardColumns` from `react` over BR-12's map), Brief (charter), Results (empty state) | BR-12 BR-13 BR-14 BR-18 to BR-22 | |
There was a problem hiding this comment.
Replace BoardColumns where statuses must be merged
Using the shipped BoardColumns cannot implement BR-12's five-column mapping: the component fetches rows itself and always creates separate columns for pending, in_progress, blocked, parked, completed, errored, and cancelled; its slots can rename headers but cannot merge pending+blocked, parked+errored, or completed+cancelled. A mapped source would merely add unknown-status columns after the seven built-ins. Specify an App Lab grouping view instead, or explicitly change the component API, so the implementation does not produce duplicate/extra columns.
AGENTS.md reference: AGENTS.md:L181-L183
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed: groupIntoColumns makes one column per status and can't merge them. Fixed in 7e590f0 as a correction. S7's board is now App Lab's own five-column grouping over BR-12's map. BoardColumns isn't used for it, and no FSD package changes.
Generated by Claude Code
There was a problem hiding this comment.
Simplify review (spec PR)
Verdict: The core approach looks like the right simplification versus kitchen-sink’s workforce-shell pattern and versus inventing a second host or per-Lab codegen. D1 (load the Lab’s existing fsdev.config and serve App Lab’s static UI the way fsdev dev serves the devtool) reuses an established path (loadFsdevConfig + @flow-state-dev/node serve) instead of new framework surface. D2 (workstream = channel + attached boards, named empty states elsewhere) avoids a shell of hollow rooms while staying honest about what ships today. Rejecting FlowNavigator for the product sidebar and keeping the devtool as debugger are consistent, defensible cuts.
What follows is not a challenge to those decisions; it is where the plan may still be heavier than D3 claims, and what I’d tighten before or during implementation.
Where complexity may outrun the stated PR split
PR frame is still most of the product. On paper D3 is “frame first, then two parallel slices,” but frame bundles S1–S6, all of S11 (full fsdev ui add registry copies), and S12. That is org gate, shared reads, full sidebar (including Jump to), four project tabs plus team strip, routes/slot, and byte-equal registry plumbing before workstream/Inbox code exists. V8 also ties registry byte-equality to S1–S11 while copies may have no in-app consumer until later PRs.
Cleaner alternative (spec-only tweak): Narrow frame to S1–S5 + S4 routes/slot + S12 — defer S11 to the PR that first renders each card (workstream / inbox-tasks), and keep S6 to route + tab chrome + empty-state props unless ER-1 truly needs team strip before workstream work lands. That would make D3’s “review-sized chunks” match the DAG.
“Mirrors four kitchen-sink files” (PLAN removed note) risks file-by-file parity drift. The behavioral reference you actually need is channel post semantics + three-column regions; wiring should go through inventory + Roster / SeatDetail / BoardColumns in @flow-state-dev/react, not re-copying workforce-shell data paths.
Shared reads (S3): good idea, needs sharper contract
Centralizing reads is the right guardrail against N+1 badges and duplicate sidebar fetches. The spec is lighter on:
- What “one read per resource per refresh” means — mount vs route change vs mutation vs Retry only. Without pinning invalidation, parallel
inbox-taskswork can accidentally multiply fetches. - Shape of batched seat session reads — BR-24 implies org-wide pending asks; if each batched call returns full transcripts and the client filters, cost scales with seats × history, not pending count. Worth one sentence in S3 or a BR addendum: projections for list surfaces, full session on detail select (BR-25).
- Cold start — ER-1 + BR-6/15/24 mean first paint wants inventory, full task rollup, and full Inbox list. That is an accepted v1 tradeoff (server org ask list explicitly rejected in DECISIONS); FIX-1652 is the exit. UI should still default to virtualized lists and a single in-memory task index feeding BR-8, Tasks counts, and TEAMS status.
Established packages: cmdk is already a dependency (packages/ui, kitchen-sink) — Jump to should reuse that pattern rather than a bespoke palette. For S3 caching, leaning on TanStack Query (or the same client cache pattern devtool uses) is simpler than a one-off refresh layer, as long as V3/VG still enforce “no duplicate read per resource per session navigation.”
Scope that is heavy but mostly inherited
- Project level (S6) with four empty tabs is hollow until FIX-1650, but ER-1 owns it — I would not cut it without an epic amendment (ER-10).
- Registry copies (S11) feel duplicative next to kitchen-sink, but ER-6 / epic D2 require copy-in + re-sync; avoiding copies would reopen the epic, not simplify this issue.
- 28 BRs + V1–V9 + VG — strong traceability; consider marking which checks are PR-local CI vs goal-only so implementers do not build two harnesses for the same assertion (e.g. board status matrix once, navigation breadth in VG).
Nits
- D3 prose says four PRs; figure file is
d3-three-prs.svg— rename or relabel so sign-off matches artifacts. - DevForce board not channel-attached (follow-up) is honestly called out; closure leg (a) “Tasks or board → task” on DevForce stays blocked until channel attach — good that it is not smuggled into FIX-1662.
Summary
Direction: approve. The config-hosted static app is the cleaner architecture; a separate labs/app-lab package cloned from apps/devtool’s shell (not folded into devtool or kitchen-sink) matches epic boundaries.
Before implementation merges frame, I’d shrink that PR’s deliverables and spell out S3 refresh + session projection rules so performance and D3 stay aligned. None of that requires reopening D1 or D2.
Sent by Cursor Automation: Review For Best Approach
|
|
||
| | id | Deliverables | depends_on | | ||
| |---|---|---| | ||
| | `frame` | S1 to S6, S11, S12; the README without the level sentences | — | |
There was a problem hiding this comment.
D3’s value is review-sized chunks; this row still puts S6 (full project level) and S11 (all registry copies + V8 byte-equal gate) in frame before workstream/Inbox exist. Consider deferring S11 to workstream/inbox-tasks and trimming S6 to route + tab shells + empty copy props unless ER-1 forces more here — otherwise frame is still a whole-product merge.
There was a problem hiding this comment.
This doesn't change the approach, so it's recorded word for word in PLAN.md → Notes from review for the implementer to take or leave when splitting frame.
Generated by Claude Code
| |---|---|---|---| | ||
| | S1 | `labs/app-lab/` · package | New private package `@flow-state-dev/app-lab`: a Vite React app shaped like `apps/devtool`, plus a start script that loads a Lab's config with `@flow-state-dev/cli`'s `loadFsdevConfig` and hands it to `@flow-state-dev/node`'s `serve(flowstate, { staticDir })`, bound to loopback unless the Lab resolves a verified principal (the `fsdev serve` guard) | BR-1 BR-2 | | ||
| | S2 | `labs/app-lab` · the connection | Reads user and credential the way the devtool shell does; a refused or org-less principal renders the refusal screen before any read | BR-3 ER-4 | | ||
| | S3 | `labs/app-lab` · the shared reads | One module every surface reads through: the seat and channel inventory, each channel's attached boards, sessions per seat, pending suspensions. One read per resource per refresh, shared by counts, badges and screens; per-seat reads batched | BR-4 BR-7 BR-8 BR-11 | |
There was a problem hiding this comment.
S3 is the right simplification vs per-row sidebar fetches. Worth one explicit contract in this plan: refresh triggers (boot, mutation, manual Retry — not every route change) and session read shape (pending-ask projection for Inbox list; full session only on detail). Without that, batched per-seat reads can still devolve into O(seats × transcript size) per refresh.
There was a problem hiding this comment.
Recorded in PLAN.md → Notes from review, along with the review body's notes on virtualized lists and the cache layer. S3 now also reads only the sessions the person can list (BR-24 fold), which limits the per-refresh cost.
Generated by Claude Code
| | S13 | `goals/app-lab/it-opens-a-lab/` | The goal check: `goal.md`, `run.mts`, both controls | the goal | | ||
| | S14 | Docs | [DOCS.md](DOCS.md): `labs/app-lab/README.md`, `labs/README.md` row | ER-14 | | ||
|
|
||
| **Removed:** nothing. Kitchen-sink's `lib/workforce-shell.ts` stays; App Lab mirrors |
There was a problem hiding this comment.
Naming four kitchen-sink files to mirror invites file-by-file drift. A shorter “shape reference” (three columns + panel slot + channel post semantics) plus react primitives (Roster, SeatDetail, BoardColumns) and workforce/browser transcript types is probably enough — implementer shouldn’t re-wire SHELL_BOARDS-style static maps.
There was a problem hiding this comment.
Recorded in PLAN.md → Notes from review for implementation. One caveat is noted there too: BoardColumns can't draw BR-12's merged columns (see S7).
Generated by Claude Code
| - **Draft**: framed as the place a Lab is used; opened through the Lab's own server config, read | ||
| at runtime; workstreams drawn over shipped channels and boards; four PRs, frame first. | ||
|
|
||
| **Open: none.** |
There was a problem hiding this comment.
Sign-off and PLAN say four PRs (frame, workstream, inbox-tasks, goal); the linked figure is d3-three-prs.svg. Small doc hygiene: rename or update the figure title so reviewers don’t think D3 is three merges.
There was a problem hiding this comment.
Fixed in 7e590f0: the figure is renamed to figures/d3-four-prs.svg. Its content already said four.
Generated by Claude Code
| | S2 | `labs/app-lab` · the connection | Reads user and credential the way the devtool shell does; a refused or org-less principal renders the refusal screen before any read | BR-3 ER-4 | | ||
| | S3 | `labs/app-lab` · the shared reads | One module every surface reads through: the seat and channel inventory, each channel's attached boards, sessions per seat, pending suspensions. One read per resource per refresh, shared by counts, badges and screens; per-seat reads batched | BR-4 BR-7 BR-8 BR-11 | | ||
| | S4 | `labs/app-lab` · the frame | Three columns; the routes and the right panel's slot ([pinned](#pinned-names)); tab in the URL; centre tabs mounted lazily | ER-1 BR-17 | | ||
| | S5 | `labs/app-lab` · the sidebar | Org switcher, Jump to (⌘K, incl. resources), Inbox and Tasks with counts, PROJECTS (workstreams directly while no projects ship), TEAMS with workers below each team, footer | BR-6 to BR-11 | |
There was a problem hiding this comment.
Jump to (⌘K) is a real product surface. cmdk is already in the repo (packages/ui, kitchen-sink) — plan could nudge implementers to reuse that command palette pattern rather than a one-off search UI, with index built once per S3 refresh (debounce + result cap).
There was a problem hiding this comment.
|
Not owner approval / not the gate. Shared Coherence: pentest (epic leg b) vs multi-seat-collab (FIX-1662 goal) — intended split, not a forkJake’s second-look asked whether this child substituting multi-seat-collab and leaving the pentest host config to FIX-1663 conflicts with FIX-1649’s leg b. Checked against the merged epic (#2421 /
That matches the child’s own “Bigger, and not this issue’s” cell (second-Lab + no-App-Lab-paint → FIX-1663) and “Not here: … pentest lab’s host config (FIX-1663).”
No conflict with open siblings: #2425 (FIX-1655), #2423 (FIX-1649 workstream ownership amend only), #2420 (project never-merge). No duplicate Lab-shell / App Lab / sidebar / workstream-view / contextual-panel PR in flight. Owner advisory findings (Inbox = suspensions only; drop V9) and the |
Inbox lists asks in the seat sessions the person can list (the shipped listing never widens past the caller); parked rows without a suspension stay out of Inbox. The org gate is the first read's refusal. The board is App Lab's own five-column grouping, since BoardColumns can't merge statuses. Figure renamed to d3-four-prs. Below-the-bar feedback recorded in PLAN.md -> Notes from review. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
|
Spec review, round 1 (head 7e590f0) Folded, because the approach changes:
Fixed as corrections, with no change to direction:
Recorded in PLAN.md → Notes from review for the implementer:
Dropped: pentest vs multi-seat-collab. The Architect comment already answered it as an intended split. D1 to D3 are unchanged. Open: none. Generated by Claude Code |


fsdev dev, and watches it in the devtool, a debuggerGoal: a person starts App Lab over a Lab and, in a browser under that Lab's organization, reaches every place the shell promises, sees the Lab's real teams, workstreams, boards and asks wherever Workforce ships a read, sees a named empty state wherever it doesn't, and can post in a workstream's stream.
The check grades the screen against what the store holds, never a fixture. Check:
goals/app-lab/it-opens-a-lab/, real Chromium, model n/a; controlsGOAL_CONTROL=static-namesandGOAL_CONTROL=optimistic-postmust FAIL first. Why this goal: SPEC.md.One Lab config, two things that can serve it; App Lab reads everything from the running Lab rather than a list in its own code.
How: App Lab is a static app plus the shipped Node host. It loads the Lab's
fsdevconfig, serves thatFlowStatewith its own pages, and reads the inventory, boards, sessions and asks through routes the Lab already serves. No FSD package changes.Sign off
The goal, at that size. If wrong: we ship a shell of empty rooms, or one that only knows the Lab it was built beside.
A Lab opens through the server config it already needs; App Lab adds no code to it · D1
It comes down to the kinds' inputs: a harness, a model and a workspace are the Lab's, so App Lab can't build them. If wrong: every Lab carries a small config file, and a Markdown-only Lab waits for zero-argument kinds.
A workstream is a declared channel and its boards, until FIX-1650 and FIX-1651 say more · D2
<img src="
https://raw.githubusercontent.com/fixpoint-labs/flow-state-dev/1e78dac16604a6057006439d4a4245cc2fbb3061/specs/issues/FIX-1662/figures/d2-channel-workstream.svg"width="940" alt="D2: a declared channel and its boards, chosen, beside empty everywhere until FIX-1651. Decides it: what a person can do on day one. Price: addresses keyed on channel id" />It comes down to day one: channels and boards ship now, and FIX-1651's signed composition is channel plus boards. If wrong: FIX-1651 defines a workstream that isn't a channel, and addresses move.
Four PRs: the frame first, then the workstream level and Inbox with Tasks in parallel, then the goal check · D3
It comes down to review size, and FIX-1664 can build once the frame merges. If wrong: more merges than the work needs.
Open: none. D1 is the one to weigh. Reasoning and what lost: DECISIONS.md.
Reviewers · look here
fsdev gen"; this picks the runtime loader run inside the Lab's own config, because the goal labs' kinds are factories needing a harness or a model. Is a per-Lab host config acceptable as "no shell code"?Not here: the task screen (FIX-1664), the theme values (FIX-1655, after the final hand-back), the pentest lab's host config (FIX-1663).
Spec · Decisions · Rules · Plan · Docs · Linear FIX-1662 · epic FIX-1649 (spec PR #2421,
specs/epics/FIX-1649/) · merges after human approval and required checks (contract)How to review this — altitude, what's in scope, what's deliberately unsettled
This is a direction set, not an implementation. Reviewing it well means
answering one question: is this the right approach?
In scope to challenge:
SPEC.md— is the goal the real need at full size,for the people named, or a smaller goal that would let us call this done early? Would the
named check fail if the goal were not met?
docs/philosophy.md?DECISIONS.md— that's the sign-off surface.BUSINESS-RULES.mdmisses, or a rule that would invalidate the design.DOCS.mdand their fit with the rules; a missing ormisleading lineage claim in conditional
EVOLUTION.md.Out of scope — deliberately unsettled here, and owned by the implementing agent:
PLAN.mdpins on purpose.PLAN.mdleft open on purpose — it is directional by design, and a gap at thataltitude is intended, not an omission.
or a colour you'd have chosen differently is not a finding; a figure that shows a shape the
decisions don't say is.
PLAN.mdmay include a rough pseudocode sketchshowing the shape of the proposed solution. It is knowingly incomplete, is not real code,
and is not what will ship. Review it for directional viability only. Do not report
that it lacks error handling, omits edge cases, names things that don't exist in the repo, or
wouldn't build: all of that is true on purpose.
poc/are retained,not production code. Read them for directional evidence, not production completeness.
Their isolation from production/default discovery and absence of secrets or generated
dependencies are in scope; retention is not permission to weaken repository checks.
One request, if you are an automated reviewer: the two lists above are the whole difference
between a useful review of this document and a long one. Volume is not signal here — a single
finding above the line is worth more than twenty below it.
Feedback in the second list is welcome and gets recorded verbatim in
PLAN.md → Notes from reviewfor the implementer to weigh against real code. It will not be argued with, and itwill not be folded into the design prose. Please don't re-raise it: one mention is enough.
The one exception is the sketch and the POC. Line-level feedback on either is dropped, not
recorded — there is nothing for an implementer to weigh about code that isn't shipping. Feedback
about their direction is not line-level and is treated like any other above-the-bar finding.
Direction approval does not waive merge-time required checks, approvals or thread policy.
Optional comments do not require another design round merely to reach zero comments.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
Generated by Claude Code