Skip to content

🤖 feat: add prompt history sidebar#3429

Open
LeonidasZhak wants to merge 15 commits into
coder:mainfrom
LeonidasZhak:codex/prompt-history-sidebar-v2
Open

🤖 feat: add prompt history sidebar#3429
LeonidasZhak wants to merge 15 commits into
coder:mainfrom
LeonidasZhak:codex/prompt-history-sidebar-v2

Conversation

@LeonidasZhak

@LeonidasZhak LeonidasZhak commented May 30, 2026

Copy link
Copy Markdown

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

  • Adds a pure prompt-history selector that filters synthetic continuation/budget wrap-up messages and completed local-command output rows while preserving attachment-only user prompts, file payloads, staged attachment notices, structured reviews, and compaction follow-up payloads.
  • Registers a new history right-sidebar tab and label alongside the upstream Memory and Workflows tabs.
  • Uses a typed custom event so the sidebar can ask ChatPane to reveal a transcript message without reaching across layout boundaries with DOM queries.
  • Reuses the existing UPDATE_CHAT_INPUT event to insert selected history text, files, staged attachments, structured reviews, and follow-up mux metadata into the composer.
  • Handles full-draft replacement carefully so stale attached reviews are cleared when a history entry does not carry reviews.
  • Binds restored mux metadata to the full restored draft payload signature, so editing restored text, attachments, or reviews invalidates stale follow-up command metadata before /compact queues a follow-up.
  • Merges reviews attached later from the Code Review tab into restored review drafts, detaches the copied parent reviews, and keeps their parent IDs so successful sends mark them checked.

Validation

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts - 21 tests passed
  • bun 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.json
  • git diff --check fork/codex/prompt-history-sidebar-v2...HEAD
  • make static-check

Risks

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

@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Please review this replacement prompt history sidebar PR for #3416. It supersedes closed #3421 and includes the attachment-preservation fix from the prior Codex feedback.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/RightSidebar/PromptHistoryTab.tsx Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/prompt-history-sidebar-v2 branch from 3eaf690 to 2dbe55d Compare May 30, 2026 02:51
@LeonidasZhak

Copy link
Copy Markdown
Author

@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 tsgo --noEmit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/RightSidebar/PromptHistoryTab.tsx Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/prompt-history-sidebar-v2 branch from 2dbe55d to 095997c Compare May 30, 2026 02:58
@LeonidasZhak

Copy link
Copy Markdown
Author

@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 tsgo --noEmit.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ 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".

@LeonidasZhak LeonidasZhak force-pushed the codex/prompt-history-sidebar-v2 branch 2 times, most recently from d638c14 to 5606a3a Compare June 5, 2026 01:44
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Rebased this PR onto the latest main to clear the out-of-date branch notice. Local validation after the rebase:

  • /tmp/mux-bun-tools/node_modules/.bin/bun test src/browser/features/RightSidebar/PromptHistoryTab.test.ts - 4 tests passed
  • ./scripts/generate-version.sh then node_modules/.bin/tsgo --noEmit - passed
  • git diff --check - passed

Note: this temporary checkout needed a local /tmp bun install because bun was not on the machine PATH.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/RightSidebar/PromptHistoryTab.tsx Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/prompt-history-sidebar-v2 branch from 5606a3a to 3f30a9c Compare June 5, 2026 01:50
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the review-attachment feedback: prompt history entries now keep structured message.reviews, and Insert into composer passes those reviews back through the update payload while text-only history still clears current reviews with an empty array.

Validation:

  • /tmp/mux-bun-tools/node_modules/.bin/bun test src/browser/features/RightSidebar/PromptHistoryTab.test.ts - 5 tests passed
  • node_modules/.bin/tsgo --noEmit - passed
  • git diff --check - passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/RightSidebar/PromptHistoryTab.tsx Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/prompt-history-sidebar-v2 branch from 3f30a9c to c596246 Compare June 5, 2026 01:54
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the serialized-review duplication feedback: when a history row has structured reviews, the prompt history entry now strips the leading serialized <review>...</review> blocks from the displayed/restored text and passes the structured reviews separately, so the next send formats them exactly once.

Validation:

  • /tmp/mux-bun-tools/node_modules/.bin/bun test src/browser/features/RightSidebar/PromptHistoryTab.test.ts - 5 tests passed
  • node_modules/.bin/tsgo --noEmit - passed
  • git diff --check - passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/RightSidebar/promptHistoryEntries.ts Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/prompt-history-sidebar-v2 branch from c596246 to 04ec2a8 Compare June 5, 2026 01:58
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the exact-prefix feedback: the review-prefix stripping now regenerates the serialized prefix from the structured reviews with formatReviewForModel and only strips that exact prefix, so literal </review> text inside selected code or notes cannot truncate the prefix early.

Validation:

  • /tmp/mux-bun-tools/node_modules/.bin/bun test src/browser/features/RightSidebar/PromptHistoryTab.test.ts - 5 tests passed, including a </review> literal case
  • node_modules/.bin/tsgo --noEmit - passed
  • git diff --check - passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/ChatInput/index.tsx
@LeonidasZhak LeonidasZhak force-pushed the codex/prompt-history-sidebar-v2 branch from 04ec2a8 to e32c360 Compare June 5, 2026 02:06
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the review-less full-draft replacement feedback: replace events that carry a full draft payload but omit reviews now clear parent attached reviews too, matching the restoreDraft({ reviews: [] }) state they apply. Prompt history also now reuses getEditableUserMessageText, the existing edit-path helper, for restored/displayed user text.

Validation:

  • /tmp/mux-bun-tools/node_modules/.bin/bun test src/browser/features/RightSidebar/PromptHistoryTab.test.ts - 5 tests passed
  • node_modules/.bin/tsgo --noEmit - passed
  • git diff --check - passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/ChatInput/index.tsx
@LeonidasZhak LeonidasZhak force-pushed the codex/prompt-history-sidebar-v2 branch from e32c360 to dec0abf Compare June 5, 2026 02:11
@LeonidasZhak

Copy link
Copy Markdown
Author

@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:

  • /tmp/mux-bun-tools/node_modules/.bin/bun test src/browser/features/RightSidebar/PromptHistoryTab.test.ts - 5 tests passed
  • node_modules/.bin/tsgo --noEmit - passed
  • git diff --check - passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/RightSidebar/promptHistoryEntries.ts Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/prompt-history-sidebar-v2 branch from dec0abf to 2aaf760 Compare June 5, 2026 02:18
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the local-command output feedback: prompt history now reuses canEditDisplayedUserMessage so completed <local-command-stdout>...</local-command-stdout> rows are excluded consistently with the edit path. Added a focused test for the completed local-command output case.

Validation:

  • /tmp/mux-bun-tools/node_modules/.bin/bun test src/browser/features/RightSidebar/PromptHistoryTab.test.ts - 6 tests passed
  • node_modules/.bin/tsgo --noEmit - passed
  • git diff --check - passed

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 -->
@LeonidasZhak

Copy link
Copy Markdown
Author

@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 buildPendingFromRestoredInput can reconstruct staged ZIP attachments. The new test also covers a staged attachment plus review metadata to ensure serialized <review> text is not duplicated.

Validation:

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts - 9 tests passed
  • focused ESLint for prompt history, staged attachment parsing, message utils, and chat editing helpers
  • ./scripts/generate-version.sh && ./node_modules/.bin/tsgo --noEmit --project tsconfig.json
  • git diff --check origin/main...HEAD
  • make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/ChatInput/index.tsx Outdated
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 -->
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the stale restored follow-up metadata issue in 0aa8bc13 by binding restored mux metadata to the exact restored composer text. If the user edits the restored text, the active override is now undefined, so /compact follow-up metadata no longer carries stale skill/raw-command data.

Validation:

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts
  • bun 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.json
  • git diff --check origin/main...HEAD
  • make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/ChatInput/index.tsx Outdated
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 -->
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the restored draft payload feedback in 2f25d4f6. Restored prompt-history mux metadata is now keyed to the full draft payload signature (text, attachments, and reviews), so removing/replacing restored attachments or changing review notes invalidates the stale follow-up metadata even if the text is unchanged.

Validation:

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts
  • bun 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.json
  • git diff --check origin/main...HEAD
  • make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/ChatInput/index.tsx
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 -->
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the restored-review merge feedback in 833fd635. Restored prompt-history drafts that already own draftReviews now merge reviews attached later from the Code Review tab into the draft override, then detach those parent reviews so the review panel/send payload stay coherent.

Validation:

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts
  • bun 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.json
  • git diff --check origin/codex/prompt-history-sidebar-v2...HEAD
  • make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/ChatInput/index.tsx Outdated
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 -->
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the merged-review check feedback in b7efcd45. Reviews merged from parent attachedReviews into a restored prompt-history draft now keep their parent review IDs, and successful sends include those IDs in onCheckReviews so the review is marked checked after its contents are sent.

Validation:

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts
  • bun 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.json
  • git diff --check fork/codex/prompt-history-sidebar-v2...HEAD
  • make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/utils/chatEditing.ts
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 -->
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Follow-up fix pushed in a8af5a0 for the duplicate restored review case. Validation run locally:

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts
  • bun 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.json
  • git diff --check fork/codex/prompt-history-sidebar-v2...HEAD
  • make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/ChatInput/index.tsx Outdated
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 -->
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the duplicate-signature review ID feedback in 355e3750. Restored draft review check tracking now stores a set of parent review IDs per review signature, so multiple duplicate parent reviews are all included in onCheckReviews after a successful send. Added test coverage for multiple duplicate merged review IDs.

Validation run locally:

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts
  • bun 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.json
  • git diff --check fork/codex/prompt-history-sidebar-v2...HEAD
  • make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/ChatInput/index.tsx Outdated
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 -->
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the edit-after-merge review check feedback in 6e41e3ba. Parent review check IDs are now keyed by stable draft review IDs instead of mutable review-note signatures, so editing a merged review note before sending still preserves every detached parent review ID for onCheckReviews.

Validation run locally:

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts
  • bun 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.json
  • git diff --check fork/codex/prompt-history-sidebar-v2...HEAD
  • make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/RightSidebar/promptHistoryEntries.ts Outdated
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 -->
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the auto-compaction prompt history feedback in 7473eba9. Prompt History now extracts real followUpContent from synthetic auto-compaction request rows before skipping synthetic maintenance messages, so user-authored near-limit prompts remain reusable. Added coverage for synthetic auto-compaction follow-up prompts.

Validation run locally:

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts
  • bun 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.json
  • git diff --check fork/codex/prompt-history-sidebar-v2...HEAD
  • make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/browser/features/RightSidebar/PromptHistoryTab.tsx
Comment thread src/browser/features/RightSidebar/promptHistoryEntries.ts Outdated
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 -->
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the latest Prompt History feedback in ea38cb2a. Synthetic auto-compaction follow-up entries now insert preserved raw commands when muxMetadata.rawCommand is available, so skill/model one-shot history replay goes back through the normal command parser. The default Continue sentinel is now distinguished by dispatchOptions.source === "internal-resume", so user-authored Continue follow-ups remain visible in History.

Validation run locally:

  • bun test --timeout=10000 src/browser/features/RightSidebar/PromptHistoryTab.test.ts src/browser/utils/chatEditing.test.ts
  • bun 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.json
  • git diff --check fork/codex/prompt-history-sidebar-v2...HEAD
  • make static-check

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: ea38cb2a2d

ℹ️ 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".

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