fix(extension): keep media hints separate from chat context #553
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 295 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.340
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #553"
general
weight: 0.35
steipete
Summary
With Auto off, opening the panel on an article cached its 1,200-character media preview as chat source. The first question could therefore miss the rest of the article before any summary was generated.
Store media hints separately from extracted source content. Keep media indicators and statistics available, preserve full transcripts and provenance, and clear hints with tab/window caches. Use exact URL identity throughout probing, including hash navigation, and avoid deleting newer source content when an older probe starts.
Behavior proof
Separate browser-session request/reply capture exercises production extension builds at the exact base and PR head in fresh Chromium profiles. A real HTTP server delivers the controlled article, and a local OpenAI compatibility bridge forwards incoming chat messages to the configured real CLI model and returns its actual reply. With Auto off and media priming complete, the first question sends 1,189 transcript characters on the base and 8,273 on the PR. Only the PR request includes the fresh end marker, which the model returns. Summary content stays empty throughout. The built panel UI runs in an extension tab.
The maintained Chromium regression also checks the first outgoing request before any summary. Its article HTML and provider replies are intercepted; the content script, background, panel, and request construction use the built extension. It fails on the base and passes with this change.
Validation
pnpm run buildpnpm run check: 3,892 passed, 43 optional/live skipspnpm -C apps/chrome-extension test:chrome: 3 production checks, 120 passed, 8 optional/live skipsNo dependency, permission, persisted cache format, or companion protocol changes.
Maintainer validation
Both first-chat regressions fail against the base extraction code and pass with this patch.
pnpm run check: 3,886 passed, 49 optional skips.pnpm -C apps/chrome-extension test:chrome: three production checks and 121 browser tests passed, seven optional skips, including the built-extension first-chat end-marker assertion. Independent P0–P2 review is clean.