Skip to content

fix(prompt): stop staged drafts from turning the prompt box setting back on - #373

Open
gnutix wants to merge 1 commit into
johannesjo:mainfrom
gnutix:fix/prompt-input-setting-sticks
Open

gnutix wants to merge 1 commit into
johannesjo:mainfrom
gnutix:fix/prompt-input-setting-sticks

Conversation

@gnutix

@gnutix gnutix commented Nov 13, 2026 •

Copy link
Copy Markdown

Problem

Unchecking Settings > Appearance > Terminal > Show prompt input box below terminal does not last. Every feature that writes a draft into a task's prompt box turned the global showPromptInput preference back on so the draft would be visible, and that preference is persisted:

  • a mind map or reasoning graph branch request ("Send branch to agent", "Reference in chat"): stageCanvasRequest in src/store/canvas.ts
  • a browser preview element reference: appendBrowserReference in src/store/canvas.ts
  • staged prompts (review rework, change tour, CI fixes, verify): stageTaskPrompt in src/store/staged-prompt.ts

So one use of any of them re-enabled the setting for good, on every task.

Fix

  • These three paths now reveal the prompt box for that task only, through a transient promptInputRevealed flag (src/store/prompt-input-visibility.ts). The Settings toggle is the only thing that writes showPromptInput.
  • TaskPanel and the keyboard focus grid read isTaskPromptInputShown(task) (the preference, or the task's revealed flag).
  • A manual send hides a revealed box again and moves focus back to the agent terminal, returning to the layout the user chose.
  • An unsent draft restored at startup keeps its box visible, so restored text is never hidden.

Tests

  • canvas.client.test.tsx, review.test.ts: staging marks the task revealed and leaves showPromptInput off (they asserted the old flip).
  • PromptInput.client.test.tsx: a send hides a revealed box and refocuses the terminal; nothing changes when the setting shows the box.
  • focus.test.ts: arrow navigation reaches a revealed prompt box while the setting is off.
  • persistence.test.ts: a restored draft marks the box revealed.

npm run check:static and npm test pass.

Screenshots

Starting state: the setting is off, so the terminal task has no prompt box. Then "Send branch to agent > Explain this branch" on a reasoning graph node.

Starting state: no prompt box

Both versions then show the staged request in this task's prompt box:

The staged request in the task's prompt box

Before After
Settings after the request, before the fix Settings after the request, with the fix
The request turned "Show prompt input box below terminal" back on, for every task and for good. The setting stays off; only this task shows its box, until the prompt is sent.

🤖 Generated with Claude Code (Opus 5.5)

…ack on

Canvas branch requests, browser element references and staged prompts
(review rework, tours, CI fixes, verify) set the global showPromptInput
preference to true so the draft they wrote would be visible. That flag
is persisted, so every such action silently re-enabled "Show prompt
input box below terminal" for good.

They now reveal the prompt box for that task only (promptInputRevealed).
Sending the prompt hides it again and returns focus to the terminal, and
an unsent draft restored at startup keeps its box visible. The user's
setting is no longer written by anything but the Settings toggle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gnutix added a commit to gnutix/parallel-code that referenced this pull request Nov 13, 2026
@gnutix
gnutix marked this pull request as ready for review November 13, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant