Skip to content

fix: attribute media-only chat previews#475

Closed
agent-p1p wants to merge 1 commit into
masterfrom
pip/whitenoise-mac-471
Closed

fix: attribute media-only chat previews#475
agent-p1p wants to merge 1 commit into
masterfrom
pip/whitenoise-mac-471

Conversation

@agent-p1p

@agent-p1p agent-p1p commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #471

Summary

  • Compute the media-only Attachment fallback before sender attribution instead of returning early.
  • Apply the existing incoming-message sender prefix to attachment previews.
  • Update regression coverage so incoming media-only previews with a display name render as Alice: Attachment.

Verification

  • git diff --check — passed.
  • bash -n scripts/ci/macos-sanity-checks.sh — passed.
  • scripts/ci/macos-sanity-checks.sh — expected local failure on Linux: xcodebuild: command not found.
  • CI-exact xcrun swift-format, Xcode unit tests, release build, and static analysis require macOS and will run in GitHub Actions.

Sensitive paths

none


Open in Stage

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@agent-p1p, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b9bcf215-1e76-4c1d-a5e5-7b84a90e6633

📥 Commits

Reviewing files that changed from the base of the PR and between 0454dbf and bcb944f.

📒 Files selected for processing (2)
  • whitenoise-mac/Core/MarmotMapping.swift
  • whitenoise-macTests/whitenoise_macTests.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pip/whitenoise-mac-471

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.

@stage-review

stage-review Bot commented Jul 12, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 2 individual chapters for you:

Title
1 Attribute media-only previews to senders
2 Update regression tests for media previews
Open in Stage

Chapters generated by Stage for commit bcb944f on Jul 12, 2026 3:37am UTC.

@agent-p1p

Copy link
Copy Markdown
Contributor Author

Pip adversarial review

Verdict: merge-blocked by required CI; no defect found in the PR's source change.

Blocking

  1. Required PR Checks is red. Mac CI run 29178495489 failed the 418-test plan in messageMediaDiskCacheReadDeletionMaintainsTrackedFootprint() (three assertions at lines 2224/2254/2267), so this PR is ineligible for merge under Pip's ever-red policy. The same deterministic failure is already present on master at base SHA 0454dbf and tracked by #457; it is unrelated to this two-file preview change. Restore a green base via CI: restore the macOS PR test plan after media-cache changes #457, then retire/recreate this PR rather than merging or merely rerunning an ever-red PR.

Diff review

  • The media-only fallback is now assigned to body and flows through the exact existing chat-bubble sender-attribution guard. Incoming previews with a nonblank display name become Alice: Attachment; outgoing previews, missing/blank names, and non-chat presentations retain their prior unprefixed behavior.
  • Literal Unsupported message text remains distinguishable because isMediaOnlyChat still requires empty source plaintext.
  • Scope is minimal: 11 insertions / 6 deletions across the mapper and existing regression test; no sensitive path touched.
  • The changed regression mediaOnlyChatPreviewShowsAttachmentLabelInsteadOfUnsupported() passed on the PR head. Static Analysis, Swift format lint, and macOS sanity checks also passed. git diff --check origin/master...HEAD passed locally.
  • CodeRabbit did not perform a review because its quota was exhausted; its status context is not substantive review evidence.

Counts

@agent-p1p

Copy link
Copy Markdown
Contributor Author

Retiring this PR under Pip’s ever-red policy. The required PR Checks failure is the known master regression tracked by #457, not this diff. PR #464 is green and ready to restore the base; once it merges, this branch will be rebased and a fresh PR created so the replacement has no inherited red CI history.

@agent-p1p agent-p1p closed this Jul 12, 2026
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.

Bug: chat-list preview drops the sender-name prefix for media-only incoming group messages ("Attachment" with no attribution)

1 participant