Skip to content

fix(ui): stop catalog paging in hidden tabs - #140583

Merged
steipete merged 1 commit into
mainfrom
codex/team-ui-catalog-hidden-pages
Sep 7, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/team-ui-catalog-hidden-pages

Conversation

@steipete

@steipete steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where a Control UI tab continued fetching previously expanded catalog pages after the operator switched away from it.

Why This Change Was Made

The existing visibility handler paused future polls, but an in-flight poll could still start every remaining page of its automatic refresh. Automatic pagination now checks visibility and current request ownership before each additional page, preserving the full previously displayed rows and cursor when it pauses.

User Impact

Hidden tabs stop starting automatic catalog page requests. Returning to the tab uses the existing coalesced refresh to update the expanded list. Already-issued manual Load More outcomes, complete responses, polling intervals, and reconnect behavior are preserved.

Evidence

  • The actual sidebar fixture earns two pages through Load More. Baseline hiding during the base response starts two unwanted page requests; hiding during an expanded-page response starts one. Both regressions pass after the fix.
  • All 370 focused and sibling tests pass, including retained rows/cursors, visible catch-up, hidden manual success/error outcomes, exhausted responses, unmount, progressive updates, and reconnect ownership.
  • The production-built Control UI passes all three browser cases on commit 3091fa6861d732336fc90d139fb466a250958f7f, using the same scenario that produced two baseline failures and one passing manual control.
  • Independent P0–P2 review and the complete changed gate pass, including core/UI typechecks, all unused-export scans, lint, and styles.

The browser proof uses a synthetic Gateway and controlled document visibility. An initial harness attempt stopped before the race because its paused clock withheld mock response delivery; correcting that clock advancement produced the baseline and candidate results above. No production latency claim is made from these request counts.

The matched screenshots show the expanded list after hiding: the baseline continued replaying pages, while the fix retains the previous window until the visible catch-up.

Before: automatic paging continues after hiding

After: expanded rows are retained until the tab returns

Gate new automatic page requests at the existing refresh owner while
preserving the retained window, accepted manual responses, and visible
catch-up. Regression coverage reproduces hiding during both the base
response and an expanded-page response.
@clawsweeper

clawsweeper Bot commented Sep 7, 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 app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Sep 7, 2026
@steipete
steipete marked this pull request as ready for review September 7, 2026 01:37
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 9:43 PM ET / September 7, 2026, 01:43 UTC.

ClawSweeper review

What this changes

Stops automatic sidebar catalog pagination when the tab becomes hidden, preserves previously displayed rows and cursors, and adds lifecycle regression coverage.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main still starts additional automatic pages after the tab becomes hidden. No introduced correctness or security defect was found.

Priority: P2
Reviewed head: 3091fa6861d732336fc90d139fb466a250958f7f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow owner-boundary fix with meaningful regression coverage and no actionable defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: The repository-state MEMBER association exempts this PR from the external-contributor proof gate, and no authority boundary changes. The captured body reports production-built sidebar race checks using a synthetic Gateway; those results and screenshots were not independently verified here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The repository-state MEMBER association exempts this PR from the external-contributor proof gate, and no authority boundary changes. The captured body reports production-built sidebar race checks using a synthetic Gateway; those results and screenshots were not independently verified here.
Evidence reviewed 8 items Current main still contains the defect: The expanded-page loop on fetched main issues each request without checking document visibility. The affected production files have no changes between the pinned merge base and fetched main.
Guard preserves the existing reconciliation boundary: The production caller supplies current-request and visibility checks; the replay loop checks them immediately before additional I/O and retains the previous complete window when paused. Completed or exhausted responses still follow existing reconciliation.
Manual pagination and activation remain separate: Manual Load More uses its existing request and merge path. Visibility activation already coalesces refreshes, while request retirement invalidates stale generations. This is an OpenClaw browser scheduling change; no changed behavior depends on the Codex runtime contract.
Findings None None.
Security None None.

How this fits together

The Control UI sidebar fetches session catalogs from the Gateway and refreshes pages previously expanded by the operator. Browser visibility and request lifecycle checks control background work and when refreshed rows appear.

flowchart TD
  A[Refresh timer or tab activation] --> B[Sidebar catalog refresh]
  B --> C[Gateway first page]
  C --> D{Visible and request current?}
  D -->|Yes| E[Fetch next expanded page]
  E --> D
  D -->|No| F[Retain displayed rows and cursor]
  E --> G[Publish completed catalog]
  F --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +6, Tests +216. Total +222 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 6 0 +6
Tests 1 216 0 +216
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 222 0 +222

Review metrics

None.

Technical review

Best possible solution:

Keep automatic replay visibility-aware at the request boundary while preserving complete displayed windows and the existing activation and manual-pagination flows.

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

Yes, from source: expand multiple catalog pages, start a refresh, then hide the tab before a response completes; main's replay loop starts remaining pages without a visibility check. This review did not execute that scenario.

Is this the best way to solve the issue?

Yes. Checking immediately before each automatic page request closes the scheduling gap without canceling accepted manual work or introducing a competing refresh mechanism.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: Fixes unnecessary background catalog requests with a limited Control UI performance impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The repository-state MEMBER association exempts this PR from the external-contributor proof gate, and no authority boundary changes. The captured body reports production-built sidebar race checks using a synthetic Gateway; those results and screenshots were not independently verified here.

Label justifications:

  • P2: Fixes unnecessary background catalog requests with a limited Control UI performance impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 repository-state MEMBER association exempts this PR from the external-contributor proof gate, and no authority boundary changes. The captured body reports production-built sidebar race checks using a synthetic Gateway; those results and screenshots were not independently verified here.

Evidence

What I checked:

  • Current main still contains the defect: The expanded-page loop on fetched main issues each request without checking document visibility. The affected production files have no changes between the pinned merge base and fetched main. (ui/src/components/app-sidebar-session-catalog-state.ts:108, b39b6276cac2)
  • Guard preserves the existing reconciliation boundary: The production caller supplies current-request and visibility checks; the replay loop checks them immediately before additional I/O and retains the previous complete window when paused. Completed or exhausted responses still follow existing reconciliation. (ui/src/components/app-sidebar-session-catalog-state.ts:109, 3091fa6861d7)
  • Manual pagination and activation remain separate: Manual Load More uses its existing request and merge path. Visibility activation already coalesces refreshes, while request retirement invalidates stale generations. This is an OpenClaw browser scheduling change; no changed behavior depends on the Codex runtime contract. (ui/src/components/session-data-controller-catalog.ts:119, 3091fa6861d7)
  • Behavioral regression coverage: Read all seven added cases: hiding during base and expanded responses, visible replay, manual success and error, unmount, and exhausted first-page reconciliation. Existing visibility tests cover unexpanded scans; the new tests exercise earned pagination depth through the real sidebar fixture. Tests were inspected, not executed. (ui/src/components/app-sidebar.catalog-hidden-pages.test.ts:77, 3091fa6861d7)
  • Verified merge-result scope: Raw test-merge parents are exactly fetched main followed by the pinned PR head. Its comparison against main contains only the two production changes and the new regression test, with no removal of base-branch work. (d223a7b30939)
  • Captured validation claims: The supplied body reports two baseline browser failures, three passing candidate browser cases on the pinned head, and 370 passing focused/sibling tests. It explicitly identifies a production-built UI with a synthetic Gateway and controlled visibility. These are author-reported results; linked screenshots were not independently inspected. Captured sourceRevision: d163b037bb06606f09520e05fe87bfe558c208cd65f6d066d51c2232989cfc5d. (3091fa6861d7)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • jesse-merhi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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.

@steipete
steipete merged commit 0a55c7c into main Sep 7, 2026
179 checks passed
@steipete
steipete deleted the codex/team-ui-catalog-hidden-pages branch September 7, 2026 01:56
@steipete

steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 7, 2026
…137098

* commit '8a540c252002878f3c3e9d8dfb837b83c8602a78': (2210 commits)
  perf(plugins): keep bundled catalog lookups lightweight (#140597)
  refactor: streamline skills JSON serialization (#140581)
  fix(feishu): expand quoted merged-forward messages (#136231)
  fix(talk): keep opaque realtime routes out of public config (#129144)
  fix(ci): avoid Linux packaging on pull requests (#140589)
  fix(usage): release completed request payloads (#140588)
  fix(tooling): omit Trae machine squash credit (#140562)
  fix(ui): stop catalog paging in hidden tabs (#140583)
  fix(portals): reach IPv6 loopback with IPv4-only localhost records (#140580)
  fix(transcripts): preserve fixed and legacy capture history (#140563)
  fix(ui): prevent Talk E2E audio capture stalls (#138803)
  fix(media): release completed document source buffers (#140561)
  fix(anthropic): preserve resumed CLI caches across Git changes (#140566)
  chore(ui): refresh control ui locales (#140586)
  fix(ui): keep usage exports bound to their session instance (#140573)
  refactor(exa): test response readers through tool execution (#140572)
  fix(macos): omit incompatible worker binaries from app bundles (#140557)
  fix: avoid retaining discarded tool output (#140570)
  refactor(gateway): share placement move matching (#140569)
  fix(gateway): preserve child turns during systemd drain (#140568)
  ...

# Conflicts:
#	.agents/skills/release-openclaw-maintainer/SKILL.md
#	docs/reference/RELEASING.md
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
Gate new automatic page requests at the existing refresh owner while
preserving the retained window, accepted manual responses, and visible
catch-up. Regression coverage reproduces hiding during both the base
response and an expanded-page response.
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. 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