Repository navigation
refactor: centralize session-group defaults replacement - #154017
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 23, 2026, 11:06 AM ET / 15:06 UTC (Revision 5). ClawSweeper reviewWhat this changesThe PR centralizes replacement of session-group folder and worktree defaults in the shared helper, removes duplicate caller logic, and adds a focused regression test. Merge readiness✅ Ready for maintainer review Keep open as a focused, maintainer-requested cleanup. The production behavior is preserved, the consolidation remains absent from current main, and no actionable correctness or security defect was found. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI combines Gateway-provided group names and ordering with folder and worktree defaults. Its session catalog publishes those settings for sidebar and New Session consumers. flowchart LR
A[Gateway group catalog] --> C[Control UI catalog]
B[Gateway defaults snapshot] --> D[Replace group defaults]
C --> D
D --> E[Session state]
E --> F[Sidebar and New Session]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -3, Tests +20. Total +17 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep snapshot replacement in the shared helper and preserve the existing catalog, persistence, and authorization contracts. Do we have a high-confidence way to reproduce the issue? Not applicable to a user-facing bug: the production caller already clears obsolete defaults. Source inspection confirms the helper-level inconsistency addressed by the new regression. Is this the best way to solve the issue? Yes. Moving the existing projection into the shared helper removes duplicate policy while preserving all inspected production callers' outputs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 60d25b947df5. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
Keep authoritative snapshot replacement in the helper and remove the caller’s duplicate projection. Retain one composite regression instead of a redundant input matrix. Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: fuller-stack-dev <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: shakkernerd <[email protected]>
d17b963 to
900f2d1
Compare
The prior test merge failed in chat/route-loader.ts because of the main-branch TS2322 regression. Main now contains 813a10e, and its exact UI and UI-E2E typechecks pass. Refresh the test merge without changing the reviewed cleanup or rewriting its ancestry. Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: fuller-stack-dev <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: shakkernerd <[email protected]>
|
Merged via squash auto-merge.
|
) Centralize authoritative group-default snapshot replacement in the existing helper. Remove the caller’s duplicate projection and retain one frozen-input regression covering omission, explicit false, metadata retention and nonmutation. No group-ownership, schema, protocol or appearance change. The cleanup reduces production code by three lines. Implementation and verification: https://team.openclaw.ai/chat/roboclaw/839d1724 Original discussion: https://team.openclaw.ai/chat/roboclaw/dashboard/28feaf46-a23c-468e-bfad-ab44a1d5ac7b Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: fuller-stack-dev <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: shakkernerd <[email protected]>
Related: #142863
What Problem This Solves
The group-defaults helper retained obsolete working-directory/worktree values on enriched records, forcing its caller to duplicate the replacement rule.
User Impact
No user-visible, group-ownership, schema, migration, or RPC change. The caller already cleared old defaults; the helper now owns that rule consistently.
Why This Change Was Made
Rebuild each result from its catalog name/position and the authoritative current defaults. Omitted values clear, explicit false survives, and inputs remain untouched. Remove the caller’s redundant projection and retain one composite regression instead of seven repetitive variants.
Evidence
0bd1624a883bbd81701c0d4eed7740b534aa4635is patch-identical. Its complete tree equals the conflict-free composition of the public head with that main revision. The native publisher preserves hosted ancestry, so the public head remains83a6cfd53f0a14af29653f76f4b03928eb27df78; no rewritten or empty refresh commit was published.Extracted from the work requested by @vyctorbrzezowski; original contributor history and credit remain preserved.
Work sessions