Repository navigation
fix(ui): keep task progress collapsed after scrolling through history - #149384
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 12:33 AM ET / 04:33 UTC (Revision 11). ClawSweeper reviewWhat this changesThe PR makes task-progress collapse depend on settled transcript scrolling, remembers session-specific manual choices, and keeps the composer available while progress loads. Merge readiness✅ Ready for maintainer review This PR remains necessary: current main still reopens progress when readers return to the bottom. The refined issue specification, browser evidence, and repaired regression coverage support the patch; no actionable correctness finding remains. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI displays Gateway-backed task progress above the chat composer. Its disclosure controller combines transcript movement, run completion, and manual choices to decide whether the card is expanded. flowchart TD
A[Gateway progress and run updates] --> B[Session progress presentation]
C[Transcript scroll observer] --> D[Disclosure controller]
E[Manual session choices] --> D
B --> D
D --> F[Expanded or collapsed card]
B --> G[Available chat composer]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +610, Tests +1403, Docs +11. Total +2024 across 29 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep disclosure decisions in the card controller, derive movement from the existing transcript observer, and preserve the real composer and session identity throughout loading and reconnects. Do we have a high-confidence way to reproduce the issue? Yes, from source: on current main, an automatically open card closes in history and reopens when readingHistory becomes false. This review did not execute a current-main reproduction. Is this the best way to solve the issue? Yes. The patch follows the refined issue specification, removes the previous disclosure owner, and reuses transcript observations without changing Gateway state or stored settings. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bc28af41e101. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
696a020 to
45392bc
Compare
45392bc to
d86e2de
Compare
bd1087f to
ffd8697
Compare
b0a24f1 to
fc1e633
Compare
|
Merged via squash.
|
|
Resolved on main by #149697, landed as Our alternative blocker PR #149722 is closed as superseded. The separate optional reply-setter cleanup #149735 remains author-owned and unlanded. No further repair handoff is requested here. |
Keep the existing progress-dismiss and agent-change callbacks as explicit void expressions, preserving their undefined returns and side effects. This brings the renderer back within its existing max-lines limit after #149384 without changing UI behavior.
* fix(cron): normalize current-session completion payloads * fix(cron): account for completed interim retry prompts * fix(cron): preserve final context after retry accounting * refactor(cron): centralize stale delivery policy * fix(cron): clear stale billing after context-only retries * fix(sessions): reuse the admitted entry during Goal edits Reuse the entry already read in the current write transaction when capturing previous session identity. Preserve the other lookup keys, current authority checks, post-write identity reads, and canonical certification. This resolves the interaction between #149537 and #149388 without changing the existing query budget. The unchanged test reproduces on their combined main state; all 38 Goal, identity, and canonical-validation tests pass after repair. * refactor(ui): simplify chat pane callbacks Keep the existing progress-dismiss and agent-change callbacks as explicit void expressions, preserving their undefined returns and side effects. This brings the renderer back within its existing max-lines limit after #149384 without changing UI behavior. * fix(ci): accept file paths in extension packing fixtures
…openclaw#149384) * fix(ui): keep task progress collapsed after scrolling through history * fix(ui): preserve composer and count consumed transcript scrolling * fix(ui): simplify progress disclosure and preserve gesture ownership * fix(ui): preserve progress choices across reconnects * test(ui): align dock scrolling with progress disclosure choices * test(ui): synchronize progress interaction proof
…49697) * fix(cron): normalize current-session completion payloads * fix(cron): account for completed interim retry prompts * fix(cron): preserve final context after retry accounting * refactor(cron): centralize stale delivery policy * fix(cron): clear stale billing after context-only retries * fix(sessions): reuse the admitted entry during Goal edits Reuse the entry already read in the current write transaction when capturing previous session identity. Preserve the other lookup keys, current authority checks, post-write identity reads, and canonical certification. This resolves the interaction between openclaw#149537 and openclaw#149388 without changing the existing query budget. The unchanged test reproduces on their combined main state; all 38 Goal, identity, and canonical-validation tests pass after repair. * refactor(ui): simplify chat pane callbacks Keep the existing progress-dismiss and agent-change callbacks as explicit void expressions, preserving their undefined returns and side effects. This brings the renderer back within its existing max-lines limit after openclaw#149384 without changing UI behavior. * fix(ci): accept file paths in extension packing fixtures
Closes #149293
What Problem This Solves
Fixes Task progress reopening when readers return to the end, hiding the composer during its first read, and collapsing when a tool output consumes the scroll instead of the transcript.
User Impact
The real composer remains available during history and progress loading. Readers can type and queue an attachment without losing the textarea, draft, focus, or destination. Only the progress slot reserves space. Deliberate upward transcript scrolling can collapse Task progress after settlement; returning to the end and progress updates leave it collapsed.
Why This Change Was Made
Each mounted card keeps the existing pure disclosure reducer, thresholds, connection/session manual memory, and disposal lifecycle. Input identifies gestures; the transcript's existing offset observer measures native movement, including touch inertia, and excludes its programmatic writes. Input is recorded before synchronizing offsets because the browser can apply a wheel's movement before delivering that wheel event. The observer also owns local touch contacts so a finger elsewhere cannot hold this transcript's history prepend.
Evidence
The repair was exercised through the real Control UI in Chromium with synthetic Gateway data. Before P1, the reviewed head had no usable textarea while loading. After P1, the same textarea survives queued text/attachment delivery, pending progress, both response orders of a history refresh and first progress read, and card/empty/error results. Initial
chat.startupstill admits identity and history atomically; the tests preserve that ordering.The reconnect pairs use the same short-name split-pane fixture, with only the retained-card identity repair removed for the before captures. Automatic collapse survives disconnect, and a manual close made while offline survives reconnect.
P2 comparison uses the same candidate and fixture with only the disclosure controller restored to reviewed head
59af8d04d38e87def825f52cfe08925ea3ec8059for the before capture. The output consumes 720 px from three native wheels while the transcript stays at the same offset. Canceled wheel consumes zero. Both retain the manual choice after completion and leaving/returning to the chat. Two native CDP drags travel only 280 px with the fingers but cross the 320 px transcript threshold through inertia.b0a24f1df122dc027545be025f0a87c43730a093. Its first CI run lost the SSH desktop viewer after control takeover (expected 900 × 500 framebuffer; WebSocket closed with1000 / stream-close). The desktop owners were byte-identical to its tested base. The same signature is recorded in @vincentkoc's SSH desktop diagnostics PR. A single close/reopen started a second run, which advanced past desktop into the real-Gateway suites. While its last Node shard was running, a new main change introduced a content conflict, so the exact-head watcher stopped for that conflict; no green result is claimed for that head.The new reviewed head is
fc1e6331dcb4f6b4cc413629da9fab698601313b, rebased onto2c3391ee9bc90c5754182238ec6fd8daaf56f108. The conflict combined independent insertions in retained presentation from @steipete's queued-correction preservation change. The complete progress block remains byte-identical to the previous head; the queued-edit fields and navigation method remain byte-identical to main. All six commits are retained. Its exact-head CI failed again in the desktop resize proof atdesktop-resize.real-gateway.e2e.test.ts:630. This time the Node transport failed before SSH ran: expected 900 × 500 framebuffer, no canvas, and the same takeover followed by1000 / stream-close. The sanitized failure report and final checkpoint are identical to the earlier SSH failure; the carrier differs. All seven checked desktop runtime, test, and harness files are byte-identical between this head, its tested base, and its CI merge. The later real-Gateway suites were skipped. A local comparison was run before the single authorized failed-job rerun; no further close/reopen was attempted.The same CI bootstrap (
OPENCLAW_BUILD_PRIVATE_QA=1 pnpm build:ci-artifacts, thennode --import tsx scripts/test-desktop-resize-real.mts) was run three times on this head and three times on mainfaad1d457de877b2cb96f038a48da402697282e3, alternating clean isolated checkouts on Ubuntu 24.04 x86_64. Both used identical desktop test/bootstrap files and installed package versions.fc1e6331dcbfaad1d457deAll three SSH failures have the same complete sanitized diagnostic as the first hosted failure: line 630, no 900 × 500 framebuffer, and stream closure after takeover. Every invocation confirmed clean source identity and completed fixture cleanup. This reproduces the intermittent failure independently of the PR; it does not establish the underlying stream-close cause. After attempt 1 completed, one
gh run rerun 35053746283 --failedstarted attempt 2 on the unchanged head. Attempt 2 passed, including desktop Node/SSH and the remaining real-Gateway suites. The canonical exact-head watcher completed successfully onfc1e6331dcb4f6b4cc413629da9fab698601313b; no second failed-job rerun was used.Lines of code
Counts include the complete PR relative to its base; test support is included with tests. Unrelated main-branch changes are excluded. The cleanup and review-repair figures describe the current rebased branch.
Removed repeated reducer scenarios, consolidated rendered-card fixtures, removed a test-only partial-gesture option, and linked the detailed interaction documentation from the chat guide. Retained native scroll, startup response ordering, focus, session memory, and motion coverage. Cleanup removed 76 net lines. The six reproduced review repairs add 166. The first CI fixture migration removes 22, and explicit input delivery plus direct editor geometry adds 36, and the rebase makes one type import inherited from main, leaving the final candidate 103 net lines larger than the initial head. Production is six net lines larger; the remaining growth protects the proved timing, identity, reconnect, and simultaneous-pane failures. Reconnect cases share the existing Gateway fixture.
State coverage
Risk and coverage
P1's whole-conversation loading gate is removed. The disposable progress reservation may change height when the first response arrives. Input and textarea geometry are sampled from before that response through twenty frames after resolution; shell geometry is checked after resolution. Scroll attribution depends on the shared transcript observer's input, offset, touch and programmatic-scroll lifecycle. Focused coverage includes compositor-before-input ordering, retained rows and message lookup during prepend, foreign touch contact release, nested output, canceled wheel, native wheel/touch, scroll-to-end, and deferred history prepend.
Consumers checked:
ChatSessionVirtualizerHost→observeTranscriptOffset→ProgressDisclosureController: one native-scroll owner, exercised by transcript ownership/controller units and scroll/disclosure E2Es.ChatPaneRetainedPresentation,ChatPane.render,renderChat, andrenderChatComposerView: startup admission, retained card/identity presentation, slot reservation, real textarea and queue delivery. The canonical identity stays with the cached card under the same retirement rules while read admission is suspended.renderSessionProgressCardandSessionProgressCardController: reducer/rendered-card lifecycle and progress refresh behavior.session-progress-live-placement.e2e.test.tsandsession-progress-motion.e2e.test.ts: placement, completion/manual choice, ordinary/reduced motion.session-hovercard.ts: separate read-only presentation uses the unchanged progress markdown/heads-up helpers; existing PR evidence includes hovercard E2Es; this landing pass does not claim a fresh rerun.ui/src/lib/board/widgets/session-progress.tsandui/src/plugins/control-ui-session-summary.ts: unchanged board rendering branch; existing PR evidence includes widget E2Es; the plugin call site was inspected.chat-position-rail.e2e.test.tsandchat-position-rail-layout.e2e.test.ts: transcript/composer geometry.chat-history-prepend-anchor.e2e.test.tscovers the shared observer's prepend lifecycle.The reducer, manual memory boundaries and fixed thresholds are preserved. Automatic collapse clears only a remembered open choice, preserving a close recorded by another pane; no settings, Gateway protocol, storage or dependencies change. Fresh landing validation covers composer, progress placements, motion, position-rail layout, and retained queued-edit update/reload integration. Earlier PR evidence also includes hovercard, board widget, and an isolated real-Gateway catalog-hovercard identity test; these were not rerun in this pass. P1/P2 interaction proof uses the synthetic Gateway. Browser proof covers Chromium emulation; it does not establish physical mobile-device, Safari or Firefox behavior. No baseline was updated.