Skip to content

fix(explorer): handle pointer focus and index copy - #1374

Merged
debba merged 1 commit into
TabularisDB:mainfrom
CreedTech:fix/context-menu-followups
Nov 5, 2026
Merged

debba merged 1 commit into
TabularisDB:mainfrom
CreedTech:fix/context-menu-followups

Conversation

@CreedTech

@CreedTech CreedTech commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Change

Follow up on the nonblocking review of #1077: #1077 (review).

A submenu opened by clicking a focusable trigger now closes after the pointer leaves, even when the trigger retains focus. Keyboard navigation keeps the submenu open; keyboard input switches focus retention back on, and leaving the row resets it. The index context menu also uses the shared clipboard helper and reports success or failure, matching table/view copy feedback.

The requested aria-haspopup="menu" was already added upstream, so this PR retains it.

Validation

  • Added pointer-focus versus keyboard-focus coverage and index clipboard success/failure coverage. Before the fixes, three of the four new cases failed; afterward, all 86 tests in ContextMenu.test.tsx and ExplorerSidebar.test.tsx pass.
  • pnpm typecheck: passed.
  • ESLint on the two changed source files: passed, including accessibility checks.
  • Prettier on all four changed files: passed.
  • git diff --check: passed.

The focus regression explicitly holds DOM focus to reproduce the behavior called out in review. I have not run a Windows/WebView2 desktop session or the full repository test suite.

Implementation and validation were assisted by Codex.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@kilo-code-bot

kilo-code-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • packages/web-ui/src/components/layout/ExplorerSidebar.tsx
  • packages/web-ui/src/components/ui/ContextMenu.tsx
  • packages/web-ui/tests/components/layout/ExplorerSidebar.test.tsx
  • packages/web-ui/tests/components/ui/ContextMenu.test.tsx

Reviewed by claude-sonnet-5.5 · Input: 248 · Output: 2K · Cached: 152.5K

Review guidance: REVIEW.md from base branch main

@1-DARK 1-DARK left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CreedTech for the quick follow-up on the #1077 review!

I verified the changes locally. The new pointer-focus and index-copy tests fail on main (3 of 4, as reported) and pass on this branch. Typecheck, ESLint, Prettier, and the full web-ui test suite (8,073 tests) all pass.

The implementation looks good, and using copyTextToClipboard with success and error feedback for the index "Copy Name" action is consistent with the existing tables and views implementation.

No changes are required. The existing aria-haspopup="menu" attribute was already present on main.

Thanks for addressing the review feedback. Happy to approve as is!

@debba debba left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing both the index name copy action and pointer focus in submenus. Using the shared clipboard helper and reporting copy failures should make that action more dependable. I haven't found an obvious blocker in the diff. I'll run e2e tests for further verification of pointer and keyboard behavior, then merge if those pass.

@debba

debba commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

I tried this in the desktop app against SQLite: Copy Name put the index name in the system clipboard, pointer leave closed the submenu, and keyboard navigation kept it open and returned focus with ArrowLeft. The 86 targeted tests pass; the full check command hits only the theme test failures also reproduced on main. This is ready to merge.

@debba
debba merged commit b2080af into TabularisDB:main Nov 5, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants