Skip to content

Render Builder annotations as collapsible chat details - #1244

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/builder-annotation-display
Sep 10, 2026
Merged

tannerlinsley merged 1 commit into
mainfrom
taren/builder-annotation-display

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Render preview annotations as independently expandable Annotation 1, Annotation 2, etc.
  • Keep the original saved content and AI context unchanged.
  • Apply the same display to queued messages, with plain-text fallback for other content.

Verification

  • Browser checked collapsed and expanded states.
  • pnpm test passed: 494 tests passed, 1 existing skip, type and lint checks passed.

Summary by CodeRabbit

  • New Features

    • Preview comments in builder messages are now displayed as individually collapsible annotations.
    • Annotation details include sanitized preview context and element information.
  • Bug Fixes

    • Ordinary or incomplete messages continue to display unchanged instead of being incorrectly parsed.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b7c1c956-90ae-4116-ab2f-54c135755ecb

📥 Commits

Reviewing files that changed from the base of the PR and between 1a628e2 and b124b6f.

📒 Files selected for processing (3)
  • src/components/builder/BuilderAssistant.client.tsx
  • src/components/builder/BuilderUserMessageContent.tsx
  • tests/builder-user-message-content.test.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The change adds strict parsing for formatted preview annotations. Valid annotations render as collapsed elements in transcript and queued prompt views. Other messages retain their original rendering.

Changes

Builder annotation rendering

Layer / File(s) Summary
Annotation parsing and rendering
src/components/builder/BuilderUserMessageContent.tsx
Adds strict parsing for numbered preview annotations. Valid annotations render as collapsed details elements. Invalid or ordinary content renders unchanged.
Builder integration and validation
src/components/builder/BuilderAssistant.client.tsx, tests/builder-user-message-content.test.ts
Uses the new component for transcript and queued prompt content. Tests cover valid annotations, escaped script content, incomplete messages, numbering errors, trailing text, and invalid URLs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to b124b

Builder annotations now render as independently collapsible details while ordinary content remains unchanged. Validation covers both views and malformed input, with no actionable merge-blocking risk remaining.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: rendering Builder annotations as collapsible chat details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/builder-annotation-display

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tannerlinsley
tannerlinsley merged commit 2e8b032 into main Sep 10, 2026
6 of 7 checks passed
@tannerlinsley
tannerlinsley deleted the taren/builder-annotation-display branch September 10, 2026 17:54
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