Repository navigation
feat(ui): add Person grouping mode for sessions sidebar and sessions page - #127346
Conversation
…page Sessions can now be grouped by their durable owner identity: the sidebar Group-by menu gains a capability-gated Person mode (self first, humans by label, agent identities after; ownerless rows keep their smart zones), and the sessions page gains the matching person mode. Person section headers render the owner avatar and profile label; the mock dev server now advertises the multi-identity policy and carries explicit row owners the way the gateway projects createdActor fallbacks.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 21, 2026, 4:06 PM ET / 20:06 UTC. ClawSweeper reviewWhat this changesAdds a capability-gated Person grouping option to the Control UI sidebar and Sessions page, grouping session rows by durable owner identity. Merge readinessKeep open: the updated head fixes the prior Sessions-page capability-gating finding, but two P2 behavior gaps remain in the new Person mode. Priority: P2 Review scores
Verification
Live VerificationEntry: Result: PASS (completed) Steps:
Recorded live on the PR head ( How this fits togetherGateway hello policy and session ownership data feed the Control UI’s grouping controls. Those controls determine how the sidebar and Sessions page partition rows and which drag interactions remain valid. flowchart LR
A[Gateway hello policy] --> B[Capability gate]
C[Session rows with owners] --> D[Owner grouping]
B --> E[Grouping controls]
D --> F[Sidebar sections]
D --> G[Sessions page sections]
E --> F
E --> G
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +170, Tests +131, Other +7. Total +308 across 14 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Use one effective grouping value for sidebar rendering and drag admission, and pass the viewer identity into Person-group ordering so both UI surfaces honor self-first behavior. Do we have a high-confidence way to reproduce the issue? Not applicable as an existing-bug reproduction: this is a new UI mode, and the remaining defects are directly source-reproducible from its fallback and ordering paths. Is this the best way to solve the issue? No: capability gating is now correct, but the fallback must drive drag admission too and page ordering must receive the viewer identity to fulfill the intended self-first experience. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a4ae33990374. 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 (1 earlier review cycle)
|
Mirrors the sidebar: the Person option hides without hasMultipleSessionSharingIdentities and a stored Person preference renders as None until the capability returns.
|
Applied the rank-up moves in d2f84af:
|
|
Merged via squash.
|
…page (openclaw#127346) * feat(ui): add Person grouping mode for sessions sidebar and sessions page Sessions can now be grouped by their durable owner identity: the sidebar Group-by menu gains a capability-gated Person mode (self first, humans by label, agent identities after; ownerless rows keep their smart zones), and the sessions page gains the matching person mode. Person section headers render the owner avatar and profile label; the mock dev server now advertises the multi-identity policy and carries explicit row owners the way the gateway projects createdActor fallbacks. * feat(ui): gate sessions-page Person grouping on the identity capability Mirrors the sidebar: the Person option hides without hasMultipleSessionSharingIdentities and a stored Person preference renders as None until the capability returns.

What Problem This Solves
The sessions sidebar can group by custom categories or nothing at all, but on multi-identity gateways there is no way to see sessions arranged by who owns them. The owner facet, the People sort, and the owner filter all exist — yet the sidebar cannot answer "show me Mira's sessions next to mine" at a glance. The sessions page similarly offers channel/kind/agent/date grouping but no owner mode.
Why This Change Was Made
Adds a Person grouping mode keyed on the durable, profile-resolved owner identity (
session.owner.actor) — the same recorded fact the existing owner filter and People sort already use, so grouping, sorting, and filtering agree on what a "person" is.Design decisions:
hasMultipleSessionSharingIdentities— the same capability gate as the People sort, with the same reconnect resilience (stored preference survives a temporarily hidden capability; the UI renders Custom groups meanwhile).openclaw-viewer-avatar) plus profile label. Person sections collapse like any section but are deliberately not drag-reorderable and not drop targets — dropping a session on a person would imply ownership reassignment, which stays owned by the owner-chip menu.personjoinsSESSION_GROUP_MODESwith owner-label section headers.owneron rows the way the real gateway projectscreatedActorfallbacks — previously people-aware UI was unreachable in the mock.Considered and rejected: migrating the session-catalog "Person" grouping from
createdActorto owner — catalog sessions carry no owner in the protocol and thecreatedActorchoice there is documented as intentional; not worth a protocol addition.Production LOC: +142/−49 (new grouping branch, section headers, menu option, mock fixtures); tests +188/−1.
User Impact
Operators on multi-identity gateways get a third Group-by mode, "Person", in the sidebar Filter & sort menu and the sessions page. Sections show each owner's avatar and name, with your sessions first. Single-identity setups see no change.
Evidence
pnpm check:changedgreen (format, typecheck UI/scripts/core-tests, lint, i18n catalog, guards).ui/src/lib/sessions/grouping.test.ts,ui/src/pages/sessions/view.test.ts(80 tests),ui/src/components/app-sidebar.test.ts(full sidebar case suite, includes a new browser-level test covering the capability gate, self-first ordering, avatar header, non-draggable person sections, and capability loss/regain).Before — Group by offers only Custom groups / None; no people-aware options:
After — Person appears under Group by (and Owners under Sort by, from the mock policy fix):
After, Person selected — self-first owner sections with avatars; ownerless rows fall to Other:
After, menu reopened — Person checked: