Skip to content

fix(ui): keep My sessions independent of the viewed agent - #170072

Merged
steipete merged 1 commit into
mainfrom
upd/upd-l1577
Oct 12, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/upd-l1577

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Opening another person's session in a different agent could empty My sessions, even when you had sessions elsewhere. The sidebar inherited the open chat's agent filter.

User Impact

My sessions continues to show your sessions across configured agents while you view or switch between other people's chats. Existing owner and status filters remain available. No configuration or migration is required.

Why This Change Was Made

The sidebar request owner now separates personal list scope from the selected chat's agent. Its subscription, refresh, pagination, and row projection use that same scope; links and actions resolve each row's agent.

The coupling predates the investigated deploy range: neither the sidebar render-churn change nor the Incognito change introduced it. This addresses the empty personal sidebar reproduction; the reported whole-UI freeze remains unproven.

Evidence

  • Regression fails before the fix at the missing own-session row (330 ms test time; 32.65 s including setup). It passes after the fix (263 ms test time; 11.73 s including setup) and exercises foreign agent B → own agent A → foreign agent B through the real route binding and mounted sidebar.
  • Chromium proof uses synthetic Ada/Bob sessions and a Gateway transport fixture that honors agent and owner filters. Before: ownerId=profile-ada, agentId=research yields zero visible rows. After: ownerId=profile-ada with configuredAgentsOnly=true shows Ada's agent A row while Bob's agent B chat remains open.
  • Local sibling proof: 396 unit tests in 16 files passed (69.90 s wall time); 19 Chromium E2E tests in 9 files passed (143.93 s wall time, including the shared production UI build). Slowest E2E case: 22.52 s. No per-test result exceeded 30 s.
  • Final extraction proof: 32 lifecycle/refresh tests in 3 files passed (78.62 s wall time), then 9 child-list/personal-scope tests in 2 files passed (89.60 s wall time). Compiler/setup dominated those runs; the final personal-scope regression used 183 ms of test time.
  • Independent Codex review completed with no actionable P0–P2 findings. Production delta: +77 / −52 lines (net +25) across the existing query, controller, and row owners; tests: +102 / −1 lines; docs: +1 / −1 line. The controller itself shrinks by 21 lines. Existing catalog reset operations move into the existing catalog owner to meet its absolute line cap; no suppression, baseline edit, new owner, or configuration was added.
  • node scripts/check-changed.mjs passed the guards, ten dependent test type graphs, UI types, i18n/Lit checks, and the initial dead-export scan, then caught the controller's existing absolute line-cap debt. The catalog extraction clears that debt: final changed-file lint, stylelint, component types, formatting, line-cap guard, and a fresh complete dead-export scan all passed. Unchanged earlier checks were reused. No failed gate remains.

Regression command:

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui.config.ts ui/src/components/app-sidebar.personal-agent-scope.test.ts --maxWorkers=1

Before:

Empty My sessions while viewing Bob's research chat

After:

Ada's planning session remains visible beside Bob's research chat

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M labels Oct 12, 2026
@steipete
steipete marked this pull request as ready for review October 12, 2026 18:13
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The PR keeps My sessions across configured agents while the user views another agent’s chat.

Example: Ada views Bob’s research chat while owning a planning session on main.

  • Before: My sessions is empty because its query includes agentId=research.
  • After: Ada planning remains visible while Bob research stays open.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, focused repair with directly visible browser proof and a meaningful mounted regression; no actionable correctness finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected Chromium before/after screenshots exercise the Control UI sidebar with synthetic Ada/Bob sessions and a filter-aware Gateway fixture, showing Ada’s main-agent session beside Bob’s research chat after the query repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Viewing another person’s chat can hide the user’s own sessions on other configured agents.
Reason: The maintainer-authored direction addresses demonstrated user-visible loss of sidebar membership with a focused change to existing owners.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR fixes a current-main personal-sidebar scope bug, and no actionable introduced defect was found.

Priority: P2
Reviewed head: aa73dbd132464d59b6ac67e3054426a9e178d577

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI sidebar combines profile and status filters into a managed session query, then projects Gateway results into rows with agent-specific navigation and actions.

flowchart LR
  A[Profile and sidebar filters] --> B[Sidebar query owner]
  C[Viewed chat agent] --> B
  B --> D[Managed session lists]
  D --> E[Gateway session results]
  E --> F[Sidebar row projection]
  F --> G[Row navigation and actions]
Loading

Technical review

Best possible solution:

Keep personal list membership independent of chat selection through the existing query, subscription, and projection owners.

Do we have a high-confidence way to reproduce the issue?

Current-main source shows the selected-agent restriction, and supplied before/after browser evidence demonstrates the resulting empty personal list; no target code was executed during this review.

Is this the best way to solve the issue?

The patch fixes the query scope at its existing owner and carries that scope through subscriptions, pagination, projection, and row navigation without adding configuration or a competing list owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e3ed1945ba38.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 599b46c adds ui/src/components/session-data-controller-events.ts:98 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 599b46c49bbd; files: ui/src/components/session-data-controller-events.ts)
  • Vincent Koc: Raw commit e47b800 adds ui/src/components/session-data-controller.ts:269 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e47b800d1b20; files: ui/src/components/session-data-controller.ts)

PR surface

Source +25, Tests +101, Docs 0. Total +126 across 9 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 6 77 52 +25
Tests 2 102 1 +101
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 180 54 +126

Review metrics

Metric Value Why it matters
Production versus test LOC Production +77/−52; tests +102/−1 The modest production growth coordinates cross-agent scope across existing owners; the test addition protects the mounted navigation flow.

Labels

Label changes:

  • add P2: The bug incorrectly empties a personal sidebar during cross-agent browsing, with limited impact on the ongoing chat.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The bug incorrectly empties a personal sidebar during cross-agent browsing, with limited impact on the ongoing chat.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 12, 2026, 2:21 PM ET / 18:21 UTC.

@steipete
steipete merged commit 3d29d4b into main Oct 12, 2026
144 of 146 checks passed
@steipete
steipete deleted the upd/upd-l1577 branch October 12, 2026 18:27
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…other agent's session (openclaw#170072)

The sidebar's My sessions list inherited the agent filter of the currently open chat, so viewing another user's session in a different agent rendered an empty My sessions list. The sidebar request/controller and row projection now keep the current user's configured-agent scope independent of the viewed session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant