feat(run): tool-aware model picker and run panel labels for codex lanes

Model dropdown now shows curated Claude vs Codex models per lane's tool,
and the run panel title/subtitle/binary-missing text switch between
"Chạy Claude"/"Chạy Codex" accordingly.
This commit is contained in:
2026-08-27 13:33:55 +07:00
parent ccf2fdb8eb
commit b1734a492f
8 changed files with 47 additions and 32 deletions
@@ -31,6 +31,7 @@ vi.mock("../../../lib/api", () => ({
},
},
RUN_MODEL_CHOICES: [],
RUN_MODEL_CHOICES_CODEX: [],
RUN_EFFORT_CHOICES: [],
}));
@@ -121,8 +121,8 @@ describe("RunSetup — selections report through callbacks", () => {
it("reports the model from the picker, including a custom id", () => {
const { spies } = renderSetup();
pickFromSelect(i18n.t("run:fields.modelInheritLabel"), "Sonnet 4.6");
expect(spies.onModelChange).toHaveBeenCalledWith("sonnet");
pickFromSelect(i18n.t("run:fields.modelInheritLabel"), "Sonnet 5");
expect(spies.onModelChange).toHaveBeenCalledWith("claude-sonnet-5");
// "Custom…" is a sentinel, not a model id — it must not be reported as one;
// the free-text box it reveals is what reports.
fireEvent.click(screen.getByText(i18n.t("run:fields.modelInheritLabel")));