F10 SLICE-4: host E2E for interactive review (open/toggle/propose→accept→reject/clean-editor/hidden-F6/status); update obsolete F9/toggle suites (#29)
Adds test/e2e/suite/f10Review.test.ts covering the F10 flow: open preview (mode "on", fresh baseline all-unchanged), type → cw-by-human span, propose → cw-proposal block with ✓/✗, accept → lands + baseline advances + block clears, reject → vanishes + doc untouched, toggle off → renderPlain has no cw- marks, status-bar PUC-6 (indicator with no panel, hidden once opened), and the clean-editor INV-32 facts (retired toggleAttribution, F6 ctrl+alt+d hidden). Rewrites the obsolete F9 authorship-mode test as an F10 review test (cw-by-claude in the on-state render; getMode defaults to "on"). Updates attribution.test.ts (drops the retired isVisible/toggleAttribution toggle, asserts the toggle is gone) and noWorkspace.test.ts (toggleAttribution + acceptProposal/rejectProposal are retired, preview-only — INV-32). Honesty fix in the status-bar seam: hideStatus() clears statusItem.text so statusText() reports undefined when the indicator is hidden (it previously returned its stale last value after a panel opened). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -111,7 +111,7 @@ export class TrackChangesPreviewController implements vscode.Disposable {
|
||||
);
|
||||
this.panels.set(key, panel);
|
||||
// A panel is now open for this doc — the off-panel indicator is redundant.
|
||||
this.statusItem.hide();
|
||||
this.hideStatus();
|
||||
this.refresh(document);
|
||||
}
|
||||
|
||||
@@ -169,12 +169,12 @@ export class TrackChangesPreviewController implements vscode.Disposable {
|
||||
private updateStatus(uri: string): void {
|
||||
const doc = vscode.workspace.textDocuments.find((d) => d.uri.toString() === uri);
|
||||
if (!doc) {
|
||||
this.statusItem.hide();
|
||||
this.hideStatus();
|
||||
return;
|
||||
}
|
||||
const n = this.proposals.listProposals(doc).length;
|
||||
if (n === 0 || this.panels.has(uri)) {
|
||||
this.statusItem.hide();
|
||||
this.hideStatus();
|
||||
return;
|
||||
}
|
||||
this.statusItem.text = `$(comment-discussion) ${n} Claude proposal${n === 1 ? "" : "s"}`;
|
||||
@@ -182,6 +182,15 @@ export class TrackChangesPreviewController implements vscode.Disposable {
|
||||
this.statusItem.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the off-panel indicator AND clear its text, so the `statusText()` seam
|
||||
* is honest: a hidden indicator reports `undefined` (not its stale last value).
|
||||
*/
|
||||
private hideStatus(): void {
|
||||
this.statusItem.text = "";
|
||||
this.statusItem.hide();
|
||||
}
|
||||
|
||||
private epochLabel(baseline: { reason: string; capturedAt: string } | undefined): string {
|
||||
if (!baseline) return "opened (no baseline yet)";
|
||||
const time = new Date(baseline.capturedAt).toLocaleTimeString();
|
||||
|
||||
Reference in New Issue
Block a user