From 831710ed0c8713033a3f64af4b7095f5302f1573 Mon Sep 17 00:00:00 2001 From: Ben Stull Date: Fri, 12 Jun 2026 00:06:29 -0700 Subject: [PATCH] F10 SLICE-1: retire dead attribution toggle (visible/toggle/isVisible + command) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code-quality follow-up: with editor decorations gone (Task 1), the visibility toggle was dead/misleading — nothing reads `visible`. Remove the field, toggle()/isVisible(), the cowriting.toggleAttribution registration, and its package.json command + palette declarations (spec §6.2 retires it). renderActive/ render stay — they refresh the orphan status bar on editor switch. E2E toggle assertions (attribution.test.ts, noWorkspace.test.ts) are updated in SLICE-4. Co-Authored-By: Claude Opus 4.8 (1M context) --- package.json | 9 --------- src/attributionController.ts | 11 ----------- 2 files changed, 20 deletions(-) diff --git a/package.json b/package.json index ebd7a19..2a72d27 100644 --- a/package.json +++ b/package.json @@ -44,11 +44,6 @@ "title": "Reopen Thread", "category": "Cowriting" }, - { - "command": "cowriting.toggleAttribution", - "title": "Toggle Attribution", - "category": "Cowriting" - }, { "command": "cowriting.applyAgentEdit", "title": "Apply Agent Edit (internal seam)", @@ -115,10 +110,6 @@ { "command": "cowriting.pinDiffBaseline", "when": "false" - }, - { - "command": "cowriting.toggleAttribution", - "when": "false" } ], "editor/context": [ diff --git a/src/attributionController.ts b/src/attributionController.ts index f33df45..1bb13b9 100644 --- a/src/attributionController.ts +++ b/src/attributionController.ts @@ -52,7 +52,6 @@ export class AttributionController implements vscode.Disposable { private readonly pending = new PendingEditRegistry(); private readonly statusItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 90); private readonly output = vscode.window.createOutputChannel("Cowriting Attribution"); - private visible = true; /** * F6 (§6.2/§6.4): the single machine-landing signal. Fired after a real @@ -70,7 +69,6 @@ export class AttributionController implements vscode.Disposable { ) { this.disposables.push(this.statusItem, this.output, this.applyEmitter); this.disposables.push( - vscode.commands.registerCommand("cowriting.toggleAttribution", () => this.toggle()), vscode.workspace.onDidChangeTextDocument((e) => this.onDidChange(e)), vscode.workspace.onDidSaveTextDocument((d) => this.onDidSave(d)), vscode.window.onDidChangeActiveTextEditor(() => this.renderActive()), @@ -330,11 +328,6 @@ export class AttributionController implements vscode.Disposable { // ---- PUC-5: rendering ---------------------------------------------------------------- - private toggle(): void { - this.visible = !this.visible; - this.renderActive(); - } - private renderActive(): void { const editor = vscode.window.activeTextEditor; if (editor) this.render(editor.document); @@ -390,10 +383,6 @@ export class AttributionController implements vscode.Disposable { author: s.authorKind === "agent" ? "claude" : "human", })); } - isVisible(): boolean { - return this.visible; - } - dispose(): void { for (const d of this.disposables) d.dispose(); }