Skip to content

fix: reconnect real-click audit after page target replacement - #207

Merged
mergemaven11 merged 1 commit into
mainfrom
fix/click-audit-target-navigation-current
Aug 27, 2026
Merged

fix: reconnect real-click audit after page target replacement#207
mergemaven11 merged 1 commit into
mainfrom
fix/click-audit-target-navigation-current

Conversation

@mergemaven11

Copy link
Copy Markdown
Owner

Blocks completion of #206 after its refreshed Frontend CI exposed the existing full-page navigation race.

What changed

  • Reconnect the Chrome DevTools Protocol client when a legitimate full-page navigation replaces/detaches the active page target.
  • Re-enable Page/Runtime domains after reconnecting.
  • Reinstall idempotent click-audit runtime instrumentation (browser error capture, clipboard/media mocks, speech-recognition mock) on the replacement target and for future documents.
  • Recover only known navigation/detach errors; real JavaScript/runtime failures remain fatal.
  • Recover if the mouse-release command itself races target replacement.

Why

BragStack currently uses full-page internal navigation in several authenticated surfaces. The real-browser click audit was retrying Runtime.evaluate on the old detached target and could never recover, producing Not attached to an active page even when the link itself was valid.

Supersedes the insufficient closed attempt #195, which retried the same dead CDP session without reconnecting.

Merge gate

Merge only if Backend CI, Frontend CI, and Security CI are green on this exact head, the PR remains current/mergeable, and there are no unresolved review threads.

@mergemaven11
mergemaven11 merged commit 1b0ea7d into main Aug 27, 2026
3 checks passed
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