Skip to content

feat(editor): allowlist graph export and proof verify, and keep conflict compare at the top - #987

Merged
drawmeanelephant merged 2 commits into
mainfrom
t3code/editor-four-issue-fixes
Sep 13, 2026
Merged

feat(editor): allowlist graph export and proof verify, and keep conflict compare at the top#987
drawmeanelephant merged 2 commits into
mainfrom
t3code/editor-four-issue-fixes

Conversation

@drawmeanelephant

Copy link
Copy Markdown
Owner

Summary

  • Document a CLI to editor capability matrix so allowlist growth stays deliberate (done / partial / missing / non-goal), including the new graph-export and proof-verify rows.
  • Allowlist boris graph (Mermaid by default, Graphviz DOT as the second option) and boris proof verify --html-dir dist as read-only host modes; the UI copies or downloads compiler stdout and surfaces the contracted stderr verdict.
  • Reset conflict compare panes after the dialog opens so both columns start at the top.

Closes #983
Closes #984
Closes #985
Closes #986

Test plan

  • zig build test
  • zig build --build-file editor/build.zig test
  • cd editor/ui && npm run check
  • cd editor/ui && npx playwright test (191 passed)
  • ./editor/scripts/test-diagnostics.sh ./zig-out/bin/boris ./editor/zig-out/bin/boris-editor editor/ui/dist
  • ./editor/scripts/test-host-contract.sh ./zig-out/bin/boris ./editor/zig-out/bin/boris-editor editor/ui/dist
  • Review Graph export copy/download and Verify proof on Problems and Publication against a real project

Agent Completion Report

  • Status: complete
  • Branch and Worktree:
    • Branch: t3code/editor-four-issue-fixes
    • Worktree: t3code/editor-four-issue-fixes
  • Commit and PR:
    • Commit: 7bc209becc3dcb45774b046a767b80cb1d9d4c63
    • Target PR / Branch: main
  • Linked Issues (auto-close convention):
  • Changed Files:
    • content/guides/editor.md
    • docs/contracts/editor-host.md
    • docs/changelog.d/983-986-editor-cli-surface.md
    • editor/README.md
    • editor/scripts/test-diagnostics.sh
    • editor/src/runner.zig
    • editor/src/server.zig
    • editor/ui/src/App.svelte
    • editor/ui/src/components/GraphPane.svelte
    • editor/ui/src/components/ProblemsPane.svelte
    • editor/ui/src/components/PublicationPane.svelte
    • editor/ui/src/components/SourcePane.svelte
    • editor/ui/src/dialogs/ConflictDialog.svelte
    • editor/ui/src/lib/state/graph.svelte.ts
    • editor/ui/src/lib/state/palette.svelte.ts
    • editor/ui/src/lib/state/publication.svelte.ts
    • editor/ui/src/lib/types.ts
    • editor/ui/src/lib/utils.ts
    • editor/ui/src/styles.css
    • editor/ui/tests/safe-editing.spec.ts
    • editor/ui/tests/section-nav.spec.ts
  • Preserved Unrelated Files:
    • Unrelated dirty files: none. Other worktrees (t3code/microcopy-and-editor-polish-pass, t3code/fix-graph-fit-undo-preview, t3code/editor-graph-map-zoom) left intact.
  • Implementation Summary:
    • Host CommandMode now includes graph_export and proof_verify with fixed argv, optional graph_format (mermaid/dot), and result fields graph_document / proof_report.
    • Graph pane and palette run export when diagnostics are ready; Problems and Publication run proof verify; dirty buffers still go through Save & run.
    • Conflict compare resets scrollTop and caret after showModal and focuses the primary button so the unsaved pane no longer opens at the end.
    • Capability matrix documented in the editor README, editor-host contract, and published editor guide (GitHub blob link for the developer copy so the site link audit stays clean).
  • Known Gaps:
    • Remaining matrix rows (IR / RAG / context / llms / rss / sitemap exports) stay missing; deploy and secrets stay non-goals.
  • Exact Commands Run:
    1. zig build test
    2. zig build --build-file editor/build.zig test
    3. zig build && zig build --build-file editor/build.zig
    4. cd editor/ui && npm run check
    5. cd editor/ui && npm run build
    6. cd editor/ui && npx playwright test
    7. ./editor/scripts/test-diagnostics.sh ./zig-out/bin/boris ./editor/zig-out/bin/boris-editor editor/ui/dist
    8. ./editor/scripts/test-host-contract.sh ./zig-out/bin/boris ./editor/zig-out/bin/boris-editor editor/ui/dist
  • Exact Gate Results:
    • zig build test: pass
    • zig build --build-file editor/build.zig test: pass
    • npm run check (editor/ui): 0 errors / 0 warnings; key-hints conformance OK
    • npx playwright test (editor/ui): 191 passed
    • ./editor/scripts/test-diagnostics.sh: editor Boris diagnostics integration: ok
    • ./editor/scripts/test-host-contract.sh: editor host contract conformance: ok
  • Determinism Result:
    • N/A for UI chrome. Host argv for the new modes is fixed (graph --input content --format mermaid|dot, proof verify --html-dir dist); --cooklang is appended to graph export on cooklang trees and omitted for proof verify.
  • Generated Artifacts:
    • Local editor/ui/dist from npm run build (not committed). Zig caches not committed.
  • Blockers and Next Card:
    • Blockers: None
    • Next Card: Remaining missing matrix rows (IR / RAG / export wrappers) when a later allowlist slice is scheduled.

Made with Cursor

drawmeanelephant and others added 2 commits September 13, 2026 09:01
…ict compare at the top

Authors can take a compiler-owned Mermaid/DOT artifact and verify a Proof Pack without leaving the editor, and both compare panes start at the top so a long dirty buffer is not mistaken for a large structural diff.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@itoqa

itoqa Bot commented Sep 13, 2026

Copy link
Copy Markdown

Ito QA test results
Commit: 2d6af8e: 9 test cases ran, 9 passed ✅.

Summary

Coverage spans core editor workflows, including diagnostics and graph export, proof verification, navigation, unsaved-change safeguards, and external file conflict resolution. It also exercises edge cases where disk content changes during conflict handling or commands are attempted with dirty files, with the observed product behavior healthy across these areas.

Safe to merge — no regressions, new failures, or previously flagged failures attributable to this PR were identified. A few environment-dependent checks could not exercise the editor, but they are unrelated observations rather than merge blockers.

Tests run by Ito

View full run

Result Severity Type Description
General When the file changed again while the conflict dialog was open, replacing the disk version did not overwrite the newer change. The dialog refreshed to show the latest disk content and kept the unsaved editor text.
Conflict The external-change dialog showed both the unsaved file and the current disk file. Both long comparison panes started at the top, and the Replace disk version action had focus.
Graph After diagnostics finished, the Graph pane showed a ready graph and exported the default Mermaid document. The exported text, Copy export button, and Download export button were all visible, and the command finished successfully.
Navigation The required editor was not running, so the graph map and relationship links could not be tested. The available service showed static documentation instead of the editor.
Proof Building the HTML output succeeded, then proof verification returned success. Problems and Publication both showed 3 of 3 checks passed with a pass verdict.
Resolution The editor showed the unsaved text and the newer disk text in a conflict dialog. Choosing Load disk version replaced the editor content with DISK_EXTERNAL_VERSION and confirmed that the current disk version was loaded.
Rev The graph pane showed the current Mermaid and DOT documents, and its copy and download actions stayed matched to the selected format.
Rev With unsaved edits in content/index.md, Export graph and Verify proof opened a clear save-or-discard dialog instead of running. Cancelling kept the edits and left the file marked as unsaved.
Safety The fixed command checks could not run because the local editor host was not started. The available site was only static documentation, so this result does not confirm a product failure.

Tip

Reply with @itoqa to send us feedback on this test run.

@drawmeanelephant
drawmeanelephant merged commit 0850771 into main Sep 13, 2026
13 checks passed
@drawmeanelephant
drawmeanelephant deleted the t3code/editor-four-issue-fixes branch September 13, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant