Context
PR #15 round-4 added an eventOpener.focusEl refresh inside wireReviewCard's save handler (app.js:1566-1572). The inline comment claims the check runs "after card.replaceWith(replacement) (line 1558), not before" — but card.replaceWith(replacement) is at line 1564, not 1558. The check still works correctly because Element.querySelector walks detached subtrees, but the comment is misleading about the order.
Suggested fix
Update the inline comment in app.js:1566-1572 to clarify that the check intentionally runs after card.replaceWith because Element.querySelector still resolves the old (now-detached) card's child button:
// Issue #15 round 4 (RISK 2): if the open drawer's opener pointed
// at the card we just replaced, refresh its focusEl so
// closeEventDrawer's focus restoration lands on the new button.
// The check runs after card.replaceWith (line 1564) but still
// resolves the old button correctly: Element.querySelector walks
// detached subtrees.
Discovery
Sonnet r4 NIT 2, r6 NIT 2.
Context
PR #15 round-4 added an
eventOpener.focusElrefresh insidewireReviewCard's save handler (app.js:1566-1572). The inline comment claims the check runs "aftercard.replaceWith(replacement)(line 1558), not before" — butcard.replaceWith(replacement)is at line 1564, not 1558. The check still works correctly becauseElement.querySelectorwalks detached subtrees, but the comment is misleading about the order.Suggested fix
Update the inline comment in app.js:1566-1572 to clarify that the check intentionally runs after
card.replaceWithbecauseElement.querySelectorstill resolves the old (now-detached) card's child button:Discovery
Sonnet r4 NIT 2, r6 NIT 2.