feat(#483): add keyboard Library assignment chooser - #516
Merged
Conversation
Add an always-visible Library row action with a named, two-stage Dashboard-to-panel menu. Route assignments through the existing drag/drop service, preserve stale-surface safety, and distinguish duplicate Dashboard titles without guessing ambiguous ids. Cover candidate byte identity, keyboard and focus behavior, async renderer races, canonical fallback names, typography, and real Chromium/WebKit interaction. Co-Authored-By: OpenAI Codex <noreply@openai.com> Claude-Session: unavailable (OpenAI Codex)
This was referenced Jul 28, 2026
Open
Hide the Library assignment Plus at rest while retaining hover and keyboard-focus visibility. After a successful add, switch to the Dashboard tree and reveal, select, and focus the newly created panel through the same settlement helper as drag/drop. Co-Authored-By: OpenAI Codex <noreply@openai.com> Claude-Session: unavailable (OpenAI Codex)
Measure shared menus after mounting, flip them above bottom-edge triggers, and clamp oversized menus into a scrollable viewport area. Cover both Library chooser stages in Chromium and WebKit plus pure anchor and menu geometry tests. Co-Authored-By: OpenAI Codex <noreply@openai.com> Claude-Session: unavailable (OpenAI Codex)
Resolve the styles conflict by preserving #483's Library chooser rules while retaining main's removal of obsolete variable-history styles. Co-Authored-By: OpenAI Codex <noreply@openai.com> Claude-Session: unavailable (OpenAI Codex)
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.
What & why
Closes #483.
Every Library query now exposes a compact, keyboard-reachable Add to dashboard… action. The Plus is hidden at rest and appears on row hover or keyboard focus. Its named two-stage chooser selects a Dashboard and confirms creation of a new panel, then calls the same
assignLibraryQueryToPanelapplication command as drag/drop. The resulting workspace candidate is byte-identical to the service-driven drag path: an independent owned query copy plus a new tile, with the Library source unchanged.The chooser fails closed for duplicate Dashboard ids, distinguishes legitimate duplicate titles with collision-safe id fragments, uses canonical fallback names, and suppresses stale navigation/toasts when a write completes after the user changes surfaces. Both stages measure their rendered height and flip above bottom-edge query rows; unusually tall menus are clamped into a scrollable viewport area, keeping Add/Cancel reachable. After a successful add, the sidebar switches to the Dashboard tree and expands, selects, and focuses the new panel before opening its owned query. Menu focus, arrows, Enter, Cancel, Escape, trigger focus restoration, viewport placement, and post-add tree positioning are covered in unit tests and real Chromium/WebKit flows.
Validation:
npm test— 6,099 tests passed; 100% statements and linesnpm run build—dist/sql.htmlbuilt successfullyChecklist
npm testpasses (the per-file coverage gate is non-negotiable)npm run buildsucceeds (single-filedist/sql.html)src/core/, network insrc/net/(injected fetch), DOM insrc/ui/CHANGELOG.md([Unreleased]) updated if behavior or the deployed surface changed