Repository navigation
Conversation
Chromium lets only one extension answer `chrome.downloads.onDeterminingFilename` and never tells the losers they lost. With a coexisting download-manager extension (Chrono, …) installed, BrowserSkill's trace-scoped `suggest()` is silently discarded, so the file lands flat in the download dir while the result still implies the `BrowserSkill/<trace>/` layout. Nothing in the API reports the loss, so callers could not tell a dropped suggestion from a mis-grouped one. Detect it after completion and surface it as a result `note`. The comparison uses the directory portion only, so Chromium's `" (1)"` uniquify suffix on a repeated basename does not read as a dropped folder, and both `/` and `\` paths are handled. The download itself still succeeds; only the per-call grouping is lost, so this stays a note rather than an error. Adds the troubleshooting row to both skill bundles, and mirrors the field on the bsk-protocol `DownloadResult`. Closes Tencent#361
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Chromium lets only one extension answer
chrome.downloads.onDeterminingFilename, and the API never tells the losers they lost. With a coexisting download-manager extension installed (Chrono and friends), BrowserSkill's trace-scopedsuggest()atapps/extension/src/tools/download-capture.ts:236is silently discarded:The download itself succeeds, and
browser_pathstill reports the real final path, so the result looks healthy — but it implies theBrowserSkill/<trace>/folder layout that is no longer there. Files pile up flat, repeat names get Chromium's" (1)"suffixes, and nothing anywhere tells the caller the suggestion was dropped.Fix
Detect the drop after completion and report it as a result
note, reusing the existingnoteconvention (tool.emulate,request-help):download-capture.ts—suggestionWasDropped()compares the completed path againstbrowserRelativeDirand returnssuggestionDroppedonDownloadCaptureResult.download.ts—handleDownloadturns that intoDOWNLOAD_SUGGESTION_DROPPED_NOTEonDownloadResult.crates/bsk-protocol/.../file_transfer.rs— mirrors the optional field, omitted from the wire when absent.help-and-recovery.mdrow telling the agent to trust the reported path and ask the user to disable the other extension's renaming.Two details worth calling out:
" (1)"to a repeated basename, which must not read as a dropped folder — there is a test pinning that case.This is requested item (2) of #361, plus the troubleshooting note from item (1). Item (3) (a setting to skip the suggestion entirely) is deliberately left out — it is a separate feature surface, not a fix.
Validation
pnpm --filter @browser-skill/extension test— 2422 passed.file-transfer.test.ts31/31, including 3 new cases.cargo test --locked -p bsk-protocol— 166 passed, incl. 2 new serde tests.cargo clippy --locked -p bsk-protocol --all-targetsandcargo fmt --check— clean.pnpm exec biome check .— 578 files clean.node scripts/check-skill-bundles.mjs— both skill directories valid.Two pre-existing failures under full-suite parallel load (
long-screenshot/exports.test.ts,human-loop.test.tschild-process timeout) were confirmed unrelated: the unmodified base fails 3 tests the same way, and both pass in isolation both with and without this branch.Closes #361