Skip to content

fix(browser): ignore transient CDP decode errors#566

Open
cbusillo wants to merge 3 commits intojust-every:mainfrom
cbusillo:fix/browser-handler-decode-error
Open

fix(browser): ignore transient CDP decode errors#566
cbusillo wants to merge 3 commits intojust-every:mainfrom
cbusillo:fix/browser-handler-decode-error

Conversation

@cbusillo
Copy link

Summary

  • Treat the recurring chromiumoxide decode error ("data did not match any variant of untagged enum Message") as transient so the browser handler no longer restarts and drops the active page after normal navigation noise.
  • Add regression coverage: a unit test for the ignored error and an integration test proving BrowserManager can open a local HTTP page and keep the DOM accessible in headless and headed modes.
  • Fix TUI ordering guard: background prelude inserts are now tagged as background, preventing a debug-assertion panic when starting new sessions.

Testing

  • ./build-fast.sh
  • cargo test -p code-browser -- --nocapture

Treat chromiumoxide Message deserialization failures as transient browser handler errors so normal navigation does not clear the active page. Add regression coverage for the handler path and BrowserManager local navigation in headed and headless modes.
Prevent debug assertion panic by tagging background HistoryCells inserted via the prelude helper with the background tag instead of prelude. This keeps background events on the background code path while preserving the synthetic key ordering used for top-of-request inserts.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7916c09e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +88 to +90
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn headed_internal_browser_can_open_local_http_server() {
assert_manager_can_open_local_http_server(false).await;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard headed browser test behind display availability

The new headed test always executes assert_manager_can_open_local_http_server(false), which requires launching Chrome without headless mode. In environments where DISPLAY/Wayland is unavailable (common for CI and dev containers), browser launch fails before navigation, so cargo test -p code-browser fails due to environment rather than a product regression. Please gate this test (or skip it) when no display server is present.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant