Skip to content

fix: parse inline suggested-next-steps fences#787

Merged
matt2e merged 1 commit into
mainfrom
codex-suggested-actions
Jun 12, 2026
Merged

fix: parse inline suggested-next-steps fences#787
matt2e merged 1 commit into
mainfrom
codex-suggested-actions

Conversation

@matt2e

@matt2e matt2e commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Allow suggested-next-steps extraction to recognize inline opening fences with only trailing whitespace before the newline
  • Add a regression test for notes where the fence is attached to the preceding sentence

Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners June 12, 2026 06:50

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

ℹ️ 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 +2297 to +2301
if after_marker
.find('\n')
.is_some_and(|newline| after_marker[..newline].trim().is_empty())
{
return Some(abs);

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 Keep prose mentions from shadowing the real steps block

When an assistant message mentions the marker inline before the actual block (for example a sentence or code sample ending with ````suggested-next-stepsfollowed by a newline), this now returns that mention as the opening fence because it only validates the text after the marker.extract_suggested_next_steps` then tries to parse everything until the next closing fence and returns `None` on malformed JSON, so it never reaches a later valid `suggested-next-steps` block in the same message and the note loses its suggested next actions. Consider either continuing after parse failures or adding a preceding-character/fence-boundary check that still permits the intended `sentence.```suggested-next-steps` case.

Useful? React with 👍 / 👎.

@matt2e matt2e merged commit fe9e0e0 into main Jun 12, 2026
5 checks passed
@matt2e matt2e deleted the codex-suggested-actions branch June 12, 2026 07:08
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