Skip to content

fix: move suggested steps after notes#867

Open
matt2e wants to merge 4 commits into
mainfrom
suggested-steps-last
Open

fix: move suggested steps after notes#867
matt2e wants to merge 4 commits into
mainfrom
suggested-steps-last

Conversation

@matt2e

@matt2e matt2e commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move suggested-next-steps metadata after generated note content.
  • Update note extraction to strip terminal metadata while preserving note-body fences and legacy metadata.
  • Add coverage for trailing suggested-next-steps handling.

Tests

  • Pre-push hooks ran during branch push: crates-fmt, crates-lint, crates-test, differ-ci, staged-ci.

@matt2e matt2e requested review from baxen and wesbillman as code owners July 8, 2026 02:29

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

Comment on lines +2561 to +2565
let terminal_complete_block_start = blocks
.iter()
.rev()
.find(|block| text[block.end..].trim().is_empty())
.map(|block| block.start);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

matt2e and others added 4 commits July 9, 2026 11:55
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>
@matt2e matt2e force-pushed the suggested-steps-last branch from 9e569e8 to 5afa53a Compare July 9, 2026 02:22
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