From 02a5e4f4311d6212f1e9bd8986822d4ef301aad8 Mon Sep 17 00:00:00 2001 From: Douwe de Vries Date: Tue, 15 Sep 2026 05:54:54 +0200 Subject: [PATCH] feat(tui)!: remove the deprecated /flow-reviewer command BREAKING CHANGE: `/flow-reviewer` is gone. `/flow-models` reaches the same review picker and also selects the optional planning specialist. The TUI module id changes from `opencode-plugin-flow.reviewer-picker` to `opencode-plugin-flow.model-picker`. 8.6.0 announced the deprecation, satisfying the cadence rule that a surface is announced in one release before a major removes it. The picker tests already reached review through the role menu, so this deletes the one alias test and replaces it with an assertion that a single slash command remains. Also renames the stale 8.4.0 framing that only ever described the reviewer: tests/reviewer-picker.test.ts and FROZEN_PICKER_SOURCE_BYTES. Not for merge until 9.0.0 is authorized and its qualification path is chosen. Merging earlier would put a public-surface removal in a minor release. Co-Authored-By: Claude Opus 5 (1M context) --- docs/maintainer-contract.md | 5 ++--- src/tui.ts | 10 +-------- tests/architecture-boundaries.test.ts | 5 +++-- ...er-picker.test.ts => model-picker.test.ts} | 21 +++++-------------- 4 files changed, 11 insertions(+), 30 deletions(-) rename tests/{reviewer-picker.test.ts => model-picker.test.ts} (93%) diff --git a/docs/maintainer-contract.md b/docs/maintainer-contract.md index ac9b3488..60ae6c3c 100644 --- a/docs/maintainer-contract.md +++ b/docs/maintainer-contract.md @@ -351,6 +351,5 @@ See [Model-driven wave evidence](development.md#model-driven-wave-evidence) for the manual canary policy. -The optional `./tui` export provides `/flow-models`, with `/flow-reviewer` a -deprecated alias removed at 9.0.0. Both save role preferences after -confirmation. Neither adds a lifecycle tool. +The optional `./tui` export provides `/flow-models`. It saves role preferences +after confirmation and adds no lifecycle tool. diff --git a/src/tui.ts b/src/tui.ts index d622f76a..27f119d9 100644 --- a/src/tui.ts +++ b/src/tui.ts @@ -178,19 +178,11 @@ const tui: TuiPlugin = async (api) => { ); }, }, - { - name: "flow.reviewer.select", - title: "Flow: Choose reviewer model (deprecated, use /flow-models)", - category: "Flow", - namespace: "palette", - slashName: "flow-reviewer", - run: () => open("review"), - }, ], }); }; export default { - id: "opencode-plugin-flow.reviewer-picker", + id: "opencode-plugin-flow.model-picker", tui, } satisfies TuiPluginModule; diff --git a/tests/architecture-boundaries.test.ts b/tests/architecture-boundaries.test.ts index 7391a7a4..d5350fd9 100644 --- a/tests/architecture-boundaries.test.ts +++ b/tests/architecture-boundaries.test.ts @@ -65,7 +65,7 @@ const PROCESS_LOCAL_CONFIG_AND_STATUS_BYTES = 15 * 1024; const MAX_TYPESCRIPT_SOURCE_BYTES = FROZEN_TYPESCRIPT_SOURCE_BYTES + PROCESS_LOCAL_CONFIG_AND_STATUS_BYTES + 1024; // Reviewer preference resolution; no Session fields. const PLANNING_SPECIALIST_ADAPTER_BYTES = 5 * 1024; -const FROZEN_PICKER_SOURCE_BYTES = 8 * 1024; +const FROZEN_MODEL_PICKER_SOURCE_BYTES = 8 * 1024; const SHARED_MODEL_MENU_BYTES = 1024; const MAX_TYPESCRIPT_FILE_LINES = 1_000; const inwardLayers = new Set(["domain", "application", "infrastructure"]); @@ -179,7 +179,8 @@ describe("v6 architecture boundaries", () => { // the change that discovered the problem rather than the one that caused it. const serverBudget = MAX_TYPESCRIPT_SOURCE_BYTES + PLANNING_SPECIALIST_ADAPTER_BYTES; - const pickerBudget = FROZEN_PICKER_SOURCE_BYTES + SHARED_MODEL_MENU_BYTES; + const pickerBudget = + FROZEN_MODEL_PICKER_SOURCE_BYTES + SHARED_MODEL_MENU_BYTES; const headroom = serverBudget + pickerBudget - totalBytes; console.info( `src TypeScript: ${totalBytes} bytes, ${headroom} of ${serverBudget + pickerBudget} remaining (including optional TUI).`, diff --git a/tests/reviewer-picker.test.ts b/tests/model-picker.test.ts similarity index 93% rename from tests/reviewer-picker.test.ts rename to tests/model-picker.test.ts index bb590429..43201185 100644 --- a/tests/reviewer-picker.test.ts +++ b/tests/model-picker.test.ts @@ -180,17 +180,12 @@ async function host(preference?: string) { await new Promise((resolve) => setTimeout(resolve, 0)); }; return { - // `/flow-reviewer` is deprecated and removed at 9.0.0, so the shared helper - // reaches review through the menu that outlives it. Only the alias test - // below still runs the alias itself. open: async () => { await run("flow-models"); await chooseRole("review"); }, openModels: () => run("flow-models"), - reviewerAlias: () => run("flow-reviewer"), - command: (slashName: string) => - commands.find((command) => command.slashName === slashName), + slashNames: () => commands.map((command) => command.slashName).sort(), chooseRole, config: () => structuredClone(current), choose: (value = "test/luna") => select?.onSelect({ value }), @@ -227,17 +222,11 @@ test("native command requires a confirmed selection before saving", async () => expect(h.writes()).toBe(1); expect(h.toasts.at(-1)?.variant).toBe("success"); }); -test("the deprecated reviewer alias still opens review and is labelled", async () => { +test("exposes one model command now that the reviewer alias is gone", async () => { const h = await host(); - // Deprecated in 8.5.0's successor, removed at 9.0.0. Until then the alias must - // keep working, and the palette must say it is going away. - expect(h.command("flow-reviewer")?.title).toContain("deprecated"); - expect(h.command("flow-models")?.title).not.toContain("deprecated"); - await h.reviewerAlias(); - h.choose(); - await h.confirm(); - expect(reviewPreference(h.config())).toBe("test/luna"); - expect(h.writes()).toBe(1); + // 8.6.0 announced the deprecation; 9.0.0 removes it. Nothing should reintroduce + // a second entry point into the same picker. + expect(h.slashNames()).toEqual(["flow-models"]); }); test("rechecks activity, concurrent edits and provider availability before saving", async () => { for (const condition of ["busy", "change", "disconnect"] as const) {