Skip to content

fix(brainbar): title injection bursts from chunk content#337

Merged
EtanHey merged 1 commit into
mainfrom
feat/brainbar-item-F-injections-title-visual-fix
May 26, 2026
Merged

fix(brainbar): title injection bursts from chunk content#337
EtanHey merged 1 commit into
mainfrom
feat/brainbar-item-F-injections-title-visual-fix

Conversation

@EtanHey
Copy link
Copy Markdown
Owner

@EtanHey EtanHey commented May 26, 2026

Summary

  • make injection burst card titles use the first retrieved chunk summary/content
  • keep source prompts as grouping keys and Triggered by subtitles only
  • add regression coverage for the visual failure caught after rebuilding PR feat(brainbar): humanize injections tab (item F-2) #336

Verification

  • red: swift test --package-path brain-bar --filter InjectionPresentationTests/testBurstSummaryTitleUsesChunkContentInsteadOfSourcePrompt
  • swift test --package-path brain-bar --filter 'InjectionConversationSelectionTests|InjectionEventTests|InjectionPresentationTests|DatabaseTests/testListInjectionEventsLoadsChunkDisplayMetadata'
  • swift test --package-path brain-bar
  • pre-push gate: Python pytest suite, MCP registration, isolated eval/hook routing, bun, FTS regression

Follow-up to Item F Fix 2 visual verification; PR #336 exposed that burst titles could still display source prompt text in live BrainBar.


Note

Low Risk
Presentation-only change in BrainBar injection burst titles; grouping and data paths are unchanged.

Overview
Injection burst card titles now show the first retrieved chunk’s summary/content (via existing previewChunks / displayText) instead of repeating the source/trigger prompt. When no chunk text is available, the fallback is shortened to “N chunk(s) injected” without quoting topicOrSource.

Burst grouping still keys on session + query (topicOrSource); only the visible title string changed. A regression test covers the case where the query is a long orchestrator-style prompt but chunk content should drive the title.

Reviewed by Cursor Bugbot for commit 48177f1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix Burst.summaryTitle to show first chunk's display text instead of source/prompt

  • Burst.summaryTitle in InjectionPresentation.swift now returns the first preview chunk's displayText when it is non-empty.
  • The fallback (when no chunk text is available) drops the source/prompt and returns 'N chunk(s) injected' instead of 'N chunk(s) injected from "<source>"'.
  • Behavioral Change: burst titles in the brain bar will show chunk content rather than the source/prompt label when chunk text is present.

Macroscope summarized 48177f1.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Warning

Review limit reached

@EtanHey, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 38 minutes and 23 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 67821c21-42f3-4a22-aa53-893c11c5ef87

📥 Commits

Reviewing files that changed from the base of the PR and between cffb5ae and 48177f1.

📒 Files selected for processing (2)
  • brain-bar/Sources/BrainBar/InjectionPresentation.swift
  • brain-bar/Tests/BrainBarTests/InjectionPresentationTests.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/brainbar-item-F-injections-title-visual-fix

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 and usage tips.

@EtanHey
Copy link
Copy Markdown
Owner Author

EtanHey commented May 26, 2026

@codex review

@EtanHey
Copy link
Copy Markdown
Owner Author

EtanHey commented May 26, 2026

@cursor @BugBot re-review

@EtanHey
Copy link
Copy Markdown
Owner Author

EtanHey commented May 26, 2026

@coderabbitai review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 26, 2026

You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@EtanHey EtanHey merged commit 512b5ab into main May 26, 2026
7 checks passed
@EtanHey EtanHey deleted the feat/brainbar-item-F-injections-title-visual-fix branch May 26, 2026 22: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