Repository navigation
FIX-1502: the organization's inventory in the DevTool (ER-Devtool row 5) - #2147
Conversation
…X-1502) The seat, channel and membership collections now carry `client.state.read` with named fields (`expose`), the same shape the hired roster already has. A session reads its own organization's rows through the ordinary collection route; the organization is the session's, never the request's. Prefix, scope, sharing and the no-options signature do not move. V1 (two organizations through the real channel kind and writer, with the body/query/header, no-read and extra-key controls), V2 (the manifest with the inventory on and off) and V5 (a fired seat is still listed, today's behaviour) extend cross-org-collection-read.test.ts. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qaz1VpRK4wCQzxpjzZ4Hz
…tion's inventory (FIX-1502) The tab appears when the session's manifest lists any readable inventory collection, found by its published key pattern. One section per collection: seats with kind and channels, channels with kind, members and registration time, memberships. A collection the flow does not declare reads "not installed on this flow"; a refused or failed read names its status and how far it got; neither is drawn as an empty list. Every page is read. Every word says "registered". Every request goes through a new `resourceClient` on the DevTool's shared, bearer-aware client set. V3, V3a and V3b in inventory-view.test.tsx; the panel wiring in devtool-panel.test.tsx. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qaz1VpRK4wCQzxpjzZ4Hz
…oal grades row 5 multi-seat-collab's served config now runs the documented boot in-process before the first request: the channel kind built with the inventory on, `openChannels`, then `openInventory` under the lab's organization, refusing to serve when it reports a problem. `GOAL_CONTROL=no-inventory` skips the inventory half. The driver can serve with the debug endpoints off and wait for the server to exit. the-checklist-rows gains a row-5 leg (row5.mts): another organization's rows planted first, the lab served with FSDEV_DEBUG_ENDPOINTS=0, the store graded against the tree and across a second boot before the screen, then the Inventory tab read by id with nothing expanded, in view on both axes, over the production read. goal.md records row 6's live read as deferred (epic D11). Also: the spec's owner-decision citations point at the epic's D10, and minor changesets for @flow-state-dev/workforce and @flow-state-dev/devtool. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qaz1VpRK4wCQzxpjzZ4Hz
…-private Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qaz1VpRK4wCQzxpjzZ4Hz
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_d2c2b698-d09e-42c7-a350-055f6c8ee046) |
…ade reds Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qaz1VpRK4wCQzxpjzZ4Hz
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. |
…ol Inventory tab - Live Inventory page: "From a browser" subsection under "Reading the inventory" (manifest lookup by pattern, paged listCollectionItems, org comes from the session, row fields, 404 on an unknown ref). - workforce README: a short paragraph on the browser read after the inventory collections table. - DevTool overview: new "Inventory" section after "Task boards". Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qaz1VpRK4wCQzxpjzZ4Hz
|
docs-editor verdict (FIX-1502): Generated by Claude Code |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qaz1VpRK4wCQzxpjzZ4Hz
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da02b92058
ℹ️ 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".
…led read (FIX-1502) A server that keeps returning a nextCursor would have held the Inventory tab in its loading state forever. The read now stops at the same 1000-page bound the shipped panel readers use, and on a cursor it has already seen, and the section names why instead of showing rows or an empty list. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qaz1VpRK4wCQzxpjzZ4Hz
The problem
Someone running a hired workforce cannot find out, from the DevTool, who is in their organization: which seats exist, which channels exist, and who is in which. The app writes that inventory, but no browser read reaches it, and the only view is the debug panel, which is off wherever the app really runs. This is ER-Devtool checklist row 5, the last row W5 builds.
What this does
The three inventory collections now let a session read its own organization's rows, with named fields, through the ordinary collection route. The DevTool gains an Inventory tab on any session whose flow declares one of them: seats with their kind and channels, channels with their members and registration time, and memberships. Everything is labelled registered. A collection the flow does not declare reads not installed on this flow, and a refused read names its status; neither is drawn as an empty list. The
multi-seat-collablab gains the documented boot (open the channel, then the inventory), and the checklist goal gains a row-5 leg graded live with the debug endpoints off.It does not add an organization picker, filter to seats that are working now, or wire the kitchen-sink's inventory.
What's asked of you
Nothing new. This implements the approved direction: D1 (the inventory becomes readable by the organization's own sessions) and D2 (row 5 means registered), both signed on 2026-09-24.
Parts worth reviewing closely
The rest of this is for whoever reviews the code.
packages/devtool/src/react/components/workspace/inventory-view.tsx+lib/inventory.ts: absent, failed and empty. Is there any path where a refused, failed or undeclared collection renders as an empty table? A wrong answer is the exact hollow state the row exists to prevent: an operator reads "nothing registered" when the read was refused.goals/devtool-workforce-visibility/the-checklist-rows/row5.mts: step 6. Is "no debug read succeeded, and none was aimed at an inventory ref" the right reading of the plan's "no request under/debug/"? The shipped DevTool's own Resources panel asks/debug/resourceson every session it opens, so a literal "no request" can never hold; the leg asserts that request is refused and the page reports debug disabled. A wrong reading lets rows read off the debug route pass.goals/multi-seat-collab/lab/host.mtsopenLab: the boot now runs inside the served config, before the first request, and throws whenopenInventoryreports a problem. FIX-1497's own check still drives the same lab; see below for its re-run.Where I'm least sure: the manifest-read failure path. If the session's manifest read fails, the tab is hidden rather than shown with an error (a failed manifest leaves no way to say which collections exist). V3a proves the token is sent on the manifest request; the hidden-on-failure choice itself is a judgement call.
Deliberately not here: a row-6 leg (deferred by epic D11), a public inventory panel, the kitchen-sink's inventory boot (FIX-1455).
Spec (merged in #2138) · FIX-1502 · epic FIX-1457 W5 · merges on the owner's approval
How to review this — altitude, what's in scope, what's deliberately unsettled
Engineering calls — decided along the way, no product sign-off needed
fix/FIX-1502; the commits keep the plan's split (workforce, devtool, goals) so each can be read alone. Cost if wrong: a larger review surface than PR-A/PR-B/PR-C would have been.resourceClienton the DevTool context, built bycreateDevToolResourceClient(baseUrl, bearerToken)beside the session and recovery clients, so a credential change rebuilds it with the rest. Cost if wrong: a reader bypassing it would 401 in any app with a resolver (V3a is the guard).members), so BR-13's disagreement stays visible./debug/" as: no debug read succeeded, none was aimed at an inventory ref, and the Resources panel reports disabled. The shipped Resources panel asks/debug/resourceson every session, so the literal reading cannot hold on any DevTool build.500 DispatchFailed.expose) are module-private constants, one per collection, naming every field the row schema declares today.minorfor both packages: a published collection gains a browser read, and the DevTool gains a tab.Everything else — verification, red states, the FIX-1497 re-run, files
CI is on the PR's checks; this block records what was run locally and the red states, which CI cannot show.
VG — the checklist goal, 2026-09-24, on
41eb55216:PASS: rows 4 and 5, graded on a live hire.Row 5 withFSDEV_DEBUG_ENDPOINTS=0: the store held exactly the tree's rows (3 seats,eng.queuewitheng.planner, eng.builder, eng.reviewer, 3 memberships), a second boot changed none, the foreign organization's planted rows appeared nowhere, the tab showed every row equal to the store with nothing expanded and in view on both axes, each collection answered 200 on the production read, and the one debug request (the Resources panel's own) was refused 403. Row 6 not read live (epic D11). Full entry in the goal's verdict log.Named controls, same commit:
no-inventory→ FAIL (expected), row 5 only, at step 3: "the lab's organization holds no inventory rows, so there is nothing for the screen to show (the boot did not open the inventory)". Row 4 PASS.silent-park→ FAIL (expected), row 4 only, at the positive record. Row 5 PASS.Hand-made reds on the row-5 leg, each reverted from a copy of the file:
debug_endpoints_disabled) and step 6 "the page asked the debug endpoint for the inventory"openedAtevery bootseatWriternaming a kind that is not servedUnit and integration checks (all green locally):
@flow-state-dev/workforce49 files / 773 tests (with the container'sFSDEV_DEFAULT_MODEL/FSDEV_INTENT_*unset);@flow-state-dev/devtool34 files / 359 tests;pnpm typecheck;pnpm knip:ci; the spec-folder, changeset-ref, model-string, NUL-byte, isolation-coordinate and publish-set validators.Red states for the unit checks, each produced and reverted:
clientline removed → "org-a seat read — the manifest lists no such collection: expected -1 to be 200", "inventory/seats/ on a channel with the inventory on: expected undefined to be defined"*, V5 "expected 403 to be 200".exposeremoved → "a channels row must not carry "secret"".createDevToolResourceClientbuilt with no fetcher (a bare client) → "the manifest request carries the token: expected null to be 'Bearer tok-inventory'".textContentand stayed green under that mutation (it glues "eng.queue" onto "Open"); it now joins text nodes with spaces.Docs: DOCS.md's three operations were published by an isolated
docs-writersession (it read the public surface and DOCS.md only) and reviewed by an isolateddocs-editor, whose verdict is the REVISE comment on this PR; its five fixes are applied verbatim in the last docs commit. Its two suspected inaccuracies: thelimitrange (1–200, default 50) matches the route; the pre-existing "one row per open channel" wording in the README table and the page's intro predates this change and is left for the epic-wrap docs polish.pnpm --filter @flow-state-dev/docs buildexits 0 with no broken-link warnings.FIX-1497's goal and its five named controls, re-run on
41eb55216: every behavioural leg moved exactly as its verdict log records and no further. The unperturbed run's only red is V7, and every control adds V7 beside its own legs (swapped-desks→ V2;ignore-the-answer→ V3;second-principal→ V4;silent-park→ VB screen 2;one-seat→ V2 and V5). V7 is FIX-1497's own diff fence: it fails whenever the branch under test changes anything outsidegoals/andspecs/issues/FIX-1497/, so it is red on this branch (and on any branch touchingpackages/) by construction, not because the lab behaves differently. V0–V6 and VB are green.Files:
packages/workforce/src/inventory/collections.ts(the read);packages/workforce/test/cross-org-collection-read.test.ts(V1, V2, V5);packages/devtool/src/react/{lib/inventory.ts, components/workspace/inventory-view.tsx, lib/client.ts, context/devtool-context.tsx, DevToolPanel.tsx}andpackages/devtool/test/inventory-view.test.tsx(V3, V3a, V3b) plus the panel mocks;goals/multi-seat-collab/lab/{host.mts, fsdev.config.mts, run-scenario.mts, README.md};goals/devtool-workforce-visibility/the-checklist-rows/{row5.mts, run.mts, goal.md}; two changesets;specs/issues/FIX-1502/{DECISIONS,EVOLUTION}.md(D10 anchor); the docs pages listed in DOCS.md.🤖 Generated with Claude Code
https://claude.ai/code/session_016qaz1VpRK4wCQzxpjzZ4Hz