Skip to content

prompt-input: Preserve draft when accidentally navigating history#44

Closed
arewm wants to merge 1 commit into
cgwalters:mainfrom
arewm:fix/prevent-chat-history-wipe
Closed

prompt-input: Preserve draft when accidentally navigating history#44
arewm wants to merge 1 commit into
cgwalters:mainfrom
arewm:fix/prevent-chat-history-wipe

Conversation

@arewm

@arewm arewm commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

Typing while viewing a history entry permanently destroyed the user's in-progress draft. Now the draft survives and can be recovered by pressing down-arrow.

Note: if the user presses up-arrow again (re-entering history) after editing, the current editor content becomes the new saved draft, replacing the original. Recovery via down-arrow must happen before pressing up again.

Assisted-by: OpenCode (Claude claude-opus-4-6)

Typing while viewing a history entry permanently destroyed the user's
in-progress draft. Now the draft survives and can be recovered by
pressing down-arrow.

Note: if the user presses up-arrow again (re-entering history) after
editing, the current editor content becomes the new saved draft,
replacing the original. Recovery via down-arrow must happen before
pressing up again.

Assisted-by: OpenCode (Claude claude-opus-4-6)
Signed-off-by: arewm <arewm@users.noreply.github.com>
@cgwalters

Copy link
Copy Markdown
Owner

So...this is in the forked opencode UI code, so if this is a bug that exists there.

But the current UI already works for me for this - if I type some text in the prompt, press up, then press down I get back to my original text.

@arewm

arewm commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator Author

I am going to close this for now. I occasionally tried to go up too far and then started typing before I realized that I went up too far. This was to try to mitigate that, but let me try to be more intentional about my activity. I think the behavior that I am changing away from is the default for many of these environments, so I am introducing an abnormality.

@arewm arewm closed this Apr 3, 2026
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.

2 participants