Skip to content

fix(ui): preserve session pages and coordinate scoped gateway refreshes - #116772

Merged
steipete merged 1 commit into
mainfrom
codex/auto-qa-uisessions
Jul 31, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/auto-qa-uisessions

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • Preserve loaded archived/all session pages across matching Gateway refreshes; reset pagination only when the selected agent, filter, client, or generation actually changes.
  • Route canonical and filtered session updates through one debounced, maximum-wait-bounded, single-flight event refresh coordinator.
  • Ignore unrelated agents and stale/reconnected client events while retaining selected-agent global-session rename behavior.

Verification

  • Session owner, route, and scoped-controller suites: 47 tests passed.
  • Actual mounted sidebar pagination/filter/connection scenarios: 19 tests passed, including retaining 120 loaded archived/all rows.
  • Independent whole-owner review inspected debounce/max-wait/single-flight lifecycle, dispose/reconnect cleanup, agent/filter isolation, selected-session renaming, canonical/global siblings, and actual DOM proof; no blockers.
  • Targeted oxlint, formatting, and git diff --check pass.
  • Automated autoreview is unavailable because the mandatory TruffleHog binary is missing; equivalent independent manual diff and secret review completed.

Root causes fixed

3 distinct session ownership, pagination, and concurrent event-refresh defects.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Jul 31, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Jul 31, 2026
@clawsweeper

clawsweeper Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 31, 2026, 7:35 AM ET / 11:35 UTC.

ClawSweeper review

What this changes

This PR preserves loaded archived and all-session sidebar pages during matching Gateway updates, centralizes debounced scoped refreshes, and routes canonical global-session renames through the selected agent.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 3 items remain

Keep this PR open for human review. The patch is a focused Control UI repair with targeted regression coverage and no concrete correctness defect found in the provided diff, but it still lacks inspectable after-fix evidence from a real connected Control UI and Gateway; the existing maintainer label also requires explicit maintainer handling rather than automated cleanup.

Priority: P2
Reviewed head: 1c7c510fe5f5d2dbcf663462db8e3dff3443ac21

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation and focused coverage are credible, but test-only evidence leaves the required connected UI behavior unproven.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR body reports focused tests and mounted DOM scenarios, but no inspectable after-fix recording, screenshot, terminal/live output, artifact, or redacted runtime log from a real Control UI connected to a Gateway is available; add redacted proof before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports focused tests and mounted DOM scenarios, but no inspectable after-fix recording, screenshot, terminal/live output, artifact, or redacted runtime log from a real Control UI connected to a Gateway is available; add redacted proof before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 4 items Changed session refresh boundary: The PR adds a shared bounded refresh coordinator and moves Gateway event filtering into the session-data controller, while pagination records the loaded agent/filter/generation scope before deciding whether to retain the current page depth.
Regression coverage follows the changed behavior: The branch adds controller and mounted-sidebar tests for filtered archived/all session refreshes, loaded-page retention, event isolation, reconnect handling, and selected-agent canonical global-session renames.
Prior review proof gate remains unmet: The latest completed ClawSweeper cycle explicitly requested direct after-fix evidence from a real Control UI and Gateway setup; the current PR body reports tests and manual review but provides no inspectable recording, screenshot, runtime output, or redacted live log.
Findings None None.
Security None None.

How this fits together

The Control UI receives session and presence events from the Gateway, then refreshes the sidebar’s session catalog and the active chat state. This change decides which events apply to the selected agent and filter, preserving visible pagination while preventing stale or unrelated Gateway events from changing the UI.

flowchart LR
  A[Gateway session and presence events] --> B[Scoped event subscription]
  B --> C{Selected agent, filter, and connection match?}
  C -- No --> D[Ignore stale or unrelated event]
  C -- Yes --> E[Debounced single-flight refresh]
  E --> F[Sidebar session catalog]
  F --> G[Preserved loaded pages]
  H[Chat session rename] --> I[Selected agent session patch]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports focused tests and mounted DOM scenarios, but no inspectable after-fix recording, screenshot, terminal/live output, artifact, or redacted runtime log from a real Control UI connected to a Gateway is available; add redacted proof before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - Merging changes the event-driven session-state lifecycle without inspectable real connected-UI proof, so a stale scope or reconnection edge could still reset, retain, or refresh the wrong sidebar page for an operator.
  • Complete next step (P2) - The remaining merge blocker is contributor-supplied real behavior proof plus the existing protected maintainer review path, not a narrow mechanical repair ClawSweeper should attempt.
Agent review details

Security

None.

PR surface

Source +293, Tests +400. Total +693 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 8 355 62 +293
Tests 4 403 3 +400
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 758 65 +693

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: ui/src/components/session-data-controller-events.ts, serialized state: ui/src/components/session-data-controller-pagination.ts, serialized state: ui/src/components/session-data-controller.event-refresh.test.ts, serialized state: ui/src/components/session-data-controller.ts, serialized state: ui/src/lib/sessions/event-refresh-coordinator.ts, serialized state: ui/src/lib/sessions/index.event-refresh.test.ts, and 9 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Capture connected UI behavior (recommended)
    Before merge, add redacted after-fix evidence from a real Control UI and Gateway that demonstrates retained loaded pages plus scoped event isolation.
  2. Accept test-only evidence
    A maintainer may explicitly accept the remaining session-state risk if the targeted suites are considered sufficient for this UI lifecycle change.

Technical review

Best possible solution:

Keep the shared scoped coordinator and pagination-scope design, then add redacted evidence from a real Control UI connected to a Gateway showing a remote session update preserves loaded archived/all rows and ignores an unrelated or stale event.

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

No high-confidence standalone current-main reproduction was provided. The new focused tests make the prior pagination and event-scope failure path source-reproducible, but they are not an inspectable real Gateway/UI reproduction.

Is this the best way to solve the issue?

Unclear. Centralizing debounce, maximum-wait, single-flight, and scope checks is a maintainable owner-boundary fix, but real connected-runtime proof is still needed to confirm it is the best complete solution.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0d40cfbb538d.

Labels

Label justifications:

  • P2: This is a bounded Control UI session-state repair with meaningful user impact but no demonstrated urgent production outage.
  • merge-risk: 🚨 session-state: The patch changes how persisted visible session pages and scoped Gateway events are retained or replaced during refreshes.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports focused tests and mounted DOM scenarios, but no inspectable after-fix recording, screenshot, terminal/live output, artifact, or redacted runtime log from a real Control UI connected to a Gateway is available; add redacted proof before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Changed session refresh boundary: The PR adds a shared bounded refresh coordinator and moves Gateway event filtering into the session-data controller, while pagination records the loaded agent/filter/generation scope before deciding whether to retain the current page depth. (ui/src/components/session-data-controller-events.ts:1, 1c7c510fe5f5)
  • Regression coverage follows the changed behavior: The branch adds controller and mounted-sidebar tests for filtered archived/all session refreshes, loaded-page retention, event isolation, reconnect handling, and selected-agent canonical global-session renames. (ui/src/components/session-data-controller.event-refresh.test.ts:1, 1c7c510fe5f5)
  • Prior review proof gate remains unmet: The latest completed ClawSweeper cycle explicitly requested direct after-fix evidence from a real Control UI and Gateway setup; the current PR body reports tests and manual review but provides no inspectable recording, screenshot, runtime output, or redacted live log. (6aa374f0fccc)
  • Checks support static confidence but not runtime proof: Provided check data shows the targeted UI, lint, boundary, build-artifact, and security-fast jobs succeeding, while the remaining larger and UI E2E lanes are still running; this is supplemental validation rather than direct proof of the connected UI behavior. (1c7c510fe5f5)

Likely related people:

  • steipete: The available provenance ties the current head commit directly to the Control UI session refresh and rename paths; no broader local history attribution could be established from the supplied read-only evidence. (role: current session-refresh contributor; confidence: low; commits: 1c7c510fe5f5; files: ui/src/components/session-data-controller-events.ts, ui/src/lib/sessions/event-refresh-coordinator.ts, ui/src/pages/chat/chat-state-route.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add redacted real Control UI plus Gateway evidence showing a remote session update retains loaded archived/all rows and an unrelated or stale event is ignored.
  • Update the PR body with that evidence so ClawSweeper can re-review; if it does not refresh automatically, ask a maintainer to comment @clawsweeper re-review.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-07-31T10:36:07.120Z sha 6aa374f :: needs real behavior proof before merge. :: none

@steipete
steipete force-pushed the codex/auto-qa-uisessions branch from 6aa374f to 1c7c510 Compare July 31, 2026 11:30
@steipete
steipete merged commit 988e197 into main Jul 31, 2026
97 checks passed
@steipete
steipete deleted the codex/auto-qa-uisessions branch July 31, 2026 11:43
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to yetval/openclaw that referenced this pull request Aug 1, 2026
* commit 'd8f229f2e6c39e2dc694730c2efc479e4fb3871e': (59 commits)
  fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824)
  fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818)
  fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816)
  fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400)
  fix(browser): preserve doctor JSON failure status (openclaw#116811)
  fix(ollama): stream native tool call lifecycle (openclaw#116809)
  fix(matrix): preserve message-tool room thread routing (openclaw#116802)
  fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751)
  fix(ui): coalesce profile identity refresh (openclaw#116764)
  fix(ui): preserve chat attachments and run ownership (openclaw#116752)
  fix(plugins): clean up partial service startup once (openclaw#116804)
  fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801)
  fix(qa-lab): support groups and isolate thread timelines (openclaw#116803)
  feat(plugins): externalize Voyage embeddings (openclaw#116785)
  fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520)
  fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757)
  fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771)
  fix(ui): preserve scoped session state across updates (openclaw#116772)
  fix(build): fail closed on symlinked build output roots (openclaw#116705)
  fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773)
  ...
pull Bot pushed a commit to liudf0716/openclaw that referenced this pull request Aug 1, 2026
* origin/main: (52 commits)
  fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824)
  fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818)
  fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816)
  fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400)
  fix(browser): preserve doctor JSON failure status (openclaw#116811)
  fix(ollama): stream native tool call lifecycle (openclaw#116809)
  fix(matrix): preserve message-tool room thread routing (openclaw#116802)
  fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751)
  fix(ui): coalesce profile identity refresh (openclaw#116764)
  fix(ui): preserve chat attachments and run ownership (openclaw#116752)
  fix(plugins): clean up partial service startup once (openclaw#116804)
  fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801)
  fix(qa-lab): support groups and isolate thread timelines (openclaw#116803)
  feat(plugins): externalize Voyage embeddings (openclaw#116785)
  fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520)
  fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757)
  fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771)
  fix(ui): preserve scoped session state across updates (openclaw#116772)
  fix(build): fail closed on symlinked build output roots (openclaw#116705)
  fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773)
  ...
sunlit-deng pushed a commit to sunlit-deng/openclaw that referenced this pull request Aug 1, 2026
* commit 'd8f229f2e6c39e2dc694730c2efc479e4fb3871e': (60 commits)
  fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824)
  fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818)
  fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816)
  fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400)
  fix(browser): preserve doctor JSON failure status (openclaw#116811)
  fix(ollama): stream native tool call lifecycle (openclaw#116809)
  fix(matrix): preserve message-tool room thread routing (openclaw#116802)
  fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751)
  fix(ui): coalesce profile identity refresh (openclaw#116764)
  fix(ui): preserve chat attachments and run ownership (openclaw#116752)
  fix(plugins): clean up partial service startup once (openclaw#116804)
  fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801)
  fix(qa-lab): support groups and isolate thread timelines (openclaw#116803)
  feat(plugins): externalize Voyage embeddings (openclaw#116785)
  fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520)
  fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757)
  fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771)
  fix(ui): preserve scoped session state across updates (openclaw#116772)
  fix(build): fail closed on symlinked build output roots (openclaw#116705)
  fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 1, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 1, 2026
* commit '4e7fffdb98ce4d3e6fd69859bedd584cf474ec53': (59 commits)
  fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824)
  fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818)
  fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816)
  fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400)
  fix(browser): preserve doctor JSON failure status (openclaw#116811)
  fix(ollama): stream native tool call lifecycle (openclaw#116809)
  fix(matrix): preserve message-tool room thread routing (openclaw#116802)
  fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751)
  fix(ui): coalesce profile identity refresh (openclaw#116764)
  fix(ui): preserve chat attachments and run ownership (openclaw#116752)
  fix(plugins): clean up partial service startup once (openclaw#116804)
  fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801)
  fix(qa-lab): support groups and isolate thread timelines (openclaw#116803)
  feat(plugins): externalize Voyage embeddings (openclaw#116785)
  fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520)
  fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757)
  fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771)
  fix(ui): preserve scoped session state across updates (openclaw#116772)
  fix(build): fail closed on symlinked build output roots (openclaw#116705)
  fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 1, 2026
* origin/main: (52 commits)
  fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824)
  fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818)
  fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816)
  fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400)
  fix(browser): preserve doctor JSON failure status (openclaw#116811)
  fix(ollama): stream native tool call lifecycle (openclaw#116809)
  fix(matrix): preserve message-tool room thread routing (openclaw#116802)
  fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751)
  fix(ui): coalesce profile identity refresh (openclaw#116764)
  fix(ui): preserve chat attachments and run ownership (openclaw#116752)
  fix(plugins): clean up partial service startup once (openclaw#116804)
  fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801)
  fix(qa-lab): support groups and isolate thread timelines (openclaw#116803)
  feat(plugins): externalize Voyage embeddings (openclaw#116785)
  fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520)
  fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757)
  fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771)
  fix(ui): preserve scoped session state across updates (openclaw#116772)
  fix(build): fail closed on symlinked build output roots (openclaw#116705)
  fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 1, 2026
* commit '4e7fffdb98ce4d3e6fd69859bedd584cf474ec53': (60 commits)
  fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824)
  fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818)
  fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816)
  fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400)
  fix(browser): preserve doctor JSON failure status (openclaw#116811)
  fix(ollama): stream native tool call lifecycle (openclaw#116809)
  fix(matrix): preserve message-tool room thread routing (openclaw#116802)
  fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751)
  fix(ui): coalesce profile identity refresh (openclaw#116764)
  fix(ui): preserve chat attachments and run ownership (openclaw#116752)
  fix(plugins): clean up partial service startup once (openclaw#116804)
  fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801)
  fix(qa-lab): support groups and isolate thread timelines (openclaw#116803)
  feat(plugins): externalize Voyage embeddings (openclaw#116785)
  fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520)
  fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757)
  fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771)
  fix(ui): preserve scoped session state across updates (openclaw#116772)
  fix(build): fail closed on symlinked build output roots (openclaw#116705)
  fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773)
  ...
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 maintainer Maintainer-authored PR merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant