Skip to content

fix(ui): bind stale run state to run identity#100527

Merged
steipete merged 1 commit into
mainfrom
codex/pr-91680-run-identity-clean
Jul 6, 2026
Merged

fix(ui): bind stale run state to run identity#100527
steipete merged 1 commit into
mainfrom
codex/pr-91680-run-identity-clean

Conversation

@steipete

@steipete steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI could switch the composer back to Stop after a run had completed when delayed session publications repeated stale active state. The original timer-based proposal could also hide a genuinely newer run.

Fixes #88033. Supersedes #91680 after its contributor fork could not retain clean rebased ancestry; contributor credit is preserved through co-authorship and the maintainer release-note batch.

Why This Change Was Made

Gateway session list, history, mutation, transcript, and lifecycle projections now carry deterministic visible active-run IDs. The Control UI records the exact locally completed run ID and suppresses only a stale publication for that same run. Newer, missing, ambiguous, and terminal session states remain conservative.

This removes timestamp-ordering and timeout guesses. The Gateway owns run identity; the UI consumes that fact instead of inferring freshness from clocks.

User Impact

After a reply completes, the composer remains on Send even if delayed session state repeats that completed run. A real follow-up run still switches the composer to Stop immediately.

Evidence

  • Blacksmith Testbox tbx_01kwt3gy25f6vrxsven71k22mz: 284 focused Gateway test executions, 248 focused Control UI tests, and Chromium E2E 1/1 passed.
  • Live in-app browser: after terminal completion and a repeated exact stale-run publication beyond the former 10-second window, Send remained enabled and Stop absent; a newer run ID remained active.
  • pnpm check:changed and pnpm build passed on Testbox.
  • Fresh full-branch autoreview: no accepted/actionable findings.
  • git diff --check passed.

One focused maintainer commit; original contributor preserved with Co-authored-by: Tiffany Chum <tiffanychum@users.noreply.github.com>.

AI-assisted: Yes (Codex).

Co-authored-by: Tiffany Chum <tiffanychum@users.noreply.github.com>
@clawsweeper

clawsweeper Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(ui): bind stale run state to run identity This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete

steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready maintainer pass complete on ba84e085e4c38e06b8de6ed4909da3c3312afec5.

Verification:

  • Blacksmith Testbox tbx_01kwt3gy25f6vrxsven71k22mz: 284 focused Gateway test executions, 248 focused Control UI tests, and Chromium E2E 1/1 passed.
  • Blacksmith Testbox tbx_01kwtdcpm4pefrxn940m0gy2mf: the complete real-backend TUI PTY file passed 8/8; the previously timed-out /new session-adoption case also passed in isolation.
  • In-app browser: repeated publication of the exact completed run kept Send enabled; a newer run ID remained active.
  • pnpm check:changed, pnpm build, and git diff --check passed.
  • Fresh full-branch autoreview found no accepted/actionable findings.
  • Exact-head hosted CI passed on rerun at the same SHA, including the previously timed-out shard: https://github.com/openclaw/openclaw/actions/runs/28761567383

No known proof gaps for the touched Gateway and Control UI run-lifecycle surface.

@steipete
steipete merged commit 4f8eeea into main Jul 6, 2026
179 of 185 checks passed
@steipete
steipete deleted the codex/pr-91680-run-identity-clean branch July 6, 2026 01:33
@steipete

steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 6, 2026
Co-authored-by: Tiffany Chum <tiffanychum@users.noreply.github.com>
giodl73-repo pushed a commit to giodl73-repo/openclaw that referenced this pull request Jul 8, 2026
Co-authored-by: Tiffany Chum <tiffanychum@users.noreply.github.com>
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 gateway Gateway runtime maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Webchat composer stays stuck on red Stop button after response completes

1 participant