From 5c57a51ac82276a41e11fd9ce07e627d6c40d2fc Mon Sep 17 00:00:00 2001 From: Alexander Richey Date: Tue, 29 Sep 2026 23:06:29 -0400 Subject: [PATCH] feat(tui): show eval in the menu outside a project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Evaluation does not need a local project, so users who haven't created one yet can now find and use eval from the root menu. 💘 Generated with Crush Assisted-by: Crush:us.anthropic.claude-opus-5-5 --- src/components/RouterScreen.test.tsx | 2 +- src/handlers/screen.tsx | 2 +- src/tui/tui.test.tsx | 9 +++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/components/RouterScreen.test.tsx b/src/components/RouterScreen.test.tsx index d0924928b..c45af53e0 100644 --- a/src/components/RouterScreen.test.tsx +++ b/src/components/RouterScreen.test.tsx @@ -59,7 +59,7 @@ describe("menu rendering", () => { const frame = r.lastFrame()!; const entries = menuEntries(frame); expect(entries.screens).toContain("create"); - expect(entries.screens).not.toContain("eval"); + expect(entries.screens).toContain("eval"); const visible = [...entries.screens, ...entries.cliOnly]; const projectCommands = createProjectHandlers(r.core, testIO().io) .slice(1) diff --git a/src/handlers/screen.tsx b/src/handlers/screen.tsx index e9079d866..d28d3a704 100644 --- a/src/handlers/screen.tsx +++ b/src/handlers/screen.tsx @@ -21,7 +21,7 @@ const PROJECT_REQUIRED_OPTIONS = [ "traces", "export", ]; -const NO_PROJECT_HIDDEN_OPTIONS = [...PROJECT_REQUIRED_OPTIONS, "eval"]; +const NO_PROJECT_HIDDEN_OPTIONS = [...PROJECT_REQUIRED_OPTIONS]; export interface RootScreenProps extends ScreenProps { inProject: boolean; diff --git a/src/tui/tui.test.tsx b/src/tui/tui.test.tsx index 24c3bcc59..8b733dff7 100644 --- a/src/tui/tui.test.tsx +++ b/src/tui/tui.test.tsx @@ -249,17 +249,14 @@ describe("TUI launch", () => { return streams.stdout(); } - test("outside a project the first frame shows create under the banner and hides project commands and eval", async () => { + test("outside a project the first frame shows create under the banner and hides project commands but shows eval", async () => { const out = await launchRootMenu(undefined); expect(out.indexOf(BANNER)).toBeGreaterThan(-1); expect(out.indexOf(BANNER)).toBeLessThan(out.indexOf(CREATE_ROW)); - for (const hidden of [ - "add project resources", - "deploy the project to AWS", - "evaluate and optimize", - ]) { + for (const hidden of ["add project resources", "deploy the project to AWS"]) { expect(out).not.toContain(hidden); } + expect(out).toContain("evaluate and optimize"); }); test("inside a project create is never drawn and the rest of the menu is", async () => {