Repository navigation
fix(channels): keep title-only cards visible and media counts accurate - #129193
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 25, 2026, 5:31 AM ET / 09:31 UTC. ClawSweeper reviewWhat this changesThis PR updates rendered channel-message metadata so title-only presentations are visible and a media URL mirrored in the plural media list is counted once. Merge readinessKeep open. The title-only and mirrored-alias fixes are directionally correct, but the new repeated-media case conflicts with the canonical outbound delivery normalization and can leave durable fan-out metadata inaccurate. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherMessage-action payloads enter the durable channel sender, which creates a rendered batch plan for live previews, queue metadata, and recovery before outbound delivery normalizes the actual payload. The plan’s media cardinality must match the canonical delivery payload. flowchart LR
A[Message action payload] --> B[Durable send context]
B --> C[Rendered batch planner]
C --> D[Live preview and queue metadata]
B --> E[Outbound payload normalizer]
E --> F[Channel delivery]
C --> G[Fan-out consistency check]
E --> G
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -7, Tests +54. Total +47 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Derive rendered media metadata from the same canonical ordering and de-duplication rule as outbound payload planning, then cover the required durable-send boundary. Do we have a high-confidence way to reproduce the issue? Yes—source inspection gives a high-confidence path: a title-only presentation is accepted by the presentation normalizer but current main marks only nonempty blocks, while canonical outbound normalization demonstrates the repeated-media mismatch. Is this the best way to solve the issue? No. The title-only and mirrored-alias portions use the correct owner boundary, but repeated-list media must follow the canonical outbound normalization rather than a separate local rule. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 315969f6693e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users sending a presentation that contains only a heading would have a genuinely visible card recorded as an empty message in durable send and live-preview metadata. Ordinary message-tool media sends also recorded one attachment twice because the payload producer mirrors its primary attachment in both supported media fields.
Why This Change Was Made
The rendered-batch owner now recognizes presentation headings, merges the overlapping single-media alias without collapsing deliberately repeated ordered attachments, and derives every aggregate from the same normalized render-plan items. This removes the duplicate raw-payload counting path and preserves distinct attachments supplied through both fields.
User Impact
Title-only cards stay visible to durable delivery and live-preview consumers, and generated-image or other media sends report the number of attachments that will actually be delivered. Existing voice, location, multi-attachment, distinct legacy-media, and intentionally repeated-attachment behavior remains unchanged.
Evidence
empty; the same builder produced one attachment in bothmediaUrlandmediaUrls, while the owner incorrectly counted two.node scripts/run-vitest.mjs src/channels/message/rendered-batch.test.ts src/channels/message/send.test.ts src/channels/message/outbound-bridge.test.ts src/media/media-retirement-non-goals.test.ts src/infra/outbound/message-action-send.test.ts— 57 tests passed across five files and three Vitest shards.