GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(web): recall sent prompts with arrow keys by sethwebster · Pull Request #7952 · pingdotgg/t3code

Conversation

@sethwebster

@sethwebster sethwebster commented Aug 23, 2026 •
edited by cursor Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Closes #7951. Supersedes #4336.

Problem

Re-running or editing a recent prompt requires copying it from the timeline. The earlier implementation no longer applies cleanly to the current Lexical composer and leaves three review findings unresolved.

Fix

  • Build per-thread history from the combined server and optimistic message list.
  • Recall the exact just-sent composer text while its optimistic message is active.
  • Strip terminal, element, preview, review, image-only, and provider-injected payloads from loaded history entries.
  • Let ArrowUp and ArrowDown navigate only from an empty composer or an active history session.
  • Preserve normal multiline caret movement until the caret reaches the first or last visible line.
  • Exit history mode on edit and restore the draft if a recalled entry disappears or the user leaves the thread.
  • Keep history inactive for autocomplete, IME composition, modified key presses, pending input, approvals, and attached context.

Desktop inherits this web behavior. Mobile, providers, the server, and wire contracts do not change.

Verification

  • pnpm --dir apps/web exec vp test run src/components/chat/composerPromptHistory.test.ts src/components/ComposerPromptEditor.test.ts src/components/ChatView.logic.test.ts --project unit (54 tests)
  • pnpm exec vp run --filter @t3tools/web typecheck
  • targeted vp lint for the touched TypeScript files
  • targeted vp fmt --check for all touched files

Implemented with gpt-5.6-sol through the Codex harness in T3 Code.


Note

Medium Risk
Touches composer keyboard handling, optimistic message merge, and local File/blob rematerialization for attachments. Bugs could steal arrow-key caret movement or leak/lose draft images.

Overview
Lets users recall earlier prompts from the active thread with unmodified ArrowUp/ArrowDown in an empty composer (or when the caret is on the first/last visual line). Recalled entries restore image attachments and the unsent draft when walking forward.

History is built from the combined timeline, using promptHistoryText on optimistic messages so just-sent text is recalled before server payloads (contexts, ultrathink, image-only bootstrap) are stripped. Local File handles are kept on acknowledged attachments so images can be rematerialized.

Navigation stays off during menus, IME, modifiers, approvals, pending input, and extra composer context. Editing a recalled prompt exits history without changing the sent message.

Reviewed by Cursor Bugbot for commit b67ba9f. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add ArrowUp/ArrowDown prompt history recall to ChatComposer

  • Adds desktop prompt history navigation: pressing ArrowUp in an empty composer (caret on first visual line) recalls older prompts; ArrowDown moves forward and restores the in-progress draft at the end
  • Recalled prompts restore their image attachments by reusing local File handles or fetching from preview URLs; failed attachment loads show a toast warning and continue with successful ones
  • Server-acknowledged user messages now carry promptHistoryText and preserve local File handles on attachments so history stays accurate after reconciliation
  • Adds isCaretOnVisualEdge to ComposerPromptEditorHandle so the composer can detect caret position on the first/last visible line before intercepting arrow keys
  • Image attachments render in a collapsing/expanding grid container; images referenced by preview annotations are excluded from the visible attachment list
  • Risk: ChatImageAttachment gains optional file?: File and ChatMessage gains optional promptHistoryText?: string; consumers of these types in types.ts should be checked for serialization or persistence assumptions about these fields

Macroscope summarized b67ba9f.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sethwebster
feat(web): recall sent prompts with arrow keys
1ca214a
@coderabbitai

coderabbitai Bot commented Aug 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cf15eb6b-0d18-4803-8697-6fdf1303c3ad

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 23, 2026
macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 23, 2026
View reviewed changes
Comment thread apps/web/src/components/chat/ChatComposer.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/web/src/components/ComposerPromptEditor.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 23, 2026
View reviewed changes
Comment thread apps/web/src/components/chat/composerPromptHistory.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sethwebster
fix(web): keep prompt history position stable
535089d
macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 23, 2026
View reviewed changes

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One keyboard-interaction finding in the new prompt-history navigation. Everything else in the diff is behavior-only (no styling, primitive, or CSS ownership changes), so no other consistency issues were found.

Posted via Macroscope — UI Consistency

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/web/src/components/chat/composerPromptHistory.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sethwebster
fix(web): preserve caret at prompt history boundary
9556aa0
cursor[bot]
cursor Bot reviewed Aug 23, 2026
View reviewed changes
Comment thread apps/web/src/components/chat/composerPromptHistory.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@macroscopeapp

macroscopeapp Bot commented Aug 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Skipped

Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sethwebster added 2 commits August 22, 2026 21:14
@sethwebster
fix(web): retain prompt history message identity
82a922d
@sethwebster
fix(web): recall prompt image attachments
60f80cc
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Aug 23, 2026
cursor[bot]
cursor Bot reviewed Aug 23, 2026
View reviewed changes
Comment thread apps/web/src/components/ChatView.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/web/src/components/chat/ChatComposer.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

sethwebster added 2 commits August 22, 2026 21:46
@sethwebster
feat(web): ease composer attachment expansion
101fbb9
@sethwebster
fix(web): preserve recall after attachment failures
43229d2
macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 23, 2026
View reviewed changes
Comment thread apps/web/src/components/chat/composerPromptHistory.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/web/src/components/chat/ChatComposer.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 23, 2026
View reviewed changes
Comment thread apps/web/src/components/chat/composerPromptHistory.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sethwebster
fix(web): stabilize attachment recall lifecycle
44d9ae7
macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 23, 2026
View reviewed changes
Comment thread apps/web/src/components/chat/ChatComposer.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 23, 2026
View reviewed changes

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding on the new composer image-attachment collapse wrapper. Everything else in scope (Button/Tooltip primitive usage, thumbnail geometry, prompt-history keyboard gating and editor handle) looks consistent with the existing patterns.

Posted via Macroscope — UI Consistency

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/web/src/components/chat/ChatComposer.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sethwebster
fix(web): restore draft images after prompt recall
49e1e3a
macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 23, 2026
View reviewed changes

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One new keyboard-behavior finding in the arrow-key history handler. The attachment-strip collapse transition flagged on 44d9ae7 (apps/web/src/components/chat/ChatComposer.tsx, grid-rows-[1fr]/grid-rows-[0fr] wrapper) is unchanged at this head, so that finding still stands and is not repeated inline here.

Posted via Macroscope — UI Consistency

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/web/src/components/chat/ChatComposer.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 23, 2026
View reviewed changes
Comment thread apps/web/src/components/chat/ChatComposer.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sethwebster
fix(web): keep prompt recall interactions responsive
60abbcf
cursor[bot]
cursor Bot reviewed Aug 23, 2026
View reviewed changes
Comment thread apps/web/src/components/chat/composerPromptHistory.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sethwebster
Merge remote-tracking branch 'refs/remotes/origin/main' into t3code/a…
b67ba9f
…dd-sent-text-history

# Conflicts:
#	apps/web/src/components/ChatView.tsx
cursor[bot]
cursor Bot reviewed Aug 23, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b67ba9f. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/web/src/components/ChatView.tsx
const composerPromptHistoryEntries = useMemo(
() => buildComposerPromptHistoryEntries(timelineMessages),
[timelineMessages],
);

@cursor cursor Bot Aug 23, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback hijacks prompt history

High Severity

composerPromptHistoryEntries is built from timelineMessages, which always appends local Codex feedback user messages after server and optimistic messages. Those /feedback rows stay in session state and are never removed, so after any feedback submit they become the newest history entries. ArrowUp then recalls /feedback instead of the latest real prompt, and history order no longer matches the chronology the timeline shows via createdAt sorting.

Additional Locations (1)
  • apps/web/src/components/ChatView.tsx#L2630-L2665
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b67ba9f. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@t3dotgg t3dotgg mentioned this pull request Aug 28, 2026
feat: terminal-style prompt history for the chat composer #4336
Closed
3 of 4 tasks
@Nir-Az

Nir-Az commented Aug 31, 2026

Copy link
Copy Markdown

Any blockers on landing this? It's the most-missed piece of the composer for anyone arriving from the terminal client, and the empty-composer-only gating here looks like the right call. Happy to test the branch if that helps move it along.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg t3dotgg mentioned this pull request Sep 2, 2026
feat(web): recall sent prompts with the up arrow #9173
Merged
@t3dotgg

t3dotgg commented Sep 4, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-6 Astra (preview) responding on behalf of Theo

This was closed as part of an automated cleanup pass. If you believe it was closed in error, reply here and we will get it reopened.

Closing as a duplicate of #9173, the retained text-only prompt-history implementation. It builds history on keypress and avoids attachment restoration state. The keyboard and message-identity cases from this branch are recorded there for review. The feature is not merged yet.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg t3dotgg closed this Sep 4, 2026
t3dotgg added a commit that referenced this pull request Sep 5, 2026
@t3dotgg @claude
feat(web): recall sent prompts with the up arrow (#9173)
fd77317
Press ArrowUp in an empty composer to get the last prompt sent in this thread. ArrowUp again goes further back, ArrowDown comes forward, and going past the newest prompt clears the composer.

History is per thread and derived from the thread's user messages on the keypress, so nothing new is stored or synced. Send-time appends (terminal and element context, preview annotations, review comments, the ultrathink prefix) and app-composed sends are stripped. With text in the composer, arrows move the caret unless the caret is on the first or last visual line of an unedited recalled prompt. Modifiers, IME composition, menus, approvals, and pending questions take priority. Attachments are not restored.

Prior art: #1778 by @PratyushChauhan, #4336 by @mfazekas, #7952 by @sethwebster.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@sethwebster
sethwebster deleted the t3code/add-sent-text-history branch September 25, 2026 23:26
henrik092 pushed a commit to henrik092/t3code that referenced this pull request Nov 2, 2026
@t3dotgg @claude
feat(web): recall sent prompts with the up arrow (pingdotgg#9173)
de54b3d
Press ArrowUp in an empty composer to get the last prompt sent in this thread. ArrowUp again goes further back, ArrowDown comes forward, and going past the newest prompt clears the composer.

History is per thread and derived from the thread's user messages on the keypress, so nothing new is stored or synced. Send-time appends (terminal and element context, preview annotations, review comments, the ultrathink prefix) and app-composed sends are stripped. With text in the composer, arrows move the caret unless the caret is on the first or last visual line of an unedited recalled prompt. Modifiers, IME composition, menus, approvals, and pending questions take priority. Attachments are not restored.

Prior art: pingdotgg#1778 by @PratyushChauhan, pingdotgg#4336 by @mfazekas, pingdotgg#7952 by @sethwebster.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

feat(web): recall sent prompts with ArrowUp in the composer

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@sethwebster @Nir-Az @t3dotgg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.