diff --git a/packages/tui/src/component/dialog-experiments.tsx b/packages/tui/src/component/dialog-experiments.tsx index d135e2404e1..389b30848ac 100644 --- a/packages/tui/src/component/dialog-experiments.tsx +++ b/packages/tui/src/component/dialog-experiments.tsx @@ -14,13 +14,7 @@ type Experiment = { // In-flight features anyone can opt into. Each entry is temporary: an // experiment either graduates (delete the entry, make the behavior // unconditional) or dies (delete the entry and the branch it gated). -export const experiments: Experiment[] = [ - { - id: "diff-panel", - title: "Diff side panel", - description: "Open /diff in a panel beside the session instead of full screen", - }, -] +export const experiments: Experiment[] = [] export function DialogExperiments() { const config = useConfig() diff --git a/packages/tui/src/feature-plugins/system/diff-viewer.tsx b/packages/tui/src/feature-plugins/system/diff-viewer.tsx index b2f1bcecf4e..85e8212da20 100644 --- a/packages/tui/src/feature-plugins/system/diff-viewer.tsx +++ b/packages/tui/src/feature-plugins/system/diff-viewer.tsx @@ -1325,8 +1325,8 @@ function Commands(props: { context: Plugin.Context }) { props.context.ui.panel.close() return } + // Outside a session there is no panel slot, so /diff falls back to the full-screen route. if ( - config.data.experimental?.["diff-panel"] === true && props.context.ui.panel.open(ROUTE, { presentation: config.data.diffs?.fullscreen === true ? "fullscreen" : "panel", }) diff --git a/packages/tui/test/session-panel.test.tsx b/packages/tui/test/session-panel.test.tsx index 34dcff5efdc..635651f77b2 100644 --- a/packages/tui/test/session-panel.test.tsx +++ b/packages/tui/test/session-panel.test.tsx @@ -13,22 +13,6 @@ import { createAppFixture } from "./fixture/app" import { directory, json } from "./fixture/tui-client" import { tmpdir } from "./fixture/fixture" -test("/diff opens the full-screen diff when the side panel experiment is off", async () => { - await using state = await tmpdir() - await using setup = await createSessionFixture(state.path, { panel: false }) - await ready(setup) - await setup.mockInput.typeText("/diff") - await setup.waitForFrame((frame) => frame.includes("Open diff viewer")) - setup.mockInput.pressEnter() - await setup.waitForFrame((frame) => frame.includes("file00.txt"), { maxPasses: 120 }) - expect(setup.renderer.root.findDescendantById("session-panel")).toBeUndefined() - expect(setup.renderer.root.findDescendantById("diff-footer")).toBeUndefined() - expect(setup.captureCharFrame()).not.toContain("Transcript item 11") - setup.mockInput.pressKey("q") - await setup.waitForFrame((frame) => frame.includes("Transcript item 11") && !frame.includes("file00.txt")) - expect(setup.renderer.root.findDescendantById("session-panel")).toBeUndefined() -}) - test("/diff focuses the production session panel without sending typing to the prompt", async () => { await using state = await tmpdir() await using setup = await createSessionFixture(state.path) @@ -573,7 +557,6 @@ async function createSessionFixture( keybinds?: Config.Info["keybinds"] permission?: boolean form?: boolean - panel?: boolean } = {}, ) { // Drafts survive app disposal in memory, so each production app needs its own session identity. @@ -628,7 +611,6 @@ async function createSessionFixture( session: { sidebar: "hide" }, // Keep patch geometry stable while testing host presentation changes, not split/unified diff layout. diffs: { tree: false, view: "unified", ...input.diffs }, - experimental: { "diff-panel": input.panel ?? true }, keybinds: { "diff.open": "f6", ...input.keybinds }, }, fetch: async (url, request) => {