Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/maintainer-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
10 changes: 1 addition & 9 deletions src/tui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
5 changes: 3 additions & 2 deletions tests/architecture-boundaries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]);
Expand Down Expand Up @@ -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).`,
Expand Down
21 changes: 5 additions & 16 deletions tests/reviewer-picker.test.ts → tests/model-picker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down Expand Up @@ -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) {
Expand Down