Files
bookmarkmagic/scripts
poli0981andClaude Opus 5.5 70f535eeba fix(review): focus after a delete, the webkit WebRTC alias, one new folder, a sturdier harness
A second adversarial review, of the review-fix commits themselves, found
six problems. All are fixed here.

- Focus after a delete: a delete from the duplicate panel, or from the trash
  button of a row that did not have focus, left keyboard focus on <body>.
  The dialog cannot hand focus back to a button that went with what it
  deleted. `confirmDelete` now says where the delete was asked for: the
  tree gets focus back, and the panel moves it to the next copy's button,
  else to its close button. Checking for <body> was not enough: after a
  dialog closes, focus sits on its button until the browser's next
  rendering update, so a control in a closed dialog, or a detached one,
  now counts as lost too. Confirmed in the harness for all three paths.
- Import step 04: confirming the safety backup removed both of its buttons
  and dropped focus. A phase change now hands focus back to the heading.
- WebRTC: both gates matched `\bRTCPeerConnection\b`, which no word
  boundary lets match `webkitRTCPeerConnection`, an alias Chrome still
  ships. Prefixed aliases now count. The evasion comment in guard.mjs no
  longer claims to cover every way of hiding a member name.
- New folder: Chrome fires onCreated before create() resolves, so the live
  event could insert the folder first and newFolder then inserted a second
  row with the same id. It now inserts only when the folder is not already
  there, with a test that loses the race on purpose.
- Screenshot harness: `wxt build` empties .output first, and re-listing it
  threw inside the request handler, which ended the process. It now answers
  404 or 503 and recovers once the build is back.
- The duplicate summary uses one wrapper key instead of two fragments glued
  together in markup (docs/07 §2); Japanese gets its own separator again.
- Docs: the popup's tabId and `tabs.getCurrent` (docs/02 §6, 08 §2), the
  new-folder race (03 §3), focus after deletes and import phases (06 §5).
  SonarCloud's scan job now also receives the generated .wxt/, so
  tsconfig.json's `extends` and the `@/` alias resolve (12 §2.5).
- Tests for edit/tree-keys.ts, which had none, and for the focus helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 04:03:56 +07:00
..