Skip to content

feat(lsp): redesign parameter hints popup, fix occlusion and flicker#2990

Merged
abose merged 2 commits into
mainfrom
ai
Jun 26, 2026
Merged

feat(lsp): redesign parameter hints popup, fix occlusion and flicker#2990
abose merged 2 commits into
mainfrom
ai

Conversation

@abose

@abose abose commented Jun 25, 2026

Copy link
Copy Markdown
Member

Cap the function-hint popup to the editor width and keep the signature on a single scrollable line, so a long TS signature can no longer run off-screen underneath the central control bar. Clamp it into the editor area and raise its z-index above the CCB. Theme the surface to match the other LSP popups, use a monospace font, and highlight the active parameter clearly. When the signature overflows, scroll the active parameter into view and fade the clipped edge(s).

Stop the popup flickering on every caret move: cursorActivity no longer dismisses (hides) the popup before firing the async request. It now updates in place - skipping the redraw entirely when the same signature and active parameter are already shown, and keeping the popup anchored while only the highlight moves. A monotonic request id drops stale responses and prevents a late response from re-showing a dismissed popup.

abose added 2 commits June 25, 2026 19:43
Cap the function-hint popup to the editor width and keep the signature on a
single scrollable line, so a long TS signature can no longer run off-screen
underneath the central control bar. Clamp it into the editor area and raise its
z-index above the CCB. Theme the surface to match the other LSP popups, use a
monospace font, and highlight the active parameter clearly. When the signature
overflows, scroll the active parameter into view and fade the clipped edge(s).

Stop the popup flickering on every caret move: cursorActivity no longer
dismisses (hides) the popup before firing the async request. It now updates in
place - skipping the redraw entirely when the same signature and active
parameter are already shown, and keeping the popup anchored while only the
highlight moves. A monotonic request id drops stale responses and prevents a
late response from re-showing a dismissed popup.
…apping

The documentation popup was positioned once, when a hint was highlighted, from
the list's rect at that instant. The hint list keeps reflowing afterward - it
flips above/below near a screen edge, shifts as the caret moves, and moves on
scroll - so the popup drifted on top of the list and its position looked random.

Track the list's live position with a requestAnimationFrame loop while the popup
is visible, re-deriving placement from the list's current rect every frame: to
the right, flipping to the left when there's no room, clamped to stay on screen.
The css is only rewritten when the position actually changes, the loop stops on
hide/close, and it self-terminates if the hint menu is torn down.
@abose abose merged commit e7009c4 into main Jun 26, 2026
9 of 21 checks passed
@abose abose deleted the ai branch June 26, 2026 05:25
@sonarqubecloud

Copy link
Copy Markdown

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