Skip to content

fix(chat): keep hover dropdowns inside the input toolbar - #63

Merged
luoxuanzao merged 1 commit into
mainfrom
fix/popover-dropdown-clipping
Sep 15, 2026
Merged

luoxuanzao merged 1 commit into
mainfrom
fix/popover-dropdown-clipping

Conversation

@luoxuanzao

Copy link
Copy Markdown
Member

Summary

  • The external-context and MCP hover dropdowns are centered on their toolbar icons with a fixed width. When the icon sits near the left edge of the toolbar, the centered panel overflowed the chat container's clipped edge and lost its leading characters — the panel title and the ~ path prefixes were cut off.
  • Adds a pure placement module (hover-dropdown-placement.ts) that clamps the panel center so it stays inside the input toolbar with an 8px edge inset, and caps the width only when the toolbar itself is narrower than the panel.
  • Both selectors publish the result as CSS custom properties on hover and on dropdown render; the previous static values remain as CSS fallbacks.
  • Fixes the clipping in both external-context and mcp-selector panels (same centered pattern).

Verification

  • npm run typecheck
  • npm run lint
  • npm run test
  • npm run build
  • npm run release:check
  • npm run audit:prod
  • Tested affected qodercli behavior against a real CLI when applicable

Verified on a live Obsidian vault over CDP in two scenarios: at full sidebar width the 320px panel renders fully inside the container, and with a 300px-wide toolbar the panel shrinks to 258px with the title and ~ prefixes intact. 13 new unit tests cover the placement math; full suite (164 suites / 3523 tests) passes.

Safety

  • No credentials, private vault content, internal URLs, or personal paths are included
  • User-visible changes are documented in CHANGELOG.md

The external-context and MCP server panels are centered on their toolbar
icons and grow upward with a fixed width. When the icon sits near the left
edge of the toolbar, the centered panel overflowed the chat container's
clipped edge, cutting off the panel title and the "~" path prefixes.

A new pure placement module clamps the panel center so it stays within the
toolbar with an 8px edge inset, and caps the width only when the toolbar
itself is narrower than the panel. The selectors publish the result as CSS
custom properties on hover and on dropdown render, with the previous static
values kept as fallbacks.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
@luoxuanzao
luoxuanzao merged commit 7aadd26 into main Sep 15, 2026
10 checks passed
@luoxuanzao
luoxuanzao deleted the fix/popover-dropdown-clipping branch September 15, 2026 12:39
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.

1 participant