Skip to content

fix: update confirmation shows stale commit counts after refresh - #142837

Merged
jalehman merged 1 commit into
mainfrom
oc-40f/update-count
Sep 9, 2026
Merged

jalehman merged 1 commit into
mainfrom
oc-40f/update-count

Conversation

@jalehman

@jalehman jalehman commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users opening the Control UI update confirmation after refreshing update status see a different number of commits behind than Settings. For example, Settings shows 50 commits behind while the confirmation still shows 1.

Why This Change Was Made

Shared update labels prefer the refreshed checkout comparison when it supplies a commit count, then fall back to the announced target or cached availability. The confirmation also treats a checkout-only count as a distance, preserving its wording before target metadata arrives. Update targets, campaign state, and update execution are unchanged.

User Impact

The update confirmation and sidebar use the refreshed commit count shown in Settings. If no refreshed count exists, they retain the existing fallback.

Evidence

  • Rendered confirmation regressions fail before the fix for increasing and decreasing counts and diverged checkouts. A separate regression catches checkout-only metadata producing redundant wording.

  • After the fix, 62 tests pass across the confirmation, Settings, and sidebar suites:

    node scripts/run-vitest.mjs ui/src/app/update-confirmation.runtime.test.ts ui/src/components/sidebar-update-card.test.ts ui/src/pages/config/updates.test.ts
  • Proof uses isolated synthetic UI data. No live Gateway was updated or restarted.

  • Changed-scope checks pass, including core-test and UI typechecking, lint, formatting, i18n verification, and repository guards:

    node scripts/check-changed.mjs -- ui/src/app/update-schedule-projection.ts ui/src/app/update-confirmation.runtime.ts ui/src/app/update-confirmation.runtime.test.ts
  • Independent autoreview reports no actionable P0–P2 findings. git diff --check passes.

Prefer refreshed checkout lag in shared update labels while preserving cached fallback and distance wording.

Refs: oc-a63
@clawsweeper

clawsweeper Bot commented Sep 9, 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: S maintainer Maintainer-authored PR labels Sep 9, 2026
@jalehman
jalehman marked this pull request as ready for review September 9, 2026 04:49
@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 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 12:55 AM ET / 04:55 UTC.

ClawSweeper review

What this changes

The Control UI confirmation and shared update labels prefer refreshed checkout commit counts while preserving cached fallback values and distance wording.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused repair: current main and v2026.9.3 still prefer cached commit counts. No actionable correctness or security findings were identified.

Priority: P2
Reviewed head: 182ad506b07d793b32a951303cc85c678769251f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused presentation repair with meaningful rendered regression coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: GitHub verifies the author's maintain role, so the external-contributor proof gate does not apply; supplied synthetic dialog tests exercise refreshed-count formatting, but no real Gateway or visual before/after run is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: GitHub verifies the author's maintain role, so the external-contributor proof gate does not apply; supplied synthetic dialog tests exercise refreshed-count formatting, but no real Gateway or visual before/after run is claimed.
Evidence reviewed 9 items Introduced production change: The pinned merge-base-to-head diff changes only commit-count precedence and confirmation wording; update execution, campaign targets, and persistence are unchanged.
Current main still exhibits the source-level mismatch: Current main's shared formatter reads target.commitsBehind or cached availability without consulting install.git. Settings independently displays the refreshed install.git count.
Latest release lacks the repair: The v2026.9.3 formatter also selects the announced target or cached availability, so the proposed precedence repair is not present in that release.
Findings None None.
Security None None.

How this fits together

The Gateway supplies update targets and refreshed checkout status to the Control UI. Shared formatting turns that data into labels displayed in Settings, the sidebar, and the update confirmation.

flowchart LR
  A[Gateway update target] --> C[Shared update labels]
  B[Refreshed checkout status] --> C
  C --> D[Settings]
  C --> E[Sidebar]
  C --> F[Update confirmation]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +10, Tests +41. Total +51 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 12 2 +10
Tests 1 54 13 +41
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 66 15 +51

Review metrics

None.

Technical review

Best possible solution:

Keep checkout-distance presentation consistent across update surfaces while retaining the announced campaign target as the execution authority.

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

Yes, from source: a cached target count of 1 alongside refreshed install.git status behind with count 50 produces inconsistent Settings and confirmation labels on current main. Runtime reproduction was not executed.

Is this the best way to solve the issue?

Yes. Changing the existing shared formatter and matching confirmation wording is a narrow repair that preserves fallback behavior without modifying update policy or execution.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: Conflicting commit counts confuse update decisions, but the defect is limited to presentation and does not prevent updating.
  • 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: GitHub verifies the author's maintain role, so the external-contributor proof gate does not apply; supplied synthetic dialog tests exercise refreshed-count formatting, but no real Gateway or visual before/after run is claimed.

Label justifications:

  • P2: Conflicting commit counts confuse update decisions, but the defect is limited to presentation and does not prevent updating.
  • 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: GitHub verifies the author's maintain role, so the external-contributor proof gate does not apply; supplied synthetic dialog tests exercise refreshed-count formatting, but no real Gateway or visual before/after run is claimed.

Evidence

What I checked:

  • Introduced production change: The pinned merge-base-to-head diff changes only commit-count precedence and confirmation wording; update execution, campaign targets, and persistence are unchanged. (ui/src/app/update-schedule-projection.ts:112, 182ad506b07d)
  • Current main still exhibits the source-level mismatch: Current main's shared formatter reads target.commitsBehind or cached availability without consulting install.git. Settings independently displays the refreshed install.git count. (ui/src/app/update-schedule-projection.ts:110, 9636ae49e001)
  • Latest release lacks the repair: The v2026.9.3 formatter also selects the announced target or cached availability, so the proposed precedence repair is not present in that release. (ui/src/app/update-schedule-projection.ts:110, 1391f7cd2d40)
  • Refresh owner preserves the announced target: withInstallStatus spreads the existing schedule and replaces install metadata; refreshGatewayUpdateStatus publishes that result after refreshing the checkout comparison. This establishes why cached target lag and refreshed checkout lag can differ. (src/infra/update-startup.ts:660, 182ad506b07d)
  • Documented refresh contract: The updating guide says opening Settings for a dev Git install refreshes the tracked upstream and displays current, ahead, diverged, unavailable, or commits-behind status. Public docs: docs/install/updating.md. (docs/install/updating.md:581, 182ad506b07d)
  • Regression coverage and supplied validation: The changed rendered-dialog table covers increasing and decreasing counts, singular wording, diverged checkouts, checkout-only metadata, and cached fallback. The captured PR body reports 62 passing tests and changed-scope checks using synthetic UI data; these checks were not rerun during this read-only review. (ui/src/app/update-confirmation.runtime.test.ts:143, 182ad506b07d)

Likely related people:

  • steipete: 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.

@jalehman
jalehman merged commit 9539549 into main Sep 9, 2026
180 checks passed
@jalehman
jalehman deleted the oc-40f/update-count branch September 9, 2026 05:02
vincentkoc added a commit to LiuwqGit/openclaw that referenced this pull request Sep 9, 2026
…1-prep

* commit 'b04a3f83adad8bd6a2ca8408e7940fc6bcbde212': (636 commits)
  docs(cli): split the doctor command reference by reader job (openclaw#142855)
  fix(ui): explain paused weekly skill reviews (openclaw#142840)
  docs(automations): describe supported schedule options (openclaw#135964)
  fix(image): close registration resources after generation (openclaw#142843)
  fix(slack): keep ack reactions independent of status reactions (openclaw#142595)
  fix(ui): avoid flashes when switching cold sessions (openclaw#134868)
  refactor(tests): share independent no-queued-reply expectations (openclaw#142845)
  perf: reduce generated media reference formatting overhead (openclaw#142836)
  fix: sessions_yield keeps long transcript history available (openclaw#137381)
  fix(music): close registration resources after generation (openclaw#142834)
  fix: update confirmation shows stale commit counts after refresh (openclaw#142837)
  fix(ci): retain Android emulator post-timeout evidence (openclaw#142835)
  fix(talk): retain final delivery across delegation waves (openclaw#142830)
  docs(gateway): run Linux system services as the state owner (openclaw#136266)
  fix(models): align static Anthropic aliases with manifest (openclaw#137376)
  test(gateway): simplify session lifecycle gates and report early rollback failures (openclaw#142833)
  refactor(ai): keep model policy parsing independent of transport host (openclaw#142804)
  refactor: simplify interactive SDK forwarding (openclaw#142824)
  fix(cli): finish pending cleanup before automatic macOS exit (openclaw#142814)
  docs(memory-lancedb): clarify enforced compatibility ranges (openclaw#142827)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
…nclaw#142837)

Prefer refreshed checkout lag in shared update labels while preserving cached fallback and distance wording.

Refs: oc-a63
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: S 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