Repository navigation
feat(extension): read Bilibili captions from the active tab - #542
vincent-peng wants to merge 2 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThe extension retrieves timestamped Bilibili captions through the active tab’s session for summaries and follow-up chat. Example: Summarize BV1ipnr6cExW in Browser mode while signed in to Bilibili.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 1 item remains This PR adds a useful capability absent from main and fixes the previous recovery finding; automatic routing, caption-language ordering, and the initial support boundary still need an owner decision. Priority: P2 Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherThe extension’s background content-preparation pipeline takes the active video URL and input mode, retrieves captions inside the page, and supplies text, timestamps, and provenance to summary and chat owners. flowchart TD
A[Active Bilibili tab] --> B[Media extraction plan]
B --> C[Page session caption retrieval]
C --> D[Prepared text and timestamps]
D --> E[Summary provider]
D --> F[Cached chat context]
C --> G[Audio recovery or Page guidance]
Technical reviewBest possible solution: Adopt session-local caption extraction through the existing preparation owner if the maintainer accepts automatic routing, English-first ordering, and JSON-only initial support. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the missing Bilibili caption route, and the supplied released-extension comparison demonstrates metadata reaching the provider instead of the captioned fixture. Is this the best way to solve the issue? A page-local retriever fits the existing caption-preparation boundary, avoids exporting cookies, and reuses summary and chat owners without adding a competing pipeline. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ac39889e961b. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 24, 2026, 1:23 AM ET / 05:23 UTC (Revision 2). |
|
Addressed the caption-error finding in commit aa268dc. Preparation retains the caption failure and its localized descriptor through unsuccessful audio recovery. The panel displays login/Page guidance directly, without the generic Daemon recommendation. Successful audio recovery clears the old caption error. Two regressions failed before the repair. The focused preparation/summary suites now pass 38 tests, localization/typechecks pass across 14 languages, and pnpm run check passes 3,909 tests with 43 skips. The supported Chrome gate passes 3 production checks plus 120 tests with 8 optional/live skips. After restoring the production build, the Bilibili E2E passed again and daemon restart/status authenticated successfully. Production-extension behavior proofReal-caption browser pipeline proof for #542The failure-path repair is now in At 05:06:51 UTC on 2026-10-24, the existing logged-in Chrome session retrieved the real English AI captions for BV1ipnr6cExW: part 1, CID I then exercised unchanged production extension builds in isolated Chromium profiles with that captured caption body. The page and metadata requests were controlled replays, not another live logged-in Bilibili session. No browser cookies or provider keys were copied. The ordinary Direct-provider client used a loopback test bridge that delegated to the actual configured Observed results at 05:14:08 UTC: The source contract deliberately rejected the baseline's wrong-input request before invoking a model; it did not manufacture a successful baseline answer. Both production manifests were byte-identical, including permissions. Observed model output excerpts, each a paraphrase of the video content: The follow-up went on to cite 0:49–0:52, which matches the captured cues discussing pinky-finger strain. {
"captured_timed_transcript_sha256": "1605ebf0095cefb91f0d897935c5372eef45ac5376b02a21c9abeb01f4b943bb",
"followup_cached_transcript_sha256": "1605ebf0095cefb91f0d897935c5372eef45ac5376b02a21c9abeb01f4b943bb",
"exact_match": true,
"cached_source_provenance": "bilibili-ai-captions/ai-en"
}The visible failure message was:
This establishes live session retrieval separately from production-extension summary/chat integration with the actual retrieved content. It does not claim a same-profile live authenticated extension run. This video has one real part; the p=2 routing test uses controlled metadata. Settings-upgrade proof is separate. The JSON-only boundary and English-first automatic routing remain explicit maintainer decisions. Released-settings upgrade proofSettings upgrade verification, 2026-10-24. The official v0.25.3 Chrome ZIP matched both its GitHub SHA256 digest and published SHA256SUMS. In disposable Chromium, its real service worker wrote 34 explicit synthetic settings. After closing Chromium, the extension directory was replaced by the current production build at the same path; the same browser profile and extension ID were retained. All stored fields and actual Options UI values remained unchanged.
Both release and unmodified current build have manifest version 0.25.3. A separate artifact-only bump to 0.25.3.1 also loaded with the same ID and retained all settings; the canonical and immutable production manifests were not edited. No real keys, cookies, or user Chrome profile data were used. HTTP requests in the test profile were fulfilled locally. Support boundary and maintainer decisionThe real supplied video has one part. The part-2 browser test uses controlled metadata to exercise selected-part routing; it is not a claim of live part-2 captions on this video. The tested production files were built from the repaired working tree subsequently committed as aa268dc. The immutable background SHA256 was d454555fe9b5c46ff72124cc21f76433bd8f8ea0d135f2e68fcccbb64e12ead2; the unmodified official release background SHA256 was 231ce4de891b5c8acd39ffc44310bf379be63d7c1d5fbe4ea1066e4a7dab2b47. A same-profile live authenticated extension run remains unverified: browser security policy blocked the extension-manager page. We used the explicitly described split retrieval/replay proof and did not copy Bilibili cookies or change the user's installed extensions. Maintainer approval of automatic JSON-caption routing and English-first ordering remains open. My recommendation is to accept this bounded initial support, retain explicit Page mode, and keep protobuf-only inventories documented as unsupported. CLI/downloader support remains separate in #541. |
|
@clawsweeper re-review Head |
|
🦞👀 Re-review progress:
|
Bilibili BV video pages fall through to page text or inaccessible blob-media transcription. Read captions inside the active tab using its existing Bilibili session, resolve the selected
p=part, and pass timestamped captions to summary and cached follow-up chat.Relates to #533. Independent of CLI PR #541 and targets main directly.
Inspectable behavior and upgrade proof
Actual request/output metrics, visible recovery guidance, before/after comparison, real-model summary/chat, and released-settings upgrade logs.
Live retrieval in logged-in Chrome returned five AI tracks on
BV1ipnr6cExW; without credentials, the same metadata request returned none. English contains 267 cues through 562.8 seconds.The production extension then ran in a disposable profile with the captured real caption payload replayed at the network boundary. Its Direct-provider client used a loopback compatibility bridge to the real configured
cli/agybackend, producing a 994-character summary and 992-character follow-up. Chat retained all 267 timed cues exactly andbilibili-ai-captions/ai-enprovenance. The official v0.25.3 extension failed the same caption-input contract. No Bilibili cookies or real provider keys were copied into the test profile.An official v0.25.3 release ZIP, verified against its asset digest and SHA256SUMS, wrote 34 explicit settings in an isolated profile. Replacing it at the same path/profile/extension ID with the fixed production build retained every stored field and actual Options control. Fresh defaults were checked independently; an explicitly test-only version-update reload also retained settings.
Validation
pnpm run buildpnpm run check: 3,909 passed, 43 skippedpnpm -C apps/chrome-extension test:chrome: 3 production checks, then 120 passed and 8 optional/live skipsLimits and maintainer decision
The live fixture has one part; the p=2 browser test uses controlled metadata to verify routing. JSON inventory from
/x/player/wbi/v2is supported. Protobuf-only inventories from/x/v2/subtitle/web/viewremain unsupported. Daemon slide extraction retains its URL pipeline.Live authenticated retrieval and production-extension summary/chat replay are separate proofs. A same-profile live authenticated extension run remains unverified because browser security policy blocked extension-manager access.
Maintainer approval of automatic caption routing and English-first ordering remains open. Recommendation: accept this bounded initial scope, retain explicit Page mode, and document the protobuf-only boundary.