🤖 feat: add prompt history sidebar#3429
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3eaf690a9d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3eaf690 to
2dbe55d
Compare
|
@codex review Addressed the stale draft attachment/review feedback: prompt history insertion now sends explicit empty file/review arrays for text-only entries, and the replace handler treats file/review payload presence as a full draft replacement even when those arrays are empty. Added a focused payload test and re-ran |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2dbe55d34e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
2dbe55d to
095997c
Compare
|
@codex review Addressed the empty review override follow-up: text-only history inserts still clear existing attached reviews, but the empty draft-review override now releases when new reviews are attached later so the Code Review workflow remains visible and sendable. Re-ran the prompt-history tests and |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
d638c14 to
5606a3a
Compare
|
@codex review Rebased this PR onto the latest
Note: this temporary checkout needed a local |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5606a3aff0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
5606a3a to
3f30a9c
Compare
|
@codex review Addressed the review-attachment feedback: prompt history entries now keep structured Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f30a9c14f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3f30a9c to
c596246
Compare
|
@codex review Addressed the serialized-review duplication feedback: when a history row has structured reviews, the prompt history entry now strips the leading serialized Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c596246d56
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
c596246 to
04ec2a8
Compare
|
@codex review Addressed the exact-prefix feedback: the review-prefix stripping now regenerates the serialized prefix from the structured reviews with Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04ec2a8bc5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
04ec2a8 to
e32c360
Compare
|
@codex review Addressed the review-less full-draft replacement feedback: replace events that carry a full draft payload but omit Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e32c360a0c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e32c360 to
dec0abf
Compare
|
@codex review Addressed the stale-parent-reviews feedback: any full-draft replace payload now detaches existing parent-attached reviews before applying the replacement draft. Empty/omitted replacement reviews still activate the empty override release path; non-empty replacement reviews keep their draft override without allowing stale parent reviews to reappear later. Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dec0abf50d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
dec0abf to
2aaf760
Compare
|
@codex review Addressed the local-command output feedback: prompt history now reuses Validation:
|
Keep Prompt History cards showing clean prompt text while restoring staged attachment notices into the insert payload, without duplicating serialized review text. --- _Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_ <!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
|
@codex review Addressed the staged attachment feedback. Prompt History now keeps cards/copy using the clean visible prompt text, but the Insert payload restores the staged attachment notice so Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd687314d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bind restored prompt-history mux metadata to the exact restored composer text so editing the restored follow-up cannot send stale skill or raw-command metadata. --- _Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_ <!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
|
@codex review Addressed the stale restored follow-up metadata issue in Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0aa8bc1335
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bind restored prompt-history mux metadata to the full draft payload so editing text, attachments, or reviews clears stale follow-up command metadata. --- _Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_ <!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
|
@codex review Addressed the restored draft payload feedback in Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f25d4f6cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keep prompt-history restored review drafts receptive to reviews attached later from the Code Review tab, then detach merged parent reviews so send state stays coherent. --- _Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_ <!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
|
@codex review Addressed the restored-review merge feedback in Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 833fd63519
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Track parent review IDs merged into restored prompt-history drafts so successful sends mark those reviews checked after their contents are included. --- _Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_ <!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
|
@codex review Addressed the merged-review check feedback in Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7efcd4517
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Track duplicate parent review IDs merged into restored prompt-history drafts by review signature so successful sends mark those reviews checked even when no new draft note is appended. --- _Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_ <!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
|
@codex review Follow-up fix pushed in a8af5a0 for the duplicate restored review case. Validation run locally:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8af5a0b29
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Store merged restored-draft review check IDs as sets per review signature so duplicate parent reviews with the same note all get checked after a successful send. --- _Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_ <!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
|
@codex review Addressed the duplicate-signature review ID feedback in Validation run locally:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 355e3750c3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Key restored-draft parent review check IDs by stable draft review IDs so editing a merged review note before sending still checks every detached parent review on success. --- _Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_ <!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
|
@codex review Addressed the edit-after-merge review check feedback in Validation run locally:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e41e3ba35
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Extract real follow-up content from synthetic auto-compaction request rows before skipping synthetic maintenance messages so user-authored prompts remain reusable in Prompt History. --- _Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_ <!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
|
@codex review Addressed the auto-compaction prompt history feedback in Validation run locally:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7473eba937
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keep synthetic auto-compaction follow-up history entries replayable by inserting preserved raw commands when present and by distinguishing internal resume sentinels from user-authored Continue prompts. --- _Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_ <!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
|
@codex review Addressed the latest Prompt History feedback in Validation run locally:
|
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Adds a right-sidebar History tab for the current transcript. The tab lists real user prompts from oldest to newest and provides quick actions to jump back to the original transcript row, copy the prompt, or insert it into the composer with its restorable draft payload.
Background
Part of #3416. This supersedes closed PR #3421, which GitHub would not reopen after its head branch was force-pushed/recreated. The PR keeps the scope to the prompt-history MVP; persistent snippets, slash-command integration, and configurable keybindings remain follow-up ideas.
Implementation
historyright-sidebar tab and label alongside the upstream Memory and Workflows tabs.ChatPaneto reveal a transcript message without reaching across layout boundaries with DOM queries.UPDATE_CHAT_INPUTevent to insert selected history text, files, staged attachments, structured reviews, and follow-up mux metadata into the composer./compactqueues a follow-up.Validation
bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts- 21 tests passedbun run prettier --check src/browser/features/ChatInput/index.tsx src/browser/utils/chatEditing.ts src/browser/utils/chatEditing.test.ts src/browser/features/RightSidebar/promptHistoryEntries.ts src/browser/features/RightSidebar/PromptHistoryTab.tsx src/browser/features/RightSidebar/PromptHistoryTab.test.ts./node_modules/.bin/eslint src/browser/features/ChatInput/index.tsx src/browser/utils/chatEditing.ts src/browser/utils/chatEditing.test.ts src/browser/features/RightSidebar/promptHistoryEntries.ts src/browser/features/RightSidebar/PromptHistoryTab.tsx src/browser/features/RightSidebar/PromptHistoryTab.test.ts./scripts/generate-version.sh && ./node_modules/.bin/tsgo --noEmit --project tsconfig.jsongit diff --check fork/codex/prompt-history-sidebar-v2...HEADmake static-checkRisks
The UI is intentionally small and additive: users need to add/open the History tab from the right sidebar. The restore path now preserves more draft payload shape, so the main regression risk is stale or hidden payload after composer edits; this is guarded by payload-signature invalidation, later-review merge/check handling, and focused tests. The remaining #3416 ideas around persistent snippets and custom keybindings are not implemented here.
Generated with
mux• Model:GPT-5• Thinking:unknown• Cost:$unknown