feat(schema): remove detail-pane action button + ring the selected node#65
Merged
BorisTyshkevich merged 2 commits intoJun 28, 2026
Merged
Conversation
The full-view detail pane's header carried an "Insert SHOW CREATE" button — an action felt out of place in what is otherwise a read-only info panel (and its label/behavior were confusing). Removed it; the head is now just the qualified name + kind. (SHOW-CREATE-into-editor is still available via shift-click on a node in the schema tree, so no capability is lost.) In its place, opening a node's detail pane now rings that node's card in the graph: an accent rect drawn just outside the box, which together with the card's own kind-coloured stroke reads as a double border — so it's unmistakable which object the pane describes. The ring follows re-selection and is cleared when the pane is closed (✕). Cards in another database (or a test harness) without a drawn card degrade to a no-op. schema-detail.js stays at 100% coverage; tests cover the ring, re-selection, close-clears-ring, and the no-rect/no-card paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kE9qbgBNBrfNgwg9fRsMJ
…#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
BorisTyshkevich
added a commit
that referenced
this pull request
Jun 28, 2026
Bugfix release rolling up the schema-graph + zoom work since 0.1.3: - #64: code-review follow-ups (schemaLayout extraction, fixedAnchor helper, linked-only transitive nodeCap, label-strip guard). - #65: drop the detail-pane "Insert SHOW CREATE" button, ring the selected node (double border), and clear that ring on every pane-close path (incl. Esc). No new runtime deps. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kE9qbgBNBrfNgwg9fRsMJ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two UX fixes for the full schema view's bottom detail pane.
1. Remove the "Insert SHOW CREATE" button
An action button felt out of place in an otherwise read-only info panel, and its label was confusing (it ran
SHOW CREATEand replaced the editor with the formatted DDL — neither "insert" nor obvious). The header is now just the qualified name + kind.No capability lost: SHOW-CREATE-into-editor is still available by shift-clicking a node in the schema tree (
insertCreatekeeps that caller).2. Ring the selected node (double border)
Opening a node's detail pane now highlights which card it describes: an accent
rectdrawn just outside the card's box, which — with the card's own kind-coloured stroke — reads as a double border. The ring follows re-selection and is removed when the pane is closed (✕). A node without a drawn card (other-DB view, or a test harness) degrades to a no-op.Tests
schema-detail.jsstays at 100% coverage. Added tests for: the head having no action button, the ring +eg-card--selectedclass on open, ring placement (3px outside, behind content), re-selection moving the ring, ✕ clearing it, and the no-rect path. 1023 tests pass.Verification
Built, deployed to antalya, opened
shop.productsin the full view: the header shows justshop.products · table(no button), and theproductscard carries an accent ring (rgb(0,121,173)) — a clear double border — matching the clicked node. Screenshot confirmed.🤖 Generated with Claude Code
https://claude.ai/code/session_019kE9qbgBNBrfNgwg9fRsMJ