fix(browser): reuse last network snapshot for browser network --detail#1051
Open
freemandealer wants to merge 1 commit intojackwener:mainfrom
Open
fix(browser): reuse last network snapshot for browser network --detail#1051freemandealer wants to merge 1 commit intojackwener:mainfrom
freemandealer wants to merge 1 commit intojackwener:mainfrom
Conversation
The previous browser network flow made follow-up inspection unstable. `opencli browser network --detail <index>` could read a fresh capture batch instead of the list the user had just seen. That broke index alignment immediately after the first read, so users could not reliably inspect the request they selected from `browser network`. Keep this fix in the CLI only and leave daemon/extension window-idle behavior unchanged. - persist the last listed `browser network` snapshot in the browser cache directory - make `--detail` load that snapshot first so indexes stay stable across follow-up inspection - surface a usage error when the requested index is outside the cached snapshot - add unit coverage for cached detail lookup and out-of-range indexes Before: - `opencli browser network` listed requests - `opencli browser network --detail 3` could consume a different batch and make `3` point at the wrong request After: - `opencli browser network` lists requests and saves that snapshot - `opencli browser network --detail 3` inspects request jackwener#3 from the same snapshot
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
browser networksnapshot and reuse it forbrowser network --detail <index>Problem
browser network --detail <index>could consume a fresh capture batch instead of the list the user had just seen, so the selected index could immediately stop matching the request they meant to inspect.Validation
npx vitest run --project unit src/cli.test.tsnpm run typecheck