fix(desktop-browser): refuse reissued earlier refs and recover from uncommitted ref reuse

Merged
WA
2d ago
+152-42

Summary

Follow-up hardening for #9953 before it reaches main:

  • A ref from an earlier snapshot is refused once a later snapshot gave its element a new ref (a recycled virtual row's "Archive" button no longer lets the old ref act on the new row)
  • When the page reuses an id from a capture this scope never committed (an aborted or timed-out snapshot), the snapshot is recaptured once with the page's issued refs forgotten, instead of the frame staying unreadable or the tab failing every snapshot until it navigates
  • An icon-only control no longer counts as "revealed content" when its label grows, and the text hash is only computed when a name actually changed

Type of Change

  • Bug fix

Testing

  • Red/green unit tests: earlier ref after reissue, uncommitted reuse recapture (driver), icon-only label growth; 546 browser-agent tests pass, desktop type-check clean
  • Production-loop benchmark ablation to follow in a comment

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)