Skip to content

feat(desktop): show trustworthy turn results / 展示可信的本轮结果 - #9869

Merged
SivanCola merged 5 commits into
esengine:main-v2from
SivanCola:fix/completion-verification-labels
Sep 8, 2026
Merged

feat(desktop): show trustworthy turn results / 展示可信的本轮结果#9869
SivanCola merged 5 commits into
esengine:main-v2from
SivanCola:fix/completion-verification-labels

Conversation

@SivanCola

@SivanCola SivanCola commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

The completion card previously mixed mutation counts with verification guidance and could imply that a turn had been verified without showing the commands that actually ran. This change makes it a read-only Turn results entry: confirmed net file changes, recorded check outcomes, and direct access to the evidence for that specific turn.

  • Freeze checkpoint-owned net changes when the turn ends. Repeated edits, creates, deletes, no-ops, binary files and mode changes are handled explicitly. External changes, missing snapshots and size limits produce partial/unknown coverage; they never become an invented zero or an exhaustive workspace claim.
  • Keep historical patches stable, even after later edits or rewind. The existing checkpoint store retains the optional result, and the existing display sidecar carries its summary. Retention expires patch payloads while preserving the summary. Processing and retained patches share a 2 MiB turn budget.
  • Show running, passed, failed, interrupted, stale, unverified and unavailable check states from execution receipts. Details expose the original command, exit code and bounded log. Stable local message IDs prevent a reused provider call ID from opening another turn's log.
  • Add View changes and View check details actions, a per-turn workspace panel, and a link back to the full workspace view. Session, turn, result and request identity guards reject delayed responses after navigation. These controls do not execute or retry commands.
  • Preserve legacy history compatibility and the existing full/windowed transcript kernel. Add English, Simplified Chinese and Traditional Chinese copy, plus bilingual documentation.

Validation covers the real controller completion path (success/error/cancel), frozen snapshots and retention, event-wire round trips, stable log sources, delayed UI responses, history hydration, and current-versus-historical inspection. Browser checks use the actual Transcript, reducer, result panel and DiffView with fixture execution APIs; backend tests independently exercise real checkpoint/controller storage. Light/dark themes, 280 px layouts, long paths, failures and history selection were inspected in the browser.

Local implementation gates passed: root and Desktop go test ./...; go test -race for checkpoint/control/completion/eventwire and focused Desktop result/display paths; root and Desktop golangci-lint; repolint; frontend typecheck and all 330 standard test suites; production build and bundle budget; full macOS ARM64 wails build -clean including generated bindings, frontend, native compilation and packaging. CI exposed one additional dedicated test that still expected the old default workspace verification panel. The follow-up test-only commit fixes that assertion, and all 386 commands from node scripts/run-ci-tests.mjs now pass locally. GitHub checks are tracked on the published head separately.

Build size was measured against main-v2 at 45239b1: raw runtime JS 2,464,923 → 2,477,508 bytes (+12,585 / 0.51%); gzip runtime JS 454,722 → 458,209 bytes; CSS 122,869 → 123,257 bytes. Only the measured CSS, locale and raw-JS budgets receive narrowly rounded increases. The initial gzip-JS budget is unchanged. Source extractions keep the existing ownership boundaries; the only per-file line-baseline increases are WorkspacePanel +7, bridge +2 and types +8. Global repolint limits are unchanged.

Related work: merge-tree checks with #9911 (checkpoint retention configuration) and #9929 (transcript eviction) are clean; their later integration should retain result-payload accounting/expiry and result record sizing. #9966 requires coordinated semantic conflict resolution in check-bundle-budget.mjs, TranscriptCards.tsx, transcriptStore.ts, types.ts, useController.ts and eventwire/tool.go, preserving both its read status and this PR's result/Verifying fields. These PRs are not dependencies or included implementations. The current main-v2 settings-layout update at 7717f3e merges cleanly with this branch.

Limits: only changes with trustworthy checkpoint ownership are counted; historical data without receipts remains unavailable; log payloads may disappear with existing history retention. Bounded content processing does not establish a worst-case filesystem latency guarantee. Native Windows/Linux behavior remains subject to their CI jobs.

Documentation-impact: updated - document turn result coverage, frozen historical diffs, read-only inspection, recorded checks, log identity and retention in docs/TURN_RESULTS.md and docs/TURN_RESULTS.zh-CN.md, linked from the checkpoint guides.
Cache-impact: none - result metadata is host-owned receipt/display data; system prompts, provider request serialization, tool names and tool schemas are unchanged.
Cache-guard: existing provider-prefix and schema guards are exercised by the root Go suite; focused receipt/eventwire tests verify the added display metadata contract.

@SivanCola
SivanCola requested a review from esengine as a code owner September 6, 2026 20:15
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Sep 6, 2026
@SivanCola
SivanCola force-pushed the fix/completion-verification-labels branch 2 times, most recently from 0e87b6f to 5419db8 Compare September 6, 2026 20:19
Problem: completion notices used the same verification label for failed and limited checks.\nRoot cause: the action label ignored completion gap kinds and attention state.\nFix: map failed, limited, and attention states to explicit verification actions across locales.\nVerification: desktop frontend typecheck and completion summary UI checks.
@SivanCola
SivanCola force-pushed the fix/completion-verification-labels branch from 5419db8 to f8d4276 Compare September 6, 2026 20:20
@github-actions github-actions Bot added the agent Core agent loop (internal/agent, internal/control) label Sep 6, 2026
Problem: the completion-label branch lacked the current transcript and session ownership model.

Fix: merge the current main-v2 baseline without rewriting the published branch history.

Verification: root and Desktop Go suites pass on the integrated worktree; turn result changes are validated separately.
Problem: completion notices confused mutation receipts with changed files and offered no reliable historical diff or check evidence.

Root cause: the view reused workspace-wide state and aggregate completion labels without retaining per-turn capture coverage or stable log sources.

Fix: freeze bounded checkpoint net changes; preserve optional receipt metadata through terminal events and display history; expose read-only turn diffs and stable-message check logs; show explicit partial, unavailable, running, failed, stale, and interrupted states. Keep result cards stable across updates and fence delayed session responses. Extract display-buffer and wire-tool projection helpers into their owning modules.

Verification: root and Desktop Go suites; focused race and cancellation tests; frontend type checks and 328 test suites; real browser fixtures covering both themes, narrow paths, log expansion, missing data, and historical cards. Final integration and bundle checks follow the latest main-v2 merge.
Problem: main-v2 advanced while turn result inspection was being implemented.

Fix: retain the new welcome and recovery behavior alongside the result-card integration.

Verification: rerun branch gates and measure bundle deltas against this exact baseline before publication.

# Conflicts:
#	desktop/frontend/scripts/check-bundle-budget.mjs
@SivanCola SivanCola changed the title fix: clarify completion verification actions / 明确本轮验证操作 feat(desktop): show trustworthy turn results / 展示可信的本轮结果 Sep 8, 2026
Problem: the dedicated CI workspace test still expected a completion panel in the full workspace view.

Fix: assert that whole-workspace errors and empty state remain independent of turn receipts, and require an explicit request for the per-turn panel.

Verification: all 386 commands in the frontend CI test plan pass, including the previously failing dedicated test; repolint and diff checks pass.
@SivanCola
SivanCola merged commit 8c9932d into esengine:main-v2 Sep 8, 2026
36 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant