Skip to content

fix(ui): preserve queued refreshes during session discovery - #146535

Merged
steipete merged 6 commits into
mainfrom
codex/fix-catalog-refresh-paging-main5b792c
Sep 13, 2026
Merged

steipete merged 6 commits into
mainfrom
codex/fix-catalog-refresh-paging-main5b792c

Conversation

@steipete

@steipete steipete commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes newly available sessions staying absent from the sidebar when you return to the tab or a host comes online while session discovery is paging.

User Impact

A queued refresh scans for newly available sessions as soon as the current discovery cycle finishes.

Why This Change Was Made

Keep hidden-page discovery inside the existing full refresh lifecycle, so one owner consumes queued refresh intent and schedules the next scan. Removing the competing request/timer lifecycle reduces production code by 21 lines while preserving checks that discard results from an old agent or Gateway connection.

Evidence

  • Both deferred-discovery regressions (tab return and host presence) failed before the repair; both controls without additional discovery pages passed. The repaired flow passes all four.
  • All 455 tests across four sidebar suites passed. The same six-file patch then passed all 20 selected changed-file checks on the refreshed main integration, including core-test and UI types, lint, formatting, and all three dead-export scans.
  • Fresh independent review of the complete six-file change and its updated scheduling context found no actionable issues.

Inspected synthetic screenshots from the repository's mock-Gateway harness show the same 1,550 ms simulated interval: the session remains absent before the fix and appears afterward. The captures precede the later callback and fixture refinements; those refinements preserve the captured production flow. The screenshots were not rerendered after those refinements and do not represent a live Gateway or real-network timing.

Before: queued discovery refresh misses the new session

After: the queued refresh displays the new session

This refresh preserves main's foreground-chat scheduling and shared deferred-promise test helper. The subsequent main update includes the test-import and test-shard repairs from #146862 and #146803 without changing this six-file patch. Required CI for the updated head is pending.

@clawsweeper

clawsweeper Bot commented Sep 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.

@steipete
steipete marked this pull request as ready for review September 12, 2026 22:36
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 6:08 AM ET / 10:08 UTC (Revision 7).

ClawSweeper review

What this changes

The sidebar preserves queued tab-return and host-connection refreshes through session discovery, with regression coverage and updated documentation.

Merge readiness

✅ Ready for maintainer review

The fix remains useful: current main still has the competing discovery lifecycle. The verified integration resolves the previous review concern, and no actionable patch defect remains.

Priority: P2
Reviewed head: b2c5a104ff52e794876590526f3d7c808669f395

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused lifecycle repair with meaningful regression coverage and candidly scoped visual evidence; the earlier integration concern is resolved.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Inspected mock-Gateway captures show the sidebar row appearing after the repair; they predate later refinements and do not prove live-network timing. Current source and reported regression results support the scheduling change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Inspected mock-Gateway captures show the sidebar row appearing after the repair; they predate later refinements and do not prove live-network timing. Current source and reported regression results support the scheduling change.
Evidence reviewed 9 items Current main still needs the repair: Current main calls hidden-page discovery after the full refresh finishes; discovery cancels the scheduled timer and starts a separate request lifecycle. This preserves the mechanism that can consume a queued refresh before discovery cancels its timer.
One refresh lifecycle: The patched owner awaits bounded discovery before consuming refreshPending and scheduling the next scan. Request identity, generation, client identity, and page-merge revision guards remain intact. Both callers supply the continuation callback.
Verified integration resolves prior concern: Raw test-merge parents are exactly the pinned base followed by the pinned PR head. Comparing the checkout with that merge produced no differences in either production catalog module, discovery and scope tests, or the background coordinator. Current source retains background admission and canonical deferred imports.
Findings None None.
Security None None.

How this fits together

The Control UI sidebar obtains session catalogs from the Gateway and pages through catalogs without visible sessions. Its refresh controller combines browser activation and host-presence events into scheduled scans while respecting foreground-chat loading and connection scope.

flowchart TD
  A[Tab return or host connection] --> B[Coalesced refresh request]
  B --> C[Background scheduling]
  C --> D[Gateway catalog scan]
  D --> E[Bounded hidden-session discovery]
  E --> F[Update sidebar rows]
  E --> G[Consume queued refresh or schedule poll]
  G --> C
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -21, Tests +129, Docs 0. Total +108 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 2 20 41 -21
Tests 3 186 57 +129
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 207 99 +108

Review metrics

Metric Value Why it matters
Production versus regression coverage production −21 lines; tests and test support +129 lines The repair removes competing lifecycle ownership while extending activation and scope-replacement coverage.

Technical review

Best possible solution:

Keep discovery and queued refresh consumption under one lifecycle while retaining foreground admission, bounded paging, and stale-result rejection.

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

Yes, from source: queue an activation during a catalog scan that proceeds into hidden-page discovery; main consumes the pending refresh before discovery cancels its timer. The committed regressions cover that ordering, but this read-only review did not execute them.

Is this the best way to solve the issue?

Yes. Extending the existing refresh lifecycle removes the conflicting timer owner without adding settings, persistent state, or another scheduling path.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This fixes delayed sidebar discovery after tab activation or host connection, with limited user-facing scope.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Inspected mock-Gateway captures show the sidebar row appearing after the repair; they predate later refinements and do not prove live-network timing. Current source and reported regression results support the scheduling change.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The maintainer-authored PR is exempt from the external-contributor proof gate. Inspected mock-Gateway captures show the sidebar row appearing after the repair; they predate later refinements and do not prove live-network timing. Current source and reported regression results support the scheduling change.

Evidence

What I checked:

  • Current main still needs the repair: Current main calls hidden-page discovery after the full refresh finishes; discovery cancels the scheduled timer and starts a separate request lifecycle. This preserves the mechanism that can consume a queued refresh before discovery cancels its timer. (ui/src/components/session-data-controller-catalog.ts:304, cc6e76d1cfe9)
  • One refresh lifecycle: The patched owner awaits bounded discovery before consuming refreshPending and scheduling the next scan. Request identity, generation, client identity, and page-merge revision guards remain intact. Both callers supply the continuation callback. (ui/src/components/app-sidebar-session-catalog-live.ts:477, b2c5a104ff52)
  • Verified integration resolves prior concern: Raw test-merge parents are exactly the pinned base followed by the pinned PR head. Comparing the checkout with that merge produced no differences in either production catalog module, discovery and scope tests, or the background coordinator. Current source retains background admission and canonical deferred imports. (ui/src/components/session-data-controller-catalog.ts:78, 902a118a709c)
  • Behavioral regression coverage: The activation table covers tab return and node presence with and without discovery. Additional cases exercise old-agent and old-Gateway discovery completing during a replacement scan; existing coverage checks foreground admission, cursor preservation, hidden tabs, and pagination failures. The body reports before-fix failures and 455 passing sidebar tests; this review inspected but did not execute tests. (ui/src/components/app-sidebar.catalog-discovery.test.ts:63, b2c5a104ff52)
  • Inspected visual evidence: Both prepared screenshots were inspected. The before image lacks the catalog row; the after image displays Newly available session. The captured PR body explicitly identifies a mock-Gateway setup, a 1,550 ms simulated interval, and captures preceding later refinements. These demonstrate the visible outcome, not live-network timing.
  • Merged-area history and routing: Main history identifies prior catalog coalescing work by Jesse Merhi and recent discovery, concurrency, and foreground scheduling work by Peter Steinberger. GitHub commit metadata verified the handles jesse-merhi and steipete and the relevant patches. (ui/src/components/app-sidebar-session-catalog-live.ts:382, 4bf0bd374165)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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 (6 earlier review cycles)
  • reviewed 2026-09-12T22:42:10.603Z sha ebb5137 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-13T00:44:19.759Z sha 986446f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T01:55:18.227Z sha 4760e1f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T06:48:38.756Z sha 5364f6a :: blocked before merge. :: none
  • reviewed 2026-09-13T07:28:21.448Z sha 5364f6a :: blocked before merge. :: none
  • reviewed 2026-09-13T09:56:47.819Z sha 5364f6a :: blocked before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 13, 2026
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 13, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 13, 2026
@steipete steipete closed this Sep 13, 2026
@steipete steipete reopened this Sep 13, 2026
@steipete
steipete merged commit d44a6a4 into main Sep 13, 2026
125 checks passed
@steipete
steipete deleted the codex/fix-catalog-refresh-paging-main5b792c branch September 13, 2026 10:29
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* refs/heads/temp/pr-146883: (159 commits)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  fix(ui): let slow dashboard downloads finish before recovery (#146881)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* refs/heads/temp/pr-146833: (43 commits)
  fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-146802: (51 commits)
  improve: reduce worktree filesystem stalls and archive syncs (#146906)
  fix(ui): avoid extra chat rail work while replies stream (#146883)
  improve(ui): speed up populated Usage timelines (#146947)
  test(gateway): retain auth recovery failure diagnostics (#146925)
  fix(tests): create private temporary home directories (#146931)
  fix(backup): preserve discovery under concurrent state writes (#146912)
  fix: keep queued deliveries in their original state directory (#146917)
  fix(discord): settle voice waveform work before releasing input (#146885)
  fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
…ssion-list-roster-batch-20260913

* commit 'f513c0f345f7f2514c49ccfbc00adc3f78b9a755': (46 commits)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  fix(ui): let slow dashboard downloads finish before recovery (#146881)
  fix: share Doctor lifecycle coordination with SQLite workers (#146714)
  fix: retain native session model provenance (#146801)
  fix: settle embedded transcript repairs before session cleanup (#146842)
  feat(macos): improve agent navigation and chat layout (#146531)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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