Repository navigation
fix(site): keep the family message envelope out of copy, edit, history, and queued preview - #426
Conversation
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c38e4bba67
ℹ️ 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".
|
|
Codex Review: Didn't find any major issues. Delightful! 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". |
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df43465f71
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6152cb4c51
ℹ️ 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".
@codex review |
|
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". |
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
Merged at head Gates on this exact head:
What this changes: a message that Not exercised: a live browser session on these four surfaces. The unit tests cover each surface's parsing function and the prompt history filter. |
Closes #421.
A delivered family message is a user message whose text the server wraps in an
<agent-message>envelope. OnlyForkFamilyMessageHeader.tsxstripped it for display; four other surfaces used the raw envelope. This change routes each of them through the existingparseFamilyMessagehelper inforkFamilyMessage.ts(fork code,fork-family-messagesexperiment). A newgetFamilyMessageBodyhelper in the same fork module reads the body from a message's first text part, so no surface adds its own regex.Changes:
deriveMessageDisplayStatesetscopyTextto the envelope body for a user message whose text is an envelope.getEditableContentPayloadreturns the envelope body as the draft text, so editing and saving a family message no longer resends the envelope. An async answer is never an envelope, so the async-answer path is unchanged.getQueuedMessageInfostrips the envelope when the first text part holds one, so the preview shows the body's first line instead of the envelope's. A newFamilyMessagestory inQueuedMessagesList.stories.tsxcovers that visual state.parseFamilyMessagereturnsundefinedfor ordinary text, so behavior is unchanged without the experiment.Known limit kept from #247: the deliberate loss of framing when resending a family message body from edit or history is intended; the body is the message.
Not exercised: this PR touches no Go code and no database queries;
coderd/database/queries/chats.sqlis unchanged, as the issue requires.Pre-commit hook
Pre-commit hook disabled for this branch with
git config --worktree coder.pre-commit false(worktree-local only), following #407. Checks run instead, all on the head commit:pnpm exec vitest run --project uniton the five touched test files: 200 passed.pnpm lint:types(tsc): clean.pnpm check(biome check, error on warnings): clean.pnpm format(biome format): no fixes applied.pnpm lintfails with 2 pre-existing React Compiler diagnostics onForkAgentMentionMenu.tsxandForkHtmlAttachmentViewer.tsx; both reproduce on a cleanorigin/maincheckout, so they are not from this diff.QueuedMessagesList.stories.tsxandForkFamilyMessageHeader.stories.tsx: 28 passed.Negative controls
Each new test was shown to fail with its production fix reverted, then the fix was restored:
AssertionError: expected '<agent-message from_chat_id="5f8b6a52...' to be 'The tests pass, so the **API review**...'.AssertionError: expected { ... } to deeply equal { ... }on the payload text.AssertionError: expected '<agent-message from_chat_id="5f8b6a52...' to be 'Build the settings page'.AssertionError: expected [ { type: 'text', ... } ] to deeply equal [ { type: 'text', ... } ]on the preview part.Test evidence
Commands and results, run in
site/:pnpm exec vitest run --project unit src/pages/AgentsPage/components/QueuedMessagesList.test.tsx src/pages/AgentsPage/components/ChatConversation/messageHelpers.test.ts src/pages/AgentsPage/components/ChatConversation/messageParsing.test.ts src/pages/AgentsPage/components/ChatPageContent.test.tsx: 189 passed.src/pages/AgentsPage/components/ChatElements/tools/forkFamilyMessage.test.ts: 200 passed.pnpm exec vitest run --project=storybook src/pages/AgentsPage/components/QueuedMessagesList.stories.tsx src/pages/AgentsPage/components/ChatConversation/ForkFamilyMessageHeader.stories.tsx: 28 passed.