fix(chat): keep hover dropdowns inside the input toolbar - #63
Merged
Merged
Conversation
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>
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.
Summary
~path prefixes were cut off.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.external-contextandmcp-selectorpanels (same centered pattern).Verification
npm run typechecknpm run lintnpm run testnpm run buildnpm run release:checknpm run audit:prodVerified 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
CHANGELOG.md