fix: graceful fallback when extension lacks network-capture support#865
Merged
fix: graceful fallback when extension lacks network-capture support#865
Conversation
When the Browser Bridge extension is older than the CLI, sending 'network-capture-start' to the daemon returns 'Unknown action', causing explore and operate-open to crash with an unhandled error. Wrap startNetworkCapture calls with .catch() so they degrade gracefully — explore continues without network capture data, and operate-open falls back to the JS interceptor injection.
Merged
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.
Summary
startNetworkCapture()calls with.catch()inexplore.tsandcli.ts(operate open)network-capture-start(older version), the CLI now degrades gracefully instead of crashingoperate openfalls back to the JS interceptor injection when session capture failsProblem
Users with an older Browser Bridge extension get a fatal crash when running
opencli explore:The daemon returns this when the extension predates the network-capture feature. The CLI should handle this gracefully since network capture is an enhancement, not a requirement.
Test plan
opencli explore <url>works with an older extension (graceful degradation)opencli explore <url>still captures network data with a current extensionopencli operate open <url>falls back to JS interceptor when session capture fails