You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(schema): clear the selection ring on every pane-close path (review #65)
Address the medium /code-review findings on this PR:
- Esc-closing the detail pane (the schema tab + the in-app overlay handlers in
explain-graph.js) did `pane.remove()` directly, bypassing the ✕ button's
cleanup — leaving the accent ring + .eg-card--selected class orphaned on the
card with no pane open. Export `clearSchemaSelection(doc)` and call it from both
Esc paths so every close route clears the selection. (the real bug)
- Simplify clearSchemaSelection to a single scan: the ring is always a child of
the selected card, so strip the class and remove its ring together.
- Fix two now-stale comments (schemaDetailClick + openDetailPane) that still
referenced the removed "Insert SHOW CREATE" button / old close behavior.
- Drop the dead `insertCreate: vi.fn()` stubs from two tests (and the now-unused
`vi` import) — the detail pane no longer calls insertCreate.
Extends the overlay Esc test to assert the ring is cleared. 1023 tests pass;
schema-detail.js stays at 100% coverage.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019kE9qbgBNBrfNgwg9fRsMJ
0 commit comments