Skip to content

fix(ui): keep waiting time owned by the active turn - #139972

Merged
obviyus merged 85 commits into
openclaw:mainfrom
NianJiuZst:codex/fix-139950-waiting-timer
Sep 6, 2026
Merged

obviyus merged 85 commits into
openclaw:mainfrom
NianJiuZst:codex/fix-139950-waiting-timer

Conversation

@NianJiuZst

@NianJiuZst NianJiuZst commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #139950

What Problem This Solves

A new Control UI message can immediately show minutes of waiting because an older failed send or delayed activity from another run supplies its timestamp.

Why This Change Was Made

Keep identity and timing selection in the existing working-progress owner. A submitted send owns the acknowledgment gap. Once the run is known, queue, stream, and tool timestamps must match it. Recovery rows cannot identify unknown work, but matching durable timestamps remain available after reconnect.

User Impact

Newly submitted turns start their own timer. Acknowledgment, streaming, tools, and reconnect preserve the same turn's elapsed time. Older failed messages retain their error and Retry action. A queued message may include its own queue residence; it cannot inherit another message's age. No delivery, retry, storage, provider, protocol, or configuration change.

Evidence

  • Real Control UI → Gateway → provider HTTP fixture: baseline new turns immediately show 7s and 40s; the candidate shows 1s. A candidate turn advances from 8s before reload to 13s after reload and 18s during streamed output. Completion clears progress. The retained failure then resends and completes through the real Retry button using keyboard activation. Gateway rejection, acknowledgment, user echo, stream, history, and completion are real; only provider HTTP is mocked.

  • Real Gateway before · Real Gateway after. Original controlled browser captures below remain separate evidence.

  • Runtime evidence uses the unchanged 1d20fe1b367548afc552d243dbdaadc85e595263 build. Final head 7706c1c0c7fd2c0cfa052cf2ef32201f0ea2dfe9 only removes the now-obsolete assertion-baseline allowance; no runtime, dependency, or build input changes. Original build identity is preserved.

  • Built Control UI in Chromium with the maintained mock Gateway: baseline 8029fcccab8b8dab85fab7f9c96a36f640abf531 shows 10m on a newly submitted second turn and 20m on a third while the original failed row remains visible. Candidate 1d20fe1b367548afc552d243dbdaadc85e595263 shows 1s for each new submission.

  • Same-turn acknowledgment keeps the visual row. Stream/tool activity advances to 5s, and matching reconnect/reload retains 5s. Completion clears working progress; Retry sends the original failed message.

  • A delayed older preamble before acknowledgment backdates the baseline to 10m. The candidate stays at 1s before and after acknowledgment.

  • Independent browser acceptance covers unknown active identity, separate sessions and run namespaces, future queued sends, retained unconfirmed input beside independently active work, and restored waiting-idle input. The waiting-idle lane proves restoration behavior, not the producer transition into that state. Local delivery still pauses behind unconfirmed sends.

  • Hosted candidate build, full UI suite, mocked browser shards, and corrected timing-field lint pass in staging CI. Non-UI staging failures remain recorded; they are not claimed green or waived. Final PR checks remain a landing gate.

  • Fresh source review, pinned formatting, and git diff --check pass. Regression coverage protects retained failures, matching recovery timing, foreign activity, anonymous-to-identified continuity, and later-turn reset.

Before

New turn incorrectly shows ten minutes while an older failed message remains retryable

After

New turn starts at one second while the older failed message remains retryable

The proof reproduces concrete failure paths, not the unknown prerequisites of the reporter's photographed conversation. Controlled Gateway fixtures cover interruption and foreign-activity variants; the additional real Gateway lane proves the failed-send producer and normal later-turn flow. Neither lane uses live provider credentials. Setup failures and earlier incomplete review results are retained; the initial real-runtime package needed its matching workspace templates before provider turns could complete.

Reported by @noelillinger. Original repair by @NianJiuZst; contributor history and credit are preserved.

@clawsweeper

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

…9700)

* fix(sqlite): prevent writes after failed nested rollback

* test(gateway): derive history fixture state from its producer
@NianJiuZst
NianJiuZst marked this pull request as ready for review September 6, 2026 09:10
steipete and others added 10 commits September 6, 2026 02:10
Keep reusable sandbox lifetimes with the backend, join command finalizers,
and retain their cleanup failures while requiring host tree settlement.
Reject unsupported owned PTY requests before spawning so exec falls back once.
Use procfs for Linux group retirement without a fixed ps executable path.

Follow-up to openclaw#135868 after openclaw#139517 and openclaw#139657. Move the three related
exec-runtime test roots to the existing tools typecheck graph, preserving
the 720-root cap and complete coverage.
)

Capture the worker synchronously for this detection invocation and gate only that instance. Preserve the timeout, retry assertions, unrelated-worker negative control, and cleanup.

The original CI log does not identify the worker intercepted by the global gate. The controlled negative case proves the fixture mechanism without claiming that unobserved identity or a production lifecycle defect.
Only enabled one-shots own automatic retry scheduling. A forced invocation
while global heartbeats are paused records its outcome without re-enabling
the disabled job or scheduling another run.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…139924)

Stop OAuth fallback after catalog discovery times out while allowing an in-flight credential refresh to finish safely.

Refs openclaw#137033.
@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 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 6, 2026, 11:01 AM ET / 15:01 UTC.

ClawSweeper review

What this changes

The PR ties the Control UI waiting timer to the active chat turn and adds regression coverage for failed sends, delayed activity, acknowledgment, and reconnect.

Merge readiness

⛔ Blocked before merge - 4 items remain

This remains a useful, focused fix: current main still admits unrelated timestamps into the waiting timer. No blocking correctness finding was identified, and the updated browser evidence addresses the earlier proof request.

Priority: P2
Reviewed head: 1d20fe1b367548afc552d243dbdaadc85e595263

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful regression coverage and specific browser observations; no blocking code defect was found.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured body records after-fix behavior through the built Control UI in Chromium with the maintained mock Gateway, exercising the changed progress owner across new submissions, acknowledgment, activity, and reconnect. It supplies the previously requested before/after links; direct capture inspection remains a reviewer-side limitation recorded separately.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body records after-fix behavior through the built Control UI in Chromium with the maintained mock Gateway, exercising the changed progress owner across new submissions, acknowledgment, activity, and reconnect. It supplies the previously requested before/after links; direct capture inspection remains a reviewer-side limitation recorded separately.
Evidence reviewed 8 items Verified focused scope: The common ancestor of fetched main and the reviewed head is 76bf977. Its head delta contains only chat-progress.ts and two chat test files. The broad supplied base comparison includes history shared with fetched main and does not justify attributing unrelated platform, dependency, or storage changes to this fix.
Current-main defect remains: Current main includes every visible attempted send's createdAt and all stream/tool timestamps in the minimum, without matching them to the selected run. An older retained failed send can therefore backdate a newly submitted turn. No merged fixing PR is established by the supplied related context.
Repair at the progress owner: The candidate excludes inline recovery rows from identity selection, gives an actively submitted send precedence during acknowledgment, and accepts queue, stream, and tool timing only for matching identities. Existing same-turn cache continuity and matching durable recovery timing remain. These are local presentation decisions; the focused patch has no Codex dependency-contract signal or authority-bearing change.
Findings None None.
Security None None.

How this fits together

The Control UI combines queued messages, active-run state, streamed text, and tool activity into the chat transcript. Its progress owner selects the identity and start time used by the visible waiting indicator.

flowchart LR
  A[Queued messages] --> D[Select active turn]
  B[Active run state] --> D
  C[Stream and tool activity] --> D
  D --> E[Match timing to turn]
  F[Same-turn cached time] --> E
  E --> G[Visible waiting timer]
Loading

Before merge

  • Resolve merge risk (P1) - The already-posted before/after captures still need direct visual inspection because this review environment could not load them.
  • Complete next step (P2) - Inspect the already-posted before/after browser captures from an environment that can load them; no replacement contributor proof is requested.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

None.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #139950
Summary: This PR is the explicit candidate repair for the linked waiting-timer report; the issue should remain open until its implementation lands.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep elapsed-time selection in the existing progress owner, preserving same-turn continuity and retryable failed rows while excluding unrelated timing.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep elapsed-time selection in the existing progress owner, preserving same-turn continuity and retryable failed rows while excluding unrelated timing.

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

Yes, source establishes a concrete path: retain an older failed send, submit a new turn, and current main includes the old timestamp in its minimum. The PR reports matching browser observations; this review did not execute the application.

Is this the best way to solve the issue?

Yes, the focused repair uses the existing timing owner and existing run identities without changing delivery, persistence, configuration, or provider contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs a misleading elapsed-time display without demonstrated delivery loss or blocked chat.
  • 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. Sufficient (live_output): The captured body records after-fix behavior through the built Control UI in Chromium with the maintained mock Gateway, exercising the changed progress owner across new submissions, acknowledgment, activity, and reconnect. It supplies the previously requested before/after links; direct capture inspection remains a reviewer-side limitation recorded separately.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body records after-fix behavior through the built Control UI in Chromium with the maintained mock Gateway, exercising the changed progress owner across new submissions, acknowledgment, activity, and reconnect. It supplies the previously requested before/after links; direct capture inspection remains a reviewer-side limitation recorded separately.

Evidence

What I checked:

  • Verified focused scope: The common ancestor of fetched main and the reviewed head is 76bf977. Its head delta contains only chat-progress.ts and two chat test files. The broad supplied base comparison includes history shared with fetched main and does not justify attributing unrelated platform, dependency, or storage changes to this fix. (1d20fe1b3675)
  • Current-main defect remains: Current main includes every visible attempted send's createdAt and all stream/tool timestamps in the minimum, without matching them to the selected run. An older retained failed send can therefore backdate a newly submitted turn. No merged fixing PR is established by the supplied related context. (ui/src/pages/chat/chat-progress.ts:218, 7f28cd9b2148)
  • Repair at the progress owner: The candidate excludes inline recovery rows from identity selection, gives an actively submitted send precedence during acknowledgment, and accepts queue, stream, and tool timing only for matching identities. Existing same-turn cache continuity and matching durable recovery timing remain. These are local presentation decisions; the focused patch has no Codex dependency-contract signal or authority-bearing change. (ui/src/pages/chat/chat-progress.ts:196, 1d20fe1b3675)
  • Production caller and lifecycle: The transcript builder passes the current run, queue, stream segments, and tools into the progress owner, clears cached progress when work settles, and supplies the result to the reading indicator. Run adoption and history restoration already own the active stream's start time. (ui/src/pages/chat/chat-thread-build.ts:625, 1d20fe1b3675)
  • Behavioral regression coverage: The added transcript-builder test retains one failed row through two successive turns and checks submission timing, acknowledgment key continuity, reconnect timing, and completion clearing. Progress-owner cases cover foreign activity, unknown identity, matching recovery rows, and anonymous-to-identified continuity. Tests were inspected, not executed. (ui/src/pages/chat/chat-thread.test.ts:1792, 1d20fe1b3675)
  • Updated browser proof and review continuity: The captured PR body reports built Control UI Chromium observations through the maintained mock Gateway: baseline new submissions show 10m and 20m, while the pinned candidate shows 1s; acknowledgment preserves the row, stream/tool activity reaches 5s, matching reconnect retains 5s, and Retry resends the failed message. It now links before/after captures, addressing the previous review's sole rank-up request. The reported environment exercises the actual presentation path without claiming live-provider coverage. (1d20fe1b3675)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vyctor H. Brzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Complete direct inspection of the existing before/after captures to satisfy the repository's visual-proof requirement.

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-06T09:16:03.857Z sha a021002 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T11:27:32.974Z sha a021002 :: needs real behavior proof before merge. :: none

* fix(tooling): preserve native TypeScript loading under Bun

* fix(tooling): use supported Bun source imports
…9812)

Correct stale scanner-gated cleanup and collection-backup claims, preserve the separate capture workflow, and link canonical skill precedence and refresh guidance. Runtime behavior and configuration shape are unchanged.
…penclaw#139664)

* fix(linux): keep widget replies connected and correctly placed

Carry bounded Canvas descriptors through live Gateway delivery, finalization
and cancellation. Keep Quick Chat attached to its native window and let
GTK own primary and widget geometry. Preserve external browser links while
allowing Dashboard widget frames to load in the app.

Consolidate Rust widget, queue, identity and RTC ownership; update safe
dependencies and the pinned Watch compiler. Remove 141 production Rust
lines while preserving credential serialization and the Watch C ABI.

Validation: reviewed through P2; 135 desktop tests on macOS, 146 Linux
test executions and native build; Gateway owner regressions and changed
gates; Watch debug/release tests and four-architecture C linkage.

* fix(linux): preserve compact sizing and native browser links

* fix(linux): dismiss widget replies after unhandled Escape

* fix(linux): ignore stale Quick Chat blur events
Give the shared Watch status type one legacy decoder implementation. Preserve snapshot wire and persistence shapes, semantic status precedence, localized fallback text, and staggered iPhone/Watch compatibility.
…9900)

* fix(agents): preserve exact session model identities

Resolve model references through one collector that prefers exact model IDs
before unambiguous case-insensitive matches. Stop ambiguous references before
fuzzy selection or custom-model construction instead of choosing the first
provider or a differently cased model.

Preserve qualified-provider precedence, raw slash IDs, human names, version
ordering, thinking suffixes, custom models and glob scopes. Remove duplicate
folded lookup branches and document the session SDK contract.

Refs openclaw#130706. Production code decreases by 28 lines.

* fix(agents): preserve canonical session model references

Share registered-provider scope preparation across reference lookup and CLI
selection. Preserve full tuple spelling across slash boundaries, exact model
IDs, literal components and thinking suffixes. Ambiguous references must not
choose an owner through fuzzy ranking or custom-model fallback.

Keep all duplicate names as aliases while returning the registry-first model
object. Consolidate suffix, version ordering and fallback selection, removing
the overwritten provider map and first-slash inference path.

Check complete literal IDs before interpreting thinking suffixes; explicit
provider selection keeps its existing override.

All 55 owner tests and typed lint pass. The complete matching cut adds seven
production lines after removing duplicate paths. Refs openclaw#130706.
Share scoped activation, enablement, registration planning and manifest-record preparation between runtime and CLI metadata loading while retaining their distinct entrypoint policies.

Retire the private required-setup option left behind when read-only channel loading moved to per-manifest setupSource guards. Keep manifest-record construction private and cover build-version normalization through the preparation owner.

Preserve activation reasons independently of enablement, scope-before-import behavior, setup trust boundaries, manifest trust and control UI metadata, and source-root channel policy during normalized config reuse. No public CLI, plugin SDK, configuration, dependency or persistence contract changes.
@obviyus obviyus changed the title fix(ui): reset waiting time after earlier failed sends fix(ui): keep waiting time owned by the active turn Sep 6, 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. 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 6, 2026
@obviyus
obviyus merged commit c121a1d into openclaw:main Sep 6, 2026
168 checks passed
@obviyus

obviyus commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Thanks @NianJiuZst! The original repair history and contributor credit are preserved.

Bug: An older failed send could make a newly submitted message immediately show the old waiting time.

Fix: The existing progress owner selects identity and timestamps for the current turn. Matching acknowledgment, stream, tool, and reconnect activity keep that turn's elapsed time. Failed messages retain their recovery controls.

Before After
Real Gateway: new turns immediately showed 7s and 40s. New turns showed 1s while the older failed message remained.
Controlled interruption fixture: new turns showed 10m and 20m. New turns showed 1s; same-turn stream/tool/reload retained 5s.

Real Gateway reload continued from 8s to 13s; streamed output continued to 18s and completion cleared progress. Native keyboard Retry sent the retained original message and reached a complete answer. Only provider HTTP was mocked in that lane. The separate controlled Gateway fixtures cover foreign activity, unknown identity, recovery and session/run isolation.

Real before · Real after · Exact-head CI

Runtime proof retains its actual 1d20fe1 build identity. The final 7706c1c head only removes the obsolete static assertion allowance. Exact-head CI passed; no CI exception was used. Earlier setup failures and incomplete review results remain in the retained proof history.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
Keep the existing progress owner tied to the active turn. Older failed messages retain their recovery controls without backdating later sends; matching acknowledgment, stream, tool, and reconnect facts preserve continuity.

Verified compiled Control UI and real Gateway before/after, controlled interruption and foreign-activity probes, independent behavior assessment, and exact-head review and CI. Preserve the original contributor's repair history.

Closes openclaw#139950

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: ios App: ios app: linux app: macos App: macos app: web-ui App: web-ui channel: imessage Channel integration: imessage channel: irc channel: line Channel integration: line channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: signal Channel integration: signal channel: sms Channel integration: sms channel: synology-chat channel: voice-call Channel integration: voice-call channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: acpx extensions: codex extensions: diagnostics-otel Extension: diagnostics-otel extensions: memory-core Extension: memory-core extensions: microsoft-foundry extensions: openai extensions: policy extensions: qa-lab extensions: voyage gateway Gateway runtime P2 Normal backlog priority with limited blast radius. plugin: file-transfer plugin: teams-meetings Teams Meetings plugin plugin: workboard plugin: zoom Zoom plugin proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

[Bug]: Control UI waiting timer carries over between turns

8 participants