Repository navigation
Conversation
Notification previews took the first paragraph of the final agent
message as prose. A leading ::page{...} directive, Markdown table, or
JSON block was sent to phones, web, and desktop as raw markup. The
preview now skips those blocks like headings and code fences, and falls
back to the default body when nothing readable remains.
Fixes get-bb#5824
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
The notification preview takes the first paragraph of the final agent message and strips inline Markdown. It already skipped headings and code fences, but it treated plugin directive lines, Markdown table rows, and JSON blocks as prose. When a message started with one of these, phones, web, and desktop showed the raw markup, for example
::page{id="2d98aecf-…" version="e4d24dd2-…"…. The pages skill puts::page{…}first, so this hit most page-publishing turns. See #5824.What changed
plugins/push-notifications/notification-text.tsnow splits the message into paragraphs and returns the first one that is prose:::name[label]{attrs}) and table rows (lines starting with|) end a paragraph and are dropped, like headings and fences.This doesn't add a text form for directives. The issue explains why that plugin API is left out. There are no wire, protocol, CLI, or documentation changes.
How you verified
server.test.tscase "skips directives, tables, and raw JSON in the preview" covers a leading directive, a table, JSON, and a directive-only message. Without the fix it fails with the raw markup as each body. With the fix it passes.pnpm exec turbo run typecheck --filter=bb-plugin-push-notificationspasses.client.test.tscases fail onmaintoo, becauselocalStorageis undefined in the DOM environment. That file doesn't touch this change.Fixes #5824
🤖 Generated with Claude Code