fix: move suggested steps after notes#867
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e8b2d0b80
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let terminal_complete_block_start = blocks | ||
| .iter() | ||
| .rev() | ||
| .find(|block| text[block.end..].trim().is_empty()) | ||
| .map(|block| block.start); |
There was a problem hiding this comment.
Handle trailing prose after the metadata block
When the assistant emits a valid suggested-next-steps block after the note but then appends any non-whitespace, this EOF-only check no longer classifies the block as metadata. In that scenario extract_note_content saves the fenced metadata and trailing prose into the note body, and extract_suggested_next_steps also skips the after-note block because it uses the same terminal-only rule, so suggestions can be lost or pulled from an older message. This is easy to hit when a provider adds a closing sentence despite the prompt; consider treating the last post-separator suggested-next-steps block as metadata even if stray prose follows it.
Useful? React with 👍 / 👎.
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
Migration 0020 alters notes and project_notes, which the partial v12/v13 fixture databases lacked (real databases at those versions have them from the baseline migration). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
9e569e8 to
5afa53a
Compare
Summary
Tests