Skip to content

fix(ui): share bounded pagination across live session rosters - #117016

Merged
steipete merged 1 commit into
mainfrom
codex/qa300-ui-sessions-owner
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa300-ui-sessions-owner

Conversation

@steipete

@steipete steipete commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes silent missing transcript-search results when an active session changes its updatedAt order while the Control UI loads multiple Gateway session pages. The previous implementation could skip an existing matching session and submit the same session key more than once.

Why This Change Was Made

The Gateway recalculates its updatedAt-sorted offset window for every sessions.list request. Swarm/child hydration already handled this with bounded repaging and key deduplication. This change extracts that proven algorithm into one shared UI session-list owner and reuses it for transcript search.

The refactor preserves child and Swarm page sizes, cancellation, once-per-page lifecycle timestamps, filter options, transcript null/stalled-cursor errors, and the Gateway's 200-key search limit.

User Impact

Transcript search now finds existing messages even when active sessions move between pages during the search. Each session is searched once, and existing child/Swarm roster hydration continues to behave identically.

Evidence

  • Original reproduced frozen baseline: 36b80ada3ceae2de21b3d8710b883d778e4c4578.
  • Exact current-main base: 727216b014c15ab878486e0e1378c5564b84386e.
  • Exact freshly reviewed rebased head: 1486ced12850e74dd1ae345ced1724d3f17d7def.
  • The rebase preserves the original reviewed stable patch-id exactly: 47b2b57dd35f434284bbb239f472c7911aa5278f.
  • Frozen baseline reproduced the real owner failure: expected existing agent:main:missed; transcript search returned an empty result.
  • Exact rebased-head server-preferences singleton/isolation regression: 2/2 passed. Current main already contains the separate isolation fix that caused the earlier unrelated synthetic-merge CI failure.
  • Exact rebased-head complete transcript-owner, child-roster, Swarm, and Sessions-page suites: 41/41 passed.
  • Exact rebased-head actual Chromium transcript-search suite: 6/6 passed, with zero skips, including a dynamically reordered Gateway roster, retryable pagination errors, indexing/stale behavior, and unavailable-method gating.
  • Fresh remote production UI and UI-test type checks plus all changed-file formatting: passed.
  • Genuine fresh exact-head structured Codex autoreview and official TruffleHog secret scan, explicitly including P0 through P3: clean, zero findings, confidence 0.93.
  • Independent exact-head complete-owner/caller/Gateway/sibling/protocol review: clean through P3.
  • One canonical bounded session-page owner replaces duplicated pagination policy. No authorization, configuration, public SDK, Gateway protocol, mutation, or persistent-state changes.
  • Remote exact-head proof lease stopped and independently verified completed: https://github.com/openclaw/openclaw/actions/runs/30675148057.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Jul 31, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P2 Normal backlog priority with limited blast radius. labels Jul 31, 2026
@clawsweeper

clawsweeper Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 31, 2026, 8:40 PM ET / August 1, 2026, 00:40 UTC.

ClawSweeper review

What this changes

The PR extracts bounded Gateway session-page collection into a shared Control UI helper and uses it for child and Swarm rosters plus transcript search, preventing missed or duplicate session keys when updated sessions reorder between pages.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking patch defect found: the shared collector preserves the established bounded, deduplicating pagination invariant for both live rosters and transcript search. The protected maintainer label keeps this PR open for an explicit human merge decision.

Likely related people: Sarah Fortune — current source author of the paged session flows, medium confidence.

Priority: P2
Reviewed head: 1486ced12850e74dd1ae345ced1724d3f17d7def
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) This is a focused, proof-positive repair with no supported correctness finding; the remaining work is protected-label maintainer confirmation and completion of the current check set.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies after-fix exact-head Chromium transcript-search results for the moving-page case plus focused suite and remote proof-run evidence; it is stronger than mock-only proof for this UI behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies after-fix exact-head Chromium transcript-search results for the moving-page case plus focused suite and remote proof-run evidence; it is stronger than mock-only proof for this UI behavior.
Evidence reviewed 6 items Shared owner preserves the existing roster algorithm: The new collector retains the existing four-pass cap, per-pass offset-loop guard, latest-row-by-key semantics, total-count completion check, and optional stale-request cancellation; the child-roster caller continues to apply one lifecycle timestamp per received page.
Transcript search now uses the canonical owner: The search path supplies its initial page to the collector, preserves the 200-key Gateway search batching limit, and retains explicit errors for a missing page and a non-advancing cursor.
Focused regression coverage: The proposed unit test models a session moving across an updated-time page boundary and verifies that the previously missed key is included exactly once; the E2E addition exercises the same UI search behavior through the mock Gateway.
Findings None None.
Security None None.

How this fits together

The Control UI requests paged session lists from the Gateway for active child/Swarm rosters and to assemble the session keys searched for transcript matches. The new shared collector deduplicates keys and retries a bounded number of times when the Gateway's updated-time ordering shifts while those pages are being fetched.

flowchart LR
  Gateway[Gateway session pages] --> Collector[Bounded page collector]
  Collector --> Dedup[Session-key deduplication]
  Dedup --> Roster[Child and Swarm rosters]
  Dedup --> Search[Transcript session-key search]
  Search --> Results[Transcript results]
Loading

Decision needed

Question Recommendation
Should this protected Control UI repair merge once its current three-way merge result and remaining exact-head checks are confirmed? Confirm and merge: Confirm the current merge result and completed checks, then merge the canonical pagination-owner refactor.

Why: The patch is coherent and proof-positive, but the repository's protected maintainer label reserves the merge decision for a human despite the absence of a concrete code finding.

Before merge

  • Resolve merge risk (P1) - GitHub reports this PR as cleanly mergeable but behind main; before merge, a maintainer should confirm the current three-way merge result and wait for the in-progress exact-head checks rather than treating branch age as a code defect.
Agent review details

Security

None.

PR surface

Source +20, Tests +130. Total +150 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 91 71 +20
Tests 2 130 0 +130
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 221 71 +150

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: ui/src/e2e/session-transcript-search.e2e.test.ts, serialized state: ui/src/lib/sessions/child-session-data.ts, serialized state: ui/src/lib/sessions/paged-session-rows.ts, serialized state: ui/src/pages/sessions/agent-scope.test.ts, serialized state: ui/src/pages/sessions/agent-scope.ts, unknown-data-model-change: ui/src/e2e/session-transcript-search.e2e.test.ts, and 5 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one canonical bounded session-page collector, retain the focused reordered-page regressions, and merge only after a maintainer confirms the current merge result and required checks for the reviewed head are complete.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep one canonical bounded session-page collector, retain the focused reordered-page regressions, and merge only after a maintainer confirms the current merge result and required checks for the reviewed head are complete.

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

Yes, source-reproducible: the current transcript path advances an offset-sorted roster only once, while the focused PR test demonstrates how a session moved across that boundary is otherwise omitted. I did not execute the UI suite locally in this read-only review.

Is this the best way to solve the issue?

Yes. Reusing the roster's bounded retry-and-deduplication invariant in a single session-page owner is narrower and safer than adding transcript-search-specific retry logic or accepting duplicate session-key submissions.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This fixes a bounded Control UI search omission without evidence of data loss, security impact, crash behavior, or a blocked onboarding path.
  • 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. Sufficient (live_output): The PR body supplies after-fix exact-head Chromium transcript-search results for the moving-page case plus focused suite and remote proof-run evidence; it is stronger than mock-only proof for this UI behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix exact-head Chromium transcript-search results for the moving-page case plus focused suite and remote proof-run evidence; it is stronger than mock-only proof for this UI behavior.

Evidence

What I checked:

  • Shared owner preserves the existing roster algorithm: The new collector retains the existing four-pass cap, per-pass offset-loop guard, latest-row-by-key semantics, total-count completion check, and optional stale-request cancellation; the child-roster caller continues to apply one lifecycle timestamp per received page. (ui/src/lib/sessions/paged-session-rows.ts:3, 1486ced12850)
  • Transcript search now uses the canonical owner: The search path supplies its initial page to the collector, preserves the 200-key Gateway search batching limit, and retains explicit errors for a missing page and a non-advancing cursor. (ui/src/pages/sessions/agent-scope.ts:35, 1486ced12850)
  • Focused regression coverage: The proposed unit test models a session moving across an updated-time page boundary and verifies that the previously missed key is included exactly once; the E2E addition exercises the same UI search behavior through the mock Gateway. (ui/src/pages/sessions/agent-scope.test.ts:87, 1486ced12850)
  • Gateway pagination contract: The shared result contract explicitly permits optional total counts, offsets, next offsets, and has-more flags, which is the contract the helper preserves rather than replacing with a new protocol behavior. (src/shared/session-types.ts:58, afa8fffab882)
  • Current-main provenance: Current-main blame attributes the existing transcript pagination loop and child-session pagination flow to commit cc0315a, making that current owner path the appropriate history anchor for this repair. (ui/src/pages/sessions/agent-scope.ts:38, cc0315a397c8)
  • After-fix behavior proof: The PR body records exact-head Chromium transcript-search coverage, focused owner/caller suites, type checks, formatting, a clean security scan, and a completed remote proof run; GitHub also labels the PR proof: sufficient. (ui/src/e2e/session-transcript-search.e2e.test.ts:188, 1486ced12850)

Likely related people:

  • Sarah Fortune: Current-main blame attributes the existing child-session and transcript-search pagination logic to the same recent source commit, making Sarah the strongest local-history routing candidate. (role: recent area contributor; confidence: medium; commits: cc0315a397c8; files: ui/src/lib/sessions/child-session-data.ts, ui/src/pages/sessions/agent-scope.ts)

Rank-up moves

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

  • Confirm the current three-way merge result and let the in-progress exact-head checks complete before merge.

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 (3 earlier review cycles)
  • reviewed 2026-07-31T19:35:46.451Z sha d99a014 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-31T19:46:06.892Z sha d99a014 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-31T22:40:18.309Z sha d99a014 :: needs maintainer review before merge. :: none

@steipete
steipete marked this pull request as ready for review July 31, 2026 22:33
@steipete
steipete force-pushed the codex/qa300-ui-sessions-owner branch from d99a014 to 1486ced Compare August 1, 2026 00:34
@steipete
steipete merged commit 8939497 into main Aug 1, 2026
101 of 103 checks passed
@steipete
steipete deleted the codex/qa300-ui-sessions-owner branch August 1, 2026 00:45
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to pacocartones/openclaw that referenced this pull request Aug 1, 2026
* origin/main: (217 commits)
  fix(messages): reply actions leak citation markers and reply/poll answers draw the no-reply fallback (openclaw#116909)
  fix(slack): let durable ingress retry transient thread lookups (openclaw#117135)
  refactor(doctor): consolidate shipped state migration ownership (openclaw#117142)
  fix(ai): Codex stream shows internal parser text on a malformed frame (openclaw#116966)
  fix: guard every migrated session accessor path (openclaw#117140)
  fix(terminal): measure unicode display width consistently (openclaw#117062)
  fix(openai): clear ChatGPT SSE fallback per session (openclaw#117123)
  fix(mistral): reject incomplete streamed tool terminals (openclaw#117137)
  fix(ai): preserve structured chat content and refusals (openclaw#117136)
  fix(doctor): persist normalized agent roster (openclaw#117115)
  fix(signal): avoid replay after ambiguous quote delivery errors (openclaw#117134)
  fix(cron): reject disabled delivery accounts when scheduling (openclaw#116899)
  fix(gateway): honor HTTP If-Modified-Since media validators (openclaw#117133)
  fix(config): delete one array element per config patch delete (openclaw#116463)
  fix(plugins): report installed dependency health authoritatively (openclaw#117029)
  fix(ui): recover moving sessions across paged gateway rosters (openclaw#117016)
  fix(ui): clear hidden session selection before bulk deletion (openclaw#117015)
  fix(discord): avoid replaying ambiguous voice deliveries (openclaw#117127)
  fix(ui): scope Gateway reconnect lineage to its target (openclaw#117125)
  fix(models): expose runtime provider catalogs in browse views (openclaw#116857)
  ...
vincentkoc added a commit to yetval/openclaw that referenced this pull request Aug 1, 2026
* commit 'c41f033b87545b658215a9c3bbe03f88fbaa867d': (347 commits)
  refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146)
  fix(messages): reply actions leak citation markers and reply/poll answers draw the no-reply fallback (openclaw#116909)
  fix(slack): let durable ingress retry transient thread lookups (openclaw#117135)
  refactor(doctor): consolidate shipped state migration ownership (openclaw#117142)
  fix(ai): Codex stream shows internal parser text on a malformed frame (openclaw#116966)
  fix: guard every migrated session accessor path (openclaw#117140)
  fix(terminal): measure unicode display width consistently (openclaw#117062)
  fix(openai): clear ChatGPT SSE fallback per session (openclaw#117123)
  fix(mistral): reject incomplete streamed tool terminals (openclaw#117137)
  fix(ai): preserve structured chat content and refusals (openclaw#117136)
  fix(doctor): persist normalized agent roster (openclaw#117115)
  fix(signal): avoid replay after ambiguous quote delivery errors (openclaw#117134)
  fix(cron): reject disabled delivery accounts when scheduling (openclaw#116899)
  fix(gateway): honor HTTP If-Modified-Since media validators (openclaw#117133)
  fix(config): delete one array element per config patch delete (openclaw#116463)
  fix(plugins): report installed dependency health authoritatively (openclaw#117029)
  fix(ui): recover moving sessions across paged gateway rosters (openclaw#117016)
  fix(ui): clear hidden session selection before bulk deletion (openclaw#117015)
  fix(discord): avoid replaying ambiguous voice deliveries (openclaw#117127)
  fix(ui): scope Gateway reconnect lineage to its target (openclaw#117125)
  ...
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 '31f24547a94a8bd74a32e42cde1783591c5804d9': (347 commits)
  refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146)
  fix(messages): reply actions leak citation markers and reply/poll answers draw the no-reply fallback (openclaw#116909)
  fix(slack): let durable ingress retry transient thread lookups (openclaw#117135)
  refactor(doctor): consolidate shipped state migration ownership (openclaw#117142)
  fix(ai): Codex stream shows internal parser text on a malformed frame (openclaw#116966)
  fix: guard every migrated session accessor path (openclaw#117140)
  fix(terminal): measure unicode display width consistently (openclaw#117062)
  fix(openai): clear ChatGPT SSE fallback per session (openclaw#117123)
  fix(mistral): reject incomplete streamed tool terminals (openclaw#117137)
  fix(ai): preserve structured chat content and refusals (openclaw#117136)
  fix(doctor): persist normalized agent roster (openclaw#117115)
  fix(signal): avoid replay after ambiguous quote delivery errors (openclaw#117134)
  fix(cron): reject disabled delivery accounts when scheduling (openclaw#116899)
  fix(gateway): honor HTTP If-Modified-Since media validators (openclaw#117133)
  fix(config): delete one array element per config patch delete (openclaw#116463)
  fix(plugins): report installed dependency health authoritatively (openclaw#117029)
  fix(ui): recover moving sessions across paged gateway rosters (openclaw#117016)
  fix(ui): clear hidden session selection before bulk deletion (openclaw#117015)
  fix(discord): avoid replaying ambiguous voice deliveries (openclaw#117127)
  fix(ui): scope Gateway reconnect lineage to its target (openclaw#117125)
  ...
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 P2 Normal backlog priority with limited blast radius. 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