Skip to content

vscode: redesign the proof job panel - #520

Merged
0xGeorgii merged 3 commits into
mainfrom
feat/vscode-prover-ux
Oct 10, 2026
Merged

0xGeorgii merged 3 commits into
mainfrom
feat/vscode-prover-ux

Conversation

@0xGeorgii

@0xGeorgii 0xGeorgii commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #519; this is PR 1 of 3. The next two cover the Proof Jobs view and status bar, then the prove flow and docs.

Why

The local test of #519 against the deployed prover showed the panel was hard to read:

  • A compile failure said only compile_failed: file did not compile (see build.log). The real cause (clamp already exists) took a database query to find.
  • Statuses and claims were raw enums (StructuralOnly, PartialSuccess, prove), and the trust banners used internal terms ("DTOs do not agree", "persisted mode").
  • The event log was one flat list of up to 2000 lines, including heartbeats.
  • Every update replaced the whole page, which reset focus, open sections and scroll.

Change

  • Plain verdicts. jobVerdict.ts is the single source of wording (the tree and status bar use it in the next PR). The fail-closed claim rules are unchanged; the evidence checks moved verbatim into verifierEvidence.ts. A proof is claimed only with a matching result that the independent verifier fully accepted. Raw codes now appear only under a collapsed Technical details section.
  • Compile failures. The panel reads build.log and shows the first Rocq error inline, with Go to line N and Open build log. Go to line opens the local .v when it is unchanged, otherwise the uploaded copy. When the error is <stem> already exists, a hint explains the module-named-after-the-file clash.
  • Run steps. Submitted › Worker › Proving › Verifying › result, built from the event history. A failed run is marked at the step where it stopped.
  • Obligations. Each shows its kind and statement in plain words, whether a template or the agent closed it, its time, goal and source line. Lists of more than ten are grouped. A closed obligation is labelled "Proved" only when the run claims a proof; otherwise "Closed — not verified".
  • Activity. Grouped by obligation, with a Steps / Agent / All filter and a text filter. Heartbeats are no longer listed.
  • Live timer. Elapsed and remaining time against the budget. The deadline comes from the job (Inferara/inference-ai-prover#270), else the job.queued event, else submission time plus budget.
  • Stable updates. The page is set once and then patched by region (ready handshake → snapshot → region diffs). Loading states make no claim. Panels are restored after a window reload (WebviewPanelSerializer, onWebviewPanel:inference.proofJob), and the tab has an icon.
  • Native look. Theme colours only (the hard-coded #fff/#1e1e1e badge text is gone), inline codicon-style SVG icons, high-contrast and reduced-motion rules, focus outlines, and ARIA roles for the verdict, progress and filters.
  • Visual harness. test/visual/render.ts renders every state under dark, light and both high-contrast themes. It lives under test/, so it is not packaged.

No new packaged files: the .vsix keeps the same 11 entries.

Verification

In node:24: npx tsc --noEmit -p .; npm test (482 pass); npm run "test syntax" (93 pass); npm run package, then the CI file-list check.

New tests:

  • the verdict matrix, plus an exhaustive check that the success tone and claim appear only with full evidence;
  • the run model;
  • build-log parsing (the real clamp already exists log);
  • loading and accessibility.

I also rendered all 12 states × 4 themes and reviewed the screenshots.

Risk

The webview patch protocol is new, and the full snapshot on ready keeps it recoverable. Claim rules are not edited, and the property test guards them. ProveOutcome and SubmitOutcome gain fields (vSha256, sha256) used to remember which local file a job came from.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the remaining browser-test suggestion is non-blocking.

Findings

  1. P2 Stable updates lack tests ▶

Diagram

sequenceDiagram
    participant Host as Extension
    participant Page as Proof-job page
    participant Server as Proof server
    Host->>Page: Set page shell
    Page->>Host: ready
    Host->>Page: snapshot (regions, activity, clock)
    Server-->>Host: Job detail and events
    Host->>Page: Changed regions
    Host->>Page: New activity
    Host->>Page: Changed clock
    Page->>Page: Restore open sections and focus
Loading

Reviews (3) · Last reviewed commit: "vscode: address review of the job panel" · Reviewed by Greptile

The panel now says what a run means in plain words and keeps its state
while it updates.

- One wording source (jobVerdict) over the unchanged fail-closed claim
  rules: a proof is claimed only with a matching, fully accepted
  independent-verifier result. Raw statuses, enums and error codes move
  to a collapsed Technical details section.
- A compile failure shows the first Rocq error from build.log inline,
  with Go to line, Open build log and a hint for the module-named-after-
  the-file clash ("clamp already exists").
- Run steps (Submitted, Worker, Proving, Verifying, result) come from
  the event history; a failed run is marked where it stopped.
- Obligations: plain kind and statement labels, template or agent, time,
  goal, source line; grouped when there are more than ten. A closed
  obligation is "Proved" only when the run claims a proof.
- Activity replaces the flat event log: steps, agent transcript and
  problems, grouped by obligation, with a Steps/Agent/All filter and a
  text filter. Heartbeats are no longer listed.
- Live elapsed/remaining time against the budget; deadline from the job,
  the job.queued event, or submission + budget.
- The page is set once and patched by region, so focus, open sections,
  filters and scroll survive updates; loading states make no claim;
  panels are restored after a window reload; the tab has an icon.
- Native look: theme colours only (no hard-coded badge text colours),
  inline codicon-style SVG icons, high-contrast and reduced-motion rules,
  focus outlines, ARIA roles for the verdict, progress and filters.
- test/visual/render.ts renders every state under dark, light and both
  high-contrast themes for review (not packaged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread editors/vscode/src/prover/jobVerdict.ts Outdated
Comment thread editors/vscode/src/prover/jobDetailHtml.ts Outdated
Comment thread editors/vscode/src/prover/buildLog.ts
Comment thread editors/vscode/src/prover/jobDetailView.ts Outdated
Comment thread editors/vscode/src/prover/jobDetailView.ts
Comment thread editors/vscode/src/prover/jobDetailView.ts Outdated
Comment thread editors/vscode/src/prover/jobDetailView.ts Outdated
Comment thread editors/vscode/test/visual/render.ts
"Go to line N" on an obligation opened the line the server reported, which
is the proof hole ((* TODO: fill the proof *)) in the submitted file, even
for a proved obligation. A proved obligation now links to its proof in the
returned file ("Go to proof"); any other links to its theorem statement in
the submitted file ("Go to theorem"). Lines differ between the two files,
so the host finds the theorem by name and falls back to the reported line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread editors/vscode/src/prover/rocqSource.ts
- Claim structural validity only with a matching result the independent
  verifier fully accepted, as the portal does; while it loads, when it
  fails to load or without a verifier verdict, no claim is made.
- Title the closed-obligation group like its rows ("Proved" only with a
  claim, else "Closed" or "Closed — not verified").
- Skip Rocq warnings that precede the error in build.log.
- "Go to line" uses the local .v only when its open buffer still matches
  the upload, not just the file on disk.
- Retry the build log on the next refresh after a failed read.
- Send the final activity after the history catch-up even at the row cap.
- Send the clock when it changes on its own (end time from a late event).
- "Open in Portal" from the panel opens the job page, not the certificate.
- Theorem links ignore declarations inside comments and strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xGeorgii 0xGeorgii self-assigned this Oct 10, 2026
@0xGeorgii 0xGeorgii added the vscode VSCode extension label Oct 10, 2026
@0xGeorgii
0xGeorgii merged commit 788fa5c into main Oct 10, 2026
21 checks passed
0xGeorgii added a commit that referenced this pull request Oct 10, 2026
#520 landed on main by rebase (788fa5c), so this branch and main hold the
same code under different commits. Joining them lets the PRs stacked on
this branch (#521) diff against main's history.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vscode VSCode extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant