Repository navigation
FIX-2479 s2: resource names in client, react and devtool - #4915
Conversation
client: CollectionItemHandle, CollectionItemState, Create/ListCollectionItem*Options, DebugCollectionItem*, and the resources/debug methods take resource naming. The debug route's URL is unchanged. react: useResourceCollectionItem becomes useCollectionResource. devtool: useDebugCollectionItems becomes useDebugCollectionResources, CollectionItemRow becomes CollectionResourceRow, inventory's WorkerRow read model becomes WorkerView, and message #11 says "collection resources". Every use in the tree follows; no aliases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UNkLD7mJaky2QRikkQ8Z4
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Codex Review Summary: ✅ CompletedThis 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 and architecture passVerdict: the approach is right. This is a pure rename with no aliases, and the scope is sensible. I grepped the PR head for the old names ( Findings
Architecture opportunities tied to this PR
Nothing here needs to hold the merge. Item 1 is a one-line decision, and item 2 is a confirmation against the glossary. Generated by Claude Code |
Mechanism check (advisory, never blocks)Rows from
|
| Every other error and refusal message that said *row* follows one rule: *task* where the row was a task (dispatch, the task board, the ledger), *resource* elsewhere, and *collection resources* for *collection items*. In this release that covers the dispatcher's and `defineFlow`'s task-entry errors, the faceted and owner-writes collection errors in `core`, the parent-task, owner-run and cross-board errors in `engine`, the schedule-index warning in `scheduled`, and the DevTool's "Failed to fetch collection resources" (was "…collection items"). | ||
|
|
||
| Docs: the published glossary and collections pages, the task-substrate refusal tables (`external-dispatcher` becomes `external-flow-runner`), the run's plan section of the coding-agents page (`planResourcesPrefix`, `resourcesPrefix`), the create-check section of state and scopes (`readCollectionResource`), and the six pages that quote the owner-collection messages. packages/workspace/README.md (a worktree record is `WorktreeResourceState`, its `state` field is typed `WorktreeStatus`, parsed with `worktreeStatusSchema`). | ||
| Docs: the published glossary and collections pages, the task-substrate refusal tables (`external-dispatcher` becomes `external-flow-runner`), the run's plan section of the coding-agents page (`planResourcesPrefix`, `resourcesPrefix`), the create-check section of state and scopes (`readCollectionResource`), and the six pages that quote the owner-collection messages. packages/workspace/README.md (a worktree record is `WorktreeResourceState`, its `state` field is typed `WorktreeStatus`, parsed with `worktreeStatusSchema`). packages/client/README.md (the collection types are `CollectionResourceHandle`, `CollectionResourceState`, `CreateCollectionResourceOptions`, `ListCollectionResourcesOptions`; the debug types are `DebugCollectionResource`, `DebugCollectionResourcesResponse`, `ListDebugCollectionResourcesOptions`; the methods are `listCollectionResources`, `createCollectionResource`, `getCollectionResourceState`, `getCollectionResourceContent`, `deleteCollectionResource`, and on `sessions.debug` `listCollectionResources` and `fetchCollectionResourceContent`). packages/react/README.md (the one-resource hook is `useCollectionResource`, returning `UseCollectionResourceResult`; the panels' client slice picks `resources.listCollectionResources`, or `resources.getCollectionResourceState` for `WorkerDetail`). The published client, React, collections, client-access and workforce pages name the old client methods and `useResourceCollectionItem`. |
There was a problem hiding this comment.
💡 Quality: Changeset Docs line leaves out two pages that still use the old names
Per repo policy, user docs aren't edited in a normal PR. /release-docs rewrites them later, using the changeset's Docs line as its list. That line names packages/client/README.md, packages/react/README.md and the published client, React, collections, client-access and workforce pages. It leaves out two pages that still use the removed methods. packages/workforce/README.md tells readers to call listCollectionItems` from `@flow-state-dev/client. apps/docs/guides/writing-ui-stories.md says a fake client needs resources.listCollectionItems and resources.getCollectionItemState, but this PR changed the fixtures in packages/ui/stories/fixtures/workforce.ts to the new names. The release pass will miss both pages, so they will keep pointing at methods that no longer exist. Add both pages to the Docs line.
Add the two missing pages to the changeset's Docs line:
... packages/react/README.md (...). packages/workforce/README.md (the collection read is `listCollectionResources`). The UI-stories guide (a fake client needs `resources.listCollectionResources` for the list panels and `resources.getCollectionResourceState` for `WorkerDetail`). The published client, React, collections, client-access and workforce pages name the old client methods and `useResourceCollectionItem`.
Was this helpful? React with 👍 / 👎
There was a problem hiding this comment.
Confirmed on this branch: packages/workforce/README.md:1443 and apps/docs/guides/writing-ui-stories.md:86 still name listCollectionItems / getCollectionItemState. This finding is marked optional, so it won't trigger a push here on its own. The fix will ride the next push to this PR. If none comes, it goes into the final FIX-2479 slice, which finishes .changeset/resource-names.md: that slice adds both pages to its Docs: line before the chain merges, so /release-docs receives them.
Generated by Claude Code
There was a problem hiding this comment.
Understood. The finding stays open as a non-blocking suggestion. Adding packages/workforce/README.md and apps/docs/guides/writing-ui-stories.md to the Docs: line in the final FIX-2479 slice, before the chain merges, will get both pages into /release-docs. No change is made on this PR.
Code Review 👍 Approved with suggestions 0 closed / 1 findings🔴 High risk · Removing old client and React collection API names without aliases breaks existing consumers, which may fail to compile until migrated. Renames the collection item resource names across 💡 Quality: Changeset Docs line leaves out two pages that still use the old names📄 .changeset/resource-names.md:59 Per repo policy, user docs aren't edited in a normal PR. Add the two missing pages to the changeset's Docs line🤖 Prompt for agentsVerificationRules No rules evaluated Functional validation Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Stacked on #4913 (FIX-2479 s1, the foundation packages). This PR is the one above it; its base is
fix/FIX-2479-s1-foundation, and GitHub moves it ontomainwhen #4913 merges.Problem. Someone building on
clientandreactmeets a resource in a collection called an item:CollectionItemHandle,client.resources.listCollectionItems,useResourceCollectionItem. The DevTool says the same, down to its error "Failed to fetch collection items".What this does. It is the second sub-PR of FIX-2479. Every name below is renamed and each use in the tree changes with it. No aliases are kept (BP-034):
clientCollectionItemHandle,CollectionItemStateCollectionResourceHandle,CollectionResourceStateclientCreateCollectionItemOptions,ListCollectionItemsOptionsCreateCollectionResourceOptions,ListCollectionResourcesOptionsclientDebugCollectionItem,DebugCollectionItemsResponse,ListDebugCollectionItemsOptionsDebugCollectionResource,DebugCollectionResourcesResponse,ListDebugCollectionResourcesOptionsclientresources.{list,create,delete}CollectionItem(s),getCollectionItemState,getCollectionItemContentlistCollectionResources,createCollectionResource,deleteCollectionResource,getCollectionResourceState,getCollectionResourceContentclientsessions.debug.listCollectionItems,fetchCollectionItemContentlistCollectionResources,fetchCollectionResourceContent(URL path unchanged)reactuseResourceCollectionItem,UseResourceCollectionItemResultuseCollectionResource,UseCollectionResourceResultdevtool(internal)useDebugCollectionItems(+ options/result),CollectionItemRow,WorkerRow/toWorkerRowinlib/inventory.tsuseDebugCollectionResources,CollectionResourceRow,WorkerView/toWorkerViewMessage #11 of
app-visible-text.mdnow reads "Failed to fetch collection resources". The changeset.changeset/resource-names.mdgets the client and react rows, the devtool message, andpackages/client/README.mdandpackages/react/README.mdon itsDocs:line, naming each renamed root export.What's asked of you. Check that the names read right, and the three calls below.
Parts worth reviewing closely
PanelRow,PanelRows,usePanelRows,PanelItem,usePanelItem,PanelRowSourceandPanelItemSourcelive inreact/src/components/panels/reads.ts. That file sits in the glossary's UI-list path exemption (components/panels/), so per the dispatch they keep their names. Only the client methods theyPickchange.PanelItemsays item for a resource, andreads.tsreads data; it renders nothing. If the whole-tree slice reads that exemption as "renders a list" and not as the path, these get renamed then.FlowNavigatorRow,SessionRowState,TaskRowActionsandTaskRowBodystay, because they are rendered rows.CollectionItemRow→CollectionResourceRow. It is a rendered tree row, so Row stays. CollectionItem goes, because the resource rule'sdeclaresItemrefuses it wherever it sits.WorkerRow→WorkerView, notWorkerResourceState. It is a two-field display projection ({ id, kind }), not the stored worker, and workforce's realWorkerResourceStatelands in its own slice.…Viewfollows the spec'sTaskViewStatus.itemand the debug response'sitems, the same rule s1 applied..changeset/one-name-client.md(FIX-2449, pending in the same release) namedCollectionItemHandle. It now namesCollectionResourceHandle, so/release-docsdoesn't document a name that won't ship.apps/docs, the package READMEs) still name the old methods and hook. CI forbids editing them here, and/release-docsrewrites them from the changeset.Verification.
turbo typecheckpassed 40/40 tasks across client, react, devtool, harness-manager, shift-manager, workforce, node, ui, goals, teammates, claude-code-style, design-system and kitchen-sink. Vitest: client 266 passed, react 584, devtool 469, plus every touched test file in harness-manager (10), shift-manager (14), node (2) and labs/teammates (12).node scripts/check-root-exports.mjs origin/mainPASS: no new failing root name and no collision. The renamed client/react names are cleared by the changeset's README mention, as listed.check-retired-termsPASS,validate-changeset-refs✓. This is a pure rename, so it owes no tdd red/green.Spec:
specs/issues/FIX-2479/· Linear: FIX-2479 · Epic: FIX-2600 · Below in the stack: #4913Generated by Claude Code