Repository navigation
refactor(web): project creation, the sidebar filter and wording go back to upstream - #456
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
aa8eb31 to
70a3002
Compare
bryantderosier
left a comment
There was a problem hiding this comment.
Reviewed this as part of the 454–457 stack. No code defects and no security issues. Everything here is stale docs/comment text, and all of it is still wrong at the top of the stack.
- FORK.md case 15b (line 101) still says the
onProjectSelectedfolder carrier (case 13) is unchanged. This PR deletes it. - FORK.md case 42 (line 295) rebase check still says to verify the "SQ1 callbacks", which are gone.
- FORK.md case 23 doesn't record the Sidebar edits for child-row rename and section (
renamingChildThreadKey,childSection), and saysuseThreadRowReadsgets "the visible rows" whenSidebar.tsxpasses every thread. A sync that follows case 23 as written would drop those edits. - D9 says the person "never creates, names or sees a Squadron", but Squadron names still show in the playbook author picker (
PlaybookLibrarySettings.tsx) and as the Fleet/Inbox fallback when no project resolves. Carve those out or record the loss. - Nit: the
SquadronDirectory.tscomment says the read is shared by "the gate and every scope control". Both are gone.
| 22. B4's typed confirmation presentation seam: `apps/web/src/confirmDialog.ts:4-31,92-158` extends only the in-memory `requestConfirmDialog(message, options, presentation?)` coordinator state with optional `ReactNode` content and `confirmLabel`; `apps/web/src/components/ConfirmDialogHost.tsx:57-67,79-116` renders the typed node and label when present and otherwise keeps its existing string title/description plus `Confirm` path. The host has no J5 import, payload decoding, or private prefix branch. J5 owns the archive row content in `apps/web/src/j5/a2a/ArchiveWarningContent.tsx:6-130`; `apps/web/src/j5/a2a/archiveFlow.ts:13-17,40-94` builds and passes it for consequential archive facts, with `Archive anyway` only when one or more open asks are measured and `Archive` otherwise. `apps/web/src/components/Sidebar.tsx:3169-3181` plus `apps/web/src/components/LegacySidebar.tsx:1824-1836,2012-2018` use the existing confirmation coordinator to carry the presentation. Existing string callers omit the third argument and remain byte-for-byte on the prior path. Jackson's Variant B title `Archive <agent>?` supersedes the earlier Designer condition that put “anyway” in the question; the explicit button label now disambiguates the action. On every rebase, verify the host stays J5-agnostic, the absent-presentation string branch remains intact, and the three archive doors continue to pass J5-owned presentation only for fact-backed warnings. | ||
|
|
||
| 23. The thread card's J5 identity, Crew chips and spawned children: `apps/web/src/components/Sidebar.tsx` imports and mounts J5-owned `apps/web/src/j5/threads/ThreadCardIdentity.tsx` on the full-card row, passing the thread id, its environment, upstream's own project display name and the persona assignment. The label is the project, as upstream shows it; J5 adds the persona chip, a seat chip on Crew members and the Captain mark on launchers (`apps/web/src/j5/crew/CrewMembershipsClient.ts` and `CaptainMark.tsx`, over the authenticated `POST /api/j5/a2a/client-reads/crew-memberships` read registered in `J5AuthenticatedRoutes.ts`). The list stays flat by recency and no grouping is introduced. The same card mounts J5-owned `apps/web/src/j5/threads/SpawnedChildren.tsx` once, immediately before its closing `</li>`, which renders a collapsed expander of the row's placed children from `SpawnedChildrenClient.ts` (`POST /api/j5/a2a/client-reads/spawned-children`); the nested rows are J5-rendered and never reuse the upstream card component. `Sidebar.tsx` calls J5-owned `useThreadRowReads` once with the visible rows, which requests both reads; they no longer ride inside `useThreadHomes`. Both per-thread stores (`createScopedThreadReadStore` in `packages/client-runtime/src/j5/scopedThreadReadStore.ts`, reached through the `./j5/scopedThreadReadStore` export this case adds to upstream-owned `packages/client-runtime/package.json`) keep an empty answer loaded so a reordered row set never re-reads it, keep the previous snapshot when a batch changes nothing so rows skip their render, and the 30-second Fleet poll re-reads only the rows the roster names as involved (`fleetInvolvedThreadRefs`: seats, their Captains, spawners with placed children), so those reads follow Crew activity rather than the length of the thread list (2026-09-17, after Jackson's review of PR #149). The expander's remembered expansion is keyed by environment, parent, and group. Sidebar membership (register D22, SB5) is decided in J5-owned `apps/web/src/j5/threads/sidebarMembership.ts` (`isSidebarMember`, applied by the already-called `filterThreadsForSquadronScope`), fed by the optional `origin` the J5 participant-homes read states from placement provenance; agent-spawned Peer Agents therefore leave the top level unless pinned without any further Sidebar edit. That `origin` is the homes read's one remaining client use for the card and the rule; it stays until the ledger re-keys to projects. The Roster that keeps every agent visible is the J5-owned `/fleet` page over `POST /api/j5/a2a/client-reads/fleet`, which groups by upstream's logical project on the client. The existing tooltip remains the secondary detail for folder, machine, and model. The thin Sidebar integration must remain card-only: search and slim rows are byte-for-byte unchanged. | ||
| 23. The thread card's J5 identity, Crew chips and spawned children: `apps/web/src/components/Sidebar.tsx` imports and mounts J5-owned `apps/web/src/j5/threads/ThreadCardIdentity.tsx` on the full-card row, passing the thread id, its environment, upstream's own project display name and the persona assignment. The label is the project, as upstream shows it; J5 adds the persona chip, a seat chip on Crew members and the Captain mark on launchers (`apps/web/src/j5/crew/CrewMembershipsClient.ts` and `CaptainMark.tsx`, over the authenticated `POST /api/j5/a2a/client-reads/crew-memberships` read registered in `J5AuthenticatedRoutes.ts`). The list stays flat by recency and no grouping is introduced. The same card mounts J5-owned `apps/web/src/j5/threads/SpawnedChildren.tsx` once, immediately before its closing `</li>`, which renders a collapsed expander of the row's placed children from `SpawnedChildrenClient.ts` (`POST /api/j5/a2a/client-reads/spawned-children`); the nested rows are J5-rendered and never reuse the upstream card component. `Sidebar.tsx` calls J5-owned `useThreadRowReads` once with the visible rows, which requests both reads; they no longer ride inside `useThreadHomes`. Both per-thread stores (`createScopedThreadReadStore` in `packages/client-runtime/src/j5/scopedThreadReadStore.ts`, reached through the `./j5/scopedThreadReadStore` export this case adds to upstream-owned `packages/client-runtime/package.json`) keep an empty answer loaded so a reordered row set never re-reads it, keep the previous snapshot when a batch changes nothing so rows skip their render, and the 30-second Fleet poll re-reads only the rows the roster names as involved (`fleetInvolvedThreadRefs`: seats, their Captains, spawners with placed children), so those reads follow Crew activity rather than the length of the thread list (2026-09-17, after Jackson's review of PR #149). The expander's remembered expansion is keyed by environment, parent, and group. Sidebar membership (register D22, SB5) is decided in J5-owned `apps/web/src/j5/threads/sidebarMembership.ts` (`isSidebarMember`, applied in `Sidebar.tsx` as one `.filter` on upstream's `filterSidebarV2VisibleThreads` result), fed by the optional `origin` the J5 participant-homes read states from placement provenance; `Sidebar.tsx` reads it through one `useThreadHomes` call (`apps/web/src/j5/squadron/ThreadHomesClient.ts`). Agent-spawned Peer Agents therefore leave the top level unless pinned. That `origin` is the homes read's only client use; it stays until the ledger re-keys to projects. The Roster that keeps every agent visible is the J5-owned `/fleet` page over `POST /api/j5/a2a/client-reads/fleet`, which groups by upstream's logical project on the client. The existing tooltip remains the secondary detail for folder, machine, and model. The thin Sidebar integration must remain card-only: search and slim rows are byte-for-byte unchanged. |
There was a problem hiding this comment.
Two gaps in this case: the Sidebar edits for child-row rename and section (renamingChildThreadKey, childSection) aren't recorded, and Sidebar.tsx passes every thread to useThreadRowReads, not "the visible rows". Someone syncing from this text would drop those edits.
There was a problem hiding this comment.
I'm an AI agent (Claude) working for Jackson.
Fixed in 2cb7280 (now 44d01bc). Case 23 now says useThreadRowReads receives every thread shell, not only the listed rows, and why (a spawned child has no row of its own). It records the three Sidebar.tsx edits a sync must keep: renamingChildThreadKey, threadsRef (how the context-menu callback finds a child among every shell) and childSection (how such a child is classified as settled or snoozed).
| **Why:** agents need a home in the ledger, and the ledger is still keyed by Squadron. The server rule is a step of retiring Squadrons into projects ([#412](https://github.com/Jacksondr5/j5code/issues/412)), where a thread's home is its project. A Squadron created this way carries its project's name, so it isn't the unnamed junk drawer the first-run gate used to guard against. | ||
|
|
||
| **Consequences:** the person no longer creates a Squadron before the first thread; the gate is gone. Create Squadron is still offered from the sidebar and from Add Project (D8), and it still requires a folder. A project that several Squadrons reference can't start a thread until one is deleted. | ||
| **Consequences:** the person never creates, names or sees a Squadron: the gate, Create Squadron, rename and delete are gone, and the app shows projects. The welcome wizard still has a Squadron stage (D10). A project that several Squadrons reference can't start a thread, and the app offers no repair for it; the server's delete route (`POST /api/j5/squadrons/<squadronId>/delete`) is the way out, once the extra Squadron's agents and Crews are archived. The wizard's Squadron stage no longer offers a new Squadron for a folder whose project already has one, so the app itself can't create that state. |
There was a problem hiding this comment.
Squadron names are still visible: the playbook author picker renders squadron.name and Fleet/Inbox fall back to it when no project resolves. Either carve those out here or record them as accepted.
There was a problem hiding this comment.
I'm an AI agent (Claude) working for Jackson.
Fixed in 2cb7280 (now 44d01bc). D9 no longer says the person never sees a Squadron. It names the two places a Squadron's name still shows until the ledger re-keys to projects: the playbook author picker in Settings, and Fleet and the Inbox when no project resolves. Both are accepted until the migration PR, which removes them.
1b0def5 to
2cb7280
Compare
2cb7280 to
44d01bc
Compare
|
I'm an AI agent (Claude) working for Jackson. Replies to the review points that have no inline thread:
All in |
44d01bc to
93f7186
Compare
|
Warning Review limit reached
This review includes 39 billable files and costs up to $9.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 20 minutes for your next included review. View limit detailsLimit details: You’ve used all 3 included reviews currently available. Your 40 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (39)
Comment |
93f7186 to
e5f0100
Compare
e5f0100 to
af9f718
Compare
…hat has a Squadron The row showed the existing Squadron while the final button judged a stale unconfirmed or unnamed choice and stayed disabled. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… name still shows Review follow-up. Case 23 names the rename and section edits for spawned children. D9 carves out the playbook author picker and the Fleet and Inbox fallback. Removes stale carrier text from cases 15b and 42. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
af9f718 to
005814a
Compare
Problem
After #455 the new-thread doors use upstream's projects, but the sidebar still filters by Squadron, Add Project still opens Create Squadron, and several strings still say Squadron. The plan in #412 retires Squadrons into projects, so project creation, the sidebar filter and that wording go back to upstream.
What changed
Fifth PR of the fold stack, on top of #455.
Back to the upstream pin, with no J5 edit left
components/sidebar/SidebarThreadHeader.tsx: the add-folder button says "New project".components/CommandPaletteResults.tsx: "No matching commands, projects, or threads."components/ProjectCloneToastCoordinator.tsx: the finished-clone toast offers "Open project" again.components/pullRequest/PullRequestListEmptyState.tsx: project wording.components/AppSidebarLayout.tsx: the Create Squadron dialog host is gone.Back to the pin, keeping non-Squadron J5 edits
Sidebar.tsx: upstream's project filter is back, with its saved selection, the row menu's "Filter by project" item, upstream's add-project button and upstream's empty state. Kept: archive preflight, the thread card identity, spawned children, and the rule that nests spawned agents.Sidebar.logic.ts: the Squadron empty-state helper goes; the archive helpers stay.commandPaletteBus.ts,CommandPalette.tsx: the Add Project folder carrier (onProjectSelected) and the redirect to Create Squadron go. Add Project creates a project and opens a draft in it. The source picker stays, and is now the palette's only J5 edit.ChatView.tsx: the post-launch refresh added in refactor(web): new-thread doors and drafts go back to upstream's projects #455 goes, because the sidebar no longer filters by Squadron home.Removed from the app
j5/squadron/:SquadronScopeDropdown,SquadronCreateDialog,SquadronCreateForm,SquadronCreate.logic,SquadronCreateRequest,SquadronRenameDialog,SquadronDeleteDialog,SquadronActions.logic,refreshAfterSquadronChange,SquadronDraftState,SquadronScope.logic,refreshAfterThreadLaunch, with their tests.renameSquadronanddeleteSquadronleavesquadronClient.ts.Staying until later PRs
ThreadHomesClient, trimmed to one hook. The rule that nests spawned agents (register D22) still reads the Squadron home'sorigin, soSidebar.tsxkeeps oneuseThreadHomescall. It goes with the migration PR.SquadronDirectory, which Fleet, the Inbox, the playbook author picker and onboarding read.Behavior notes
POST /api/j5/squadrons/<squadronId>/delete, which is unchanged. That route refuses while the Squadron has unarchived agents or live Crews, so those have to be archived first.UI changes
Captured by the tester on the base branch and on this PR, with the same data and viewport.
Sidebar header, no filter. Upstream's project filter and "New project" button, where the Squadron dropdown and "New Squadron" were.
Sidebar filtered to one project. Crew seats still nest under their Captain.
Thread row menu. "Filter by project" is back.
The add button's tooltip. "New project".
Add Project. Before: the Create Squadron dialog. After: upstream's Add Project palette.
Add Project's folder picker.
No projects. Upstream's empty state.
Pull-request list, empty. Project wording, where it said folder.
Palette with no results. "No matching commands, projects, or threads."
Welcome wizard, a folder whose project already has a Squadron. The row keeps that Squadron and the import button is enabled. With the select closed the two look the same; the change is that its list no longer has a "New Squadron" option, which the tester confirmed by opening it.
Welcome wizard, a new folder. It still offers "New Squadron" with a name field.
Adding a project and landing in its draft.
Dark theme and 390px captures of the same states
Sidebar header, no filter, dark.
Sidebar filtered to one project, dark.
Sidebar filter at 390px, light.
Sidebar filter at 390px, dark.
Thread row menu, dark.
Add button tooltip, dark.
Add Project, dark.
Folder picker, dark.
No projects at 390px, light.
No projects, dark.
No projects at 390px, dark.
Empty pull-request list at 390px, light.
Empty pull-request list, dark.
Empty pull-request list at 390px, dark.
Palette with no results, dark.
Wizard, folder with an existing Squadron, dark.
Wizard, new folder, at 390px, light.
Wizard, new folder, dark.
Wizard, new folder, at 390px, dark.
Limits of this evidence:
Upstream impact
Each file above is upstream-owned. FORK.md changes:
Sidebar.tsxand fed by oneuseThreadHomescall.PullRequestListEmptyStaterows (the.test.tsxrow pointed at a file that does not exist).SidebarThreadHeader.tsxnever had a row; it matches the pin now, so it needs none.Register (
docs/j5/product/upstream.md): D8 shrinks to the server-side rules that remain (the archive and merge-back Squadron checks), which end with the migration. D9 no longer mentions Create Squadron. The decision is Jackson's, in the plan for #412.Checklist
onboardingSquadrons.logic.test.ts.FORK.md(case text and file-table row) in this PRdocs/j5/product/upstream.mdAGENTS.md)docs/j5/product/and user docs rewritten where this changes them. The Squadron feature definition is left for the stack's docs PR, per the plan.Surfaces walked
packages/client-runtimeand the contracts, unused by web.Verification
vp test run src/components/Sidebar.logic.test.ts src/components/CommandPalette.logic.test.ts src/components/ChatView.logic.test.ts src/j5inapps/web: 46 files, 599 tests pass.tsc --noEmitinapps/web: no errors.vp linton the changed files: no errors.git diff <pin>is empty for the five verbatim files.Claude Opus 5.5 (1M context), Claude Code harness.
🤖 Generated with Claude Code