test(f7.1): host E2E — changed flowchart augments emitted source (#22)

Adds a renderHtmlFor test seam to TrackChangesPreviewController.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ben Stull
2026-06-11 16:34:42 -07:00
parent ea96b4861c
commit 3b45e784c1
2 changed files with 35 additions and 0 deletions
+8
View File
@@ -214,6 +214,14 @@ export class TrackChangesPreviewController implements vscode.Disposable {
getLastModel(uriString: string): BlockOp[] | undefined {
return this.lastModel.get(uriString);
}
/** F7.1 (#22) test seam: the track-changes HTML the panel would post for a doc. */
renderHtmlFor(uriString: string): string {
const doc = vscode.workspace.textDocuments.find((d) => d.uri.toString() === uriString);
if (!doc) return "";
const current = doc.getText();
const baseline = this.diffView.getBaseline(uriString);
return renderTrackChanges(baseline?.text ?? current, current);
}
/** F9: current view mode for a panel (default track-changes). */
getMode(uriString: string): "changes" | "authorship" {
return this.mode.get(uriString) ?? "changes";