Repository navigation
Start new sessions with folder group defaults - #123276
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
57be04e to
033c42f
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 1:01 AM ET / 05:01 UTC. ClawSweeper reviewWhat this changesAdds group-specific working-directory and Local/Worktree defaults, uses them to prefill Control UI New Session, and assigns the created session to the originating group. Merge readinessKeep open for maintainer product-direction review and exact-head CI resolution. The inspected Gateway and persistence paths are coherent and no discrete patch defect was found, but this member-authored PR adds a durable Gateway/UI contract and one UI E2E shard is currently failing. Priority: P2 Review scores
Verification
How this fits togetherGateway owns session-group metadata, authorization, and session creation; Control UI loads the group defaults before opening New Session. The resulting category is persisted on the session and reflected in the sidebar group. flowchart LR
A[Group options] --> B[Write-scoped Gateway defaults]
B --> C[Session group SQLite record]
C --> D[Control UI New Session route]
D --> E[Session creation request]
E --> F[Persisted group membership]
Decision needed
Why: The implementation adds public methods, durable state, and a new session-creation behavior; code review cannot decide whether that product surface should be permanent. Before merge
Agent review detailsSecurityNone. PR surfaceSource +1460, Tests +1587, Docs 0, Generated +2, Other +84. Total +3133 across 80 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the group catalog path-free, retain write-scoped defaults and first-use nullable storage, and land only after a product owner accepts the public contract and the exact-head UI E2E failure is resolved. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes a new workflow, and its supplied recording plus real-component staging demonstrate the intended flow rather than an existing defect. Is this the best way to solve the issue? Unclear: the implementation follows the existing Gateway-owned group boundary, but a maintainer must decide whether this new persistent public contract is desired. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6e5bf3ec55cb. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (22 earlier review cycles; latest 8 shown)
|
8c46fa0 to
37f0640
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
New behavior
Folder groups can remember where new sessions should work. An operator saves a folder and Local or Worktree mode once, then the group’s + action opens New Session with those choices already selected and keeps the created session in that group.
Exact head:
ffc7249d2be401e51d8650f1f2b12da45e8df20cThe hosted walkthrough was captured from runtime-identical commit
5abfd74cdc72b8646ae8ef1b60a24fc924f927d2. Later changes corrected tests and generated protocol output, hardened catalog loading, moved the New Session route loader behind the existing lazy boundary, enforced workspace scope for saved paths, gated group assignment on the new Gateway capability, and rebased the feature onto currentmain; they do not change the supported rendered states shown below. Exact headffc7249d2be401e51d8650f1f2b12da45e8df20calso filters saved paths by session participation, rechecks current members at commit time using one canonical group name, blocks nonparticipants from changing a category by adopting an existing key, revalidates workspace containment against the current config immediately before persistence, and clears cached folders when an update removescwd. Fresh isolated real-component staging on the preceding runtime-identical head verified both the walkthrough and clearing a group back to the agent workspace with Local mode; the final follow-up changes only the server-side authorization key and its regression test.Visual proof
123276-5abfd74-folder-group-walkthrough.mp4
What this shows: From a seeded “Client work” group, the walkthrough opens the defaults dialog, browses
/home/demo/client-work, saves Worktree mode, starts through the group +, observes the prefilled composer, and reaches the grouped session.State: Real Control UI components with synthetic Gateway data at 1280×900; no credentials or production state. The retained media shows the unchanged UI states, while exact-head staging verifies the current loading and submission path.
Save folder-group defaults
What this shows: The group owns
/home/demo/client-workand Worktree mode before the session is started.What this shows: Folder-group defaults reuse the normal New Session browser, including the explicit Use this folder action.
Start in the saved place
What this shows: The group + opens New Session with
client-workand Worktree already selected; ordinary New Session preferences remain separate.What this shows: Creation completes at
/chat/main/client-work, with the resulting session shown under the originating group.How to verify
The representative create request from the proof run was:
{ "agentId": "main", "category": "Client work", "cwd": "/home/demo/client-work", "message": "prepare the client release", "worktree": true, "worktreeBaseRef": "main" }Exact-head validation
9a88f62b2485614d8ebe96957722afef7dd5f201, then cleared the saved folder back to the agent workspace and Local mode. The exact-head follow-up has no rendered or submission-path change./chat/main/client-work, sent the representative create request above, verified the cleared group reopened at the normal workspace, and contacted only the synthetic preview origin.Compatibility and safety
sessions.groups.listremains path-free and read-scoped. Saved paths load through the write-scoped defaults method.operator.admin.nullwhen mutation is allowed and an error when denied; focused proof verifies permitted groups remain visible while restricted groups are filtered. The update path canonicalizes the group name once, then rechecks the complete current member set immediately before its synchronous write.sessions.create.