Skip to content

fix(ui): prioritize the conversation during chat startup - #148483

Merged
steipete merged 4 commits into
mainfrom
codex/chat-startup-extras-main-b8de9f-20260914
Sep 14, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/chat-startup-extras-main-b8de9f-20260914

Conversation

@steipete

@steipete steipete commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Related: #147845

What Problem This Solves

When opening a conversation, background task, progress, group, and Inbox reads start before the selected transcript is ready.

User Impact

The selected conversation gets its initial loading phase before automatic extras. Users can still type and queue messages, open Tasks, or act on a suggestion while history loads. Repeated task updates no longer accumulate in hidden panes.

Why This Change Was Made

Defer seven automatic requests: the active and recent task snapshots, task suggestions, progress card, group list and defaults, and Inbox. Shared groups and Inbox follow the existing history-ready coordinator; pane-local extras follow transcript paint. Explicit actions use the same owners, while composer/outbox, voice, and presence readiness are preserved.

Queued reads retain their connection, session, request, and retry ownership through failures and hide/resume. Task events coalesce per identity using the existing freshness rules, retaining deletion/recreation and restore boundaries plus failed-snapshot recovery. No task identities are dropped to enforce a retention cap.

Evidence

  • 96 focused task-data and chat-owner tests passed. The 10,000-update regression retains one pending entry, and coalesced replay matches sequential replay across stale/equal timestamps, terminal corrections, and deletion/recreation.
  • 23 mounted Control UI E2E cases passed for the reviewed UI change, covering startup request order, explicit actions, hide/resume and failure recovery, global progress cards, and five retained-pane reconnect rounds. Earlier saved-group-default proof is retained.
  • Full changed-file checks passed, including types, formatting, lint, and dead-export checks. Independent P2 review found no actionable findings.
  • The four reviewed extras/fixture commits replay unchanged onto main after test: route provider integration and wizard recovery tests correctly #148504. That merged PR owns the shared provider-test and wizard-routing repair; this PR has no Radius-test or worker-registry delta. The retained UI proof applies to identical changed source and unchanged dependency versions. This is mocked Gateway request-order and recovery proof; no live startup-speed improvement was measured.
  • CI exposed render-only global-progress fixtures without accepted history and two timing assumptions in deadline/reconnect tests. The fixtures now use the existing history owner; deadline tests synchronize on startup, and reconnect measurements begin after initial hydration. All original identity, dismissal, retry, send-once, and exact visible/hidden request-count assertions remain intact. The repairs pass 11 focused tests and eight E2E cases, including five retained-pane reconnect rounds, plus changed checks and fresh independent P2 reviews.

Both screenshots show the same stage with initial history held. The composer remains available while automatic extras wait.

Before:

Before: background groups load while initial history is pending

After:

After: automatic extras wait while initial history is pending

@clawsweeper

clawsweeper Bot commented Sep 14, 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 14, 2026 19:22
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Sep 14, 2026
@clawsweeper clawsweeper Bot added 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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 5:13 PM ET / 21:13 UTC (Revision 3).

ClawSweeper review

What this changes

The PR defers automatic task, suggestion, progress, group, and Inbox reads until chat is ready, preserves explicit actions, and coalesces pending task updates.

Merge readiness

✅ Ready for maintainer review

This remains a useful, distinct follow-up to the earlier startup scheduling repair. The prior merge-conflict blocker is resolved, and this review found no actionable introduced defect.

Priority: P2
Reviewed head: ba35cdf39786a64ca6b1bf0814602d42764da453

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent repair with focused lifecycle coverage, inspected visual evidence, and no actionable findings; validation remains accurately described as synthetic.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The external-contributor proof gate does not apply to this maintainer-authored PR. Inspected screenshots show groups withheld during held history; the reported mounted-browser tests cover request ordering and recovery through the changed UI owners using a mocked Gateway, without establishing live latency improvement.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this maintainer-authored PR. Inspected screenshots show groups withheld during held history; the reported mounted-browser tests cover request ordering and recovery through the changed UI owners using a mocked Gateway, without establishing live latency improvement.
Evidence reviewed 8 items Current main still needs this repair: At the fetched main revision, Inbox hydration runs without background admission, and ChatPaneSession lacks the new secondary-read readiness gate. The previously merged startup repair therefore does not cover this PR's remaining behavior.
Admission and recovery stay with existing owners: The pane gates automatic reads on connection, presentation, visibility, and history readiness. Deferred hydration resumes after paint; explicit Tasks refresh uses the same task owner, retaining connection, request, retry, and event-buffer checks.
Mounted-browser regression coverage: The startup suite checks withheld requests, explicit toolbar and keyboard actions, hidden-pane recovery, progress invalidations, failed snapshots, suggestion reconciliation, and continued composer use. The retained-pane suite preserves exact visible/hidden hydration counts across five reconnect rounds. These tests were inspected, not executed during this read-only review.
Findings None None.
Security None None.

How this fits together

The Control UI loads conversation history and supporting information from the Gateway. Its startup coordinator and chat pane determine when background reads can begin and whether delayed results still belong to the displayed conversation.

flowchart TD
  A[Open conversation] --> B[Load selected history]
  B --> C[Transcript ready and painted]
  C --> D[Automatic supporting reads]
  E[Explicit user action] --> D
  D --> F[Check connection and conversation]
  F --> G[Update panels and Inbox]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +175, Tests +801, Docs +2. Total +978 across 29 files.

View PR surface stats
Area Files Added Removed Net
Source 15 280 105 +175
Tests 13 847 46 +801
Docs 1 4 2 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 29 1131 153 +978

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +175 net lines; tests +801 net lines Production growth supports deferred-read lifecycle and event coalescing; most growth covers ordering, recovery, and retained-pane regressions.

Technical review

Best possible solution:

Keep conversation-first scheduling in the existing hydration owners while preserving explicit actions and freshness across reconnects and hidden panes.

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

Yes, from source: holding initial chat history leaves main's optional Inbox and supporting reads eligible to start early; the mounted-browser regression exercises that boundary. This review did not execute it.

Is this the best way to solve the issue?

Yes. Extending the existing bootstrap and after-paint owners avoids competing schedulers, and explicit actions continue through the same data owners.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded chat-startup scheduling improvement with preserved explicit interactions and no demonstrated core outage.
  • 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 external-contributor proof gate does not apply to this maintainer-authored PR. Inspected screenshots show groups withheld during held history; the reported mounted-browser tests cover request ordering and recovery through the changed UI owners using a mocked Gateway, without establishing live latency improvement.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The external-contributor proof gate does not apply to this maintainer-authored PR. Inspected screenshots show groups withheld during held history; the reported mounted-browser tests cover request ordering and recovery through the changed UI owners using a mocked Gateway, without establishing live latency improvement.

Evidence

What I checked:

  • Current main still needs this repair: At the fetched main revision, Inbox hydration runs without background admission, and ChatPaneSession lacks the new secondary-read readiness gate. The previously merged startup repair therefore does not cover this PR's remaining behavior. (ui/src/app/mentions.ts:180, c5695c7579dc)
  • Admission and recovery stay with existing owners: The pane gates automatic reads on connection, presentation, visibility, and history readiness. Deferred hydration resumes after paint; explicit Tasks refresh uses the same task owner, retaining connection, request, retry, and event-buffer checks. (ui/src/pages/chat/chat-pane-session.ts:52, ba35cdf39786)
  • Mounted-browser regression coverage: The startup suite checks withheld requests, explicit toolbar and keyboard actions, hidden-pane recovery, progress invalidations, failed snapshots, suggestion reconciliation, and continued composer use. The retained-pane suite preserves exact visible/hidden hydration counts across five reconnect rounds. These tests were inspected, not executed during this read-only review. (ui/src/e2e/chat-startup-priority.e2e.test.ts:116, ba35cdf39786)
  • Prior conflict blocker resolved: The test merge has raw parents 2f04a9e followed by the pinned PR head. Its delta contains the intended UI/docs paths and excludes the base-only plugin and secrets changes. The captured PR body reports focused validation after replaying onto the merged test-routing repair. (6fff0a0c7210)
  • Re-review continuity: GitHub's complete tree for the previous reviewed revision and the current local tree have identical blobs for Inbox hydration, progress-card storage, chat hydration, and background tasks. Local access to the older revision failed; the GitHub tree comparison recovered these source-identity checks. The prior review contained no code findings. (ba35cdf39786)
  • Inspected visual evidence: Both downloaded PR screenshots were inspected. They show the same held-history state with the composer present; the earlier image displays group headings while the later image withholds them. They support that visible difference, not network ordering or measured latency. The captured body explicitly describes mocked-Gateway proof and reports no measured live startup-speed improvement. (ba35cdf39786)

Likely related people:

  • 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 (2 earlier review cycles)
  • reviewed 2026-09-14T19:33:58.969Z sha c3fa55b :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T20:45:13.944Z sha 6cd6eb2014a256bd227b35c24d9df4dfa4664ba7 :: blocked before merge. :: none

@steipete
steipete force-pushed the codex/chat-startup-extras-main-b8de9f-20260914 branch from c3fa55b to 6cd6eb2 Compare September 14, 2026 20:26
Optional tasks, suggestions, progress, groups and Inbox reads wait for initial history. Explicit actions remain immediate; queued reads retain their connection, session and retry ownership.

Coalesce repeated task events per identity while preserving deletion/recreation, restore boundaries and failed-snapshot recovery.

Validation: 96 focused tests, 19 mocked Control UI E2E cases, changed-file checks, and independent P2 review.
@steipete
steipete force-pushed the codex/chat-startup-extras-main-b8de9f-20260914 branch from 6cd6eb2 to ba35cdf Compare September 14, 2026 21:05
@steipete
steipete merged commit 02d8a65 into main Sep 14, 2026
132 of 133 checks passed
@steipete
steipete deleted the codex/chat-startup-extras-main-b8de9f-20260914 branch September 14, 2026 21:51
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
…8483)

* fix(ui): prioritize the conversation during chat startup

Optional tasks, suggestions, progress, groups and Inbox reads wait for initial history. Explicit actions remain immediate; queued reads retain their connection, session and retry ownership.

Coalesce repeated task events per identity while preserving deletion/recreation, restore boundaries and failed-snapshot recovery.

Validation: 96 focused tests, 19 mocked Control UI E2E cases, changed-file checks, and independent P2 review.

* test(ui): seed accepted history for global progress cards

* test(ui): await startup when exercising failed-session retry

* test(ui): separate initial and reconnect hydration
steipete added a commit that referenced this pull request Oct 18, 2026
A mounted pane can still be waiting for subscription and snapshot admission.
Wait for its captured startup request before releasing the fixture, and scope
the deferral so an earlier pane cannot consume it. Preserve every existing
assertion and all five reconnect rounds; production behavior is unchanged.

The original readiness assumption dates to 02d8a65 (#148483), not the
latest hourly window. Current-main proof reproduced the missing deferred
request. The corrected file passes all five rounds in 64.48s wall including
build-lock contention; a held-admission diagnostic also passes in 34.03s.
The startup/recovery siblings pass 10 cases. Owning types and typed/boundary
lint pass; no retries, timeout changes, or suppressions were added.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
A mounted pane can still be waiting for subscription and snapshot admission.
Wait for its captured startup request before releasing the fixture, and scope
the deferral so an earlier pane cannot consume it. Preserve every existing
assertion and all five reconnect rounds; production behavior is unchanged.

The original readiness assumption dates to 13310a9 (openclaw#148483), not the
latest hourly window. Current-main proof reproduced the missing deferred
request. The corrected file passes all five rounds in 64.48s wall including
build-lock contention; a held-admission diagnostic also passes in 34.03s.
The startup/recovery siblings pass 10 cases. Owning types and typed/boundary
lint pass; no retries, timeout changes, or suppressions were added.
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: XL 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