fix: render path suggestions as floating overlay to prevent dialog jump#449
Open
oryaacov wants to merge 2 commits intoasheshgoplani:mainfrom
Open
fix: render path suggestions as floating overlay to prevent dialog jump#449oryaacov wants to merge 2 commits intoasheshgoplani:mainfrom
oryaacov wants to merge 2 commits intoasheshgoplani:mainfrom
Conversation
Add ANSI-aware overlay helpers (overlayDropdown, truncateVisible, sliceVisibleFrom) that paint a multi-line string on top of a rendered TUI screen at a specific row/col, giving a z-index effect. Also adds renderSuggestionsDropdown which renders path suggestions as a bordered floating menu with a distinct background color and keybinding footer. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace inline path suggestion rendering with the overlay dropdown from the previous commit. The suggestions now float over the dialog content below them instead of pushing it down, eliminating the layout jump when navigating to/from the path field. Both single-path and multi-repo modes use the shared overlay. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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
Changes
Commit 1: Overlay infrastructure (
feat)overlayDropdown(base, overlay, row, col)— paints a multi-line string on top of a rendered TUI screen at a specific position, ANSI-awaretruncateVisible/sliceVisibleFrom— ANSI-safe string slicing helpers for the overlaydropdownMenuBg()— returns a slightly elevated background color (dark:#292e42, light:#dcdde2) to distinguish the menu from the dialog surfacerenderSuggestionsDropdown()— renders path suggestions as a bordered floating menu with distinct background and keybinding footerCommit 2: Usage (
fix)suggestionsLineOffsetduring content building to know where to position the overlaylipgloss.Placecenters the dialog, overlay the suggestions menu at the computed positionVisual behavior
Test plan
TestNewDialog_*tests pass (47 tests)TestOverlayDropdown_*tests pass (4 tests)internal/uitest suite passes🤖 Generated with Claude Code