feat(clients): session groups, batch actions, inspector, and worktree-aware creation for native chat#110347
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 548ff4d120
ℹ️ 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".
| if change.reason == "groups" { | ||
| self.sessionGroupsRevision += 1 | ||
| let context = self.currentSessionSnapshot() | ||
| Task { await self.fetchSessions(limit: 50, sessionSnapshot: context) } |
There was a problem hiding this comment.
Use the full session refresh size for group events
When a sessions.changed event with reason groups is broadcast, this fetch replaces the current session roster with only 50 rows. The full-window sidebar and Sessions sheet initially load sessionListFetchLimit (200), and local group rename/delete also refresh at that size, so the follow-up event can race in and truncate the visible/cached session list after any group create/rename/delete, especially for users with more than 50 sessions. Use the same session-list limit here, or avoid refreshing sessions for catalog-only group changes.
Useful? React with 👍 / 👎.
548ff4d to
c0df935
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 5:43 AM ET / 09:43 UTC. Summary PR surface: Docs +1, Other +16485. Total +16486 across 51 files. Reproducibility: yes. from source: start with more than 50 sessions, trigger a local or remote Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Use the canonical full session-list fetch limit for group-change refreshes, add a regression case covering a roster above 50 sessions, then provide redacted native runtime proof for group management and worktree-aware creation. Do we have a high-confidence way to reproduce the issue? Yes, from source: start with more than 50 sessions, trigger a local or remote Is this the best way to solve the issue? No, not until the group-event refresh uses the canonical session-list limit; the broader shared-UI approach is otherwise a plausible parity path subject to maintainer sponsorship. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fceae4d8aa04. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Docs +1, Other +16485. Total +16486 across 51 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (2 earlier review cycles)
|
c0df935 to
21c51bf
Compare
…ector, and new-session options
…-ref session options
…d revision-keyed sidebar group refresh
…rect Swedish repository-root translation
…ager, and popover string translations
…revision-key the inspector groups
…rwise init flagged by periphery
…sion and realign i18n after ask-user main rebase
21c51bf to
035c72e
Compare
|
Merged via squash.
|
…-aware creation for native chat (openclaw#110347) * feat(clients): gateway session groups, batch operations, session inspector, and new-session options * chore(i18n): translate session management strings and regenerate catalogs * chore(i18n): complete translation artifacts for session management strings * fix(clients): fail closed when a transport cannot honor agent or base-ref session options * fix(clients): authoritative agent identity for new-session parents and revision-keyed sidebar group refresh * fix(clients): refetch session groups on remote catalog events and correct Swedish repository-root translation * fix(clients): resilient new-session popover, revision-keyed group manager, and popover string translations * fix(clients): scope reset fallback to plain new-session requests and revision-key the inspector groups * fix(clients): reject empty agent catalogs and refresh sessions on remote group events * refactor(clients): drop unused agents fetch wrapper and runtime memberwise init flagged by periphery * chore(i18n): realign locale artifacts after rebase onto model-controls main * chore(clients): split session creation into the session-actions extension and realign i18n after ask-user main rebase * chore(i18n): resync derived artifacts after question-card main rebase
What Problem This Solves
The native macOS chat lacks the web chat's session-management depth: session groups, batch operations, a session inspector, and worktree-aware session creation (agent, parent, base ref). Round 3c of the macOS/web parity effort (follow-up to #109712, #109995, #110019; sibling of the model-controls and message-reader rounds).
Why This Change Was Made
Bring native session management to parity using shared
OpenClawKitcode so iOS can adopt the same surfaces.ChatSessionManagementViews.swift): group create/rename/delete backed bysessions.groups.list/put/rename/delete, session categorization viasessions.patch { category }, batch actions capped at 4 concurrent operations, and a per-session inspector.sessions.creategainsagentId,parentSessionKey,worktree,worktreeBaseRefon the native transport (MacGatewayChatTransport+SessionActions.swift), matching the gateway schema.createSessiondefault fails closed when a transport cannot honoragentID/worktreeBaseRefinstead of silently creating the wrong session; regression test included.groups.putcontract as the web UI; the non-atomicity tradeoff is documented at the call site pending a revisioned gateway groups API.User Impact
macOS chat users can organize sessions into groups, batch-archive/delete, inspect session details, and start worktree sessions from a chosen base ref — matching the web chat.
Evidence
sessions.groups.*andsessions.createfields verified againstpackages/gateway-protocol/src/schema/sessions.tsand gateway handlers;AgentSummarywire fieldworkspaceGitconfirmed in generated protocol models.pnpm format:swiftclean;pnpm lint:swift0 violations;pnpm native:i18n:checkchanged=false; apple/android i18n vitest gates green.Review-driven hardening (seven autoreview cycles to clean)
sessionGroupsRevisionon the view model keys the sidebar, group manager, and inspector; local mutations and remotesessionsChanged(reason: "groups")events both bump it, and remote events also refresh sessions since rename/delete rewrite member categories (contract mirrored fromsrc/gateway/server-methods/sessions-groups.ts+ui/src/lib/sessions).app-sidebar-session-groups.ts:41,custom-groups.ts:27); the lost-update window is catalog-names-only (memberships survivesessions.groups.put) and is documented in code as an accepted tradeoff pending a revisioned gateway groups API.native:i18n:checkclean, branch autoreview "patch is correct (0.97)" with zero findings.