fix(ui): a cut status line shows its whole text on hover - #332
Merged
Merged
Conversation
A failed safe-mode commit read "Commit failed…" in a narrow window with no way to see why. The main status text had a ToolTip.Tip bound to the full message since the bar was built, but a TextBlock with no Background is not hit-testable in Avalonia: every point over the text reached the status bar behind it, so the tooltip never opened. The segment tooltips beside it (read-only reason, In transaction, staged changes) opened only over an icon, and the Activity, Database Overview and Security windows' status lines had no tooltip and no ellipsis at all. A server error's DETAIL arrives after a newline, so the bar also grew a second line, each cut on its own. TextBlock.statusMessage is the one mechanism: a single line (MaxLines=1) cut with an ellipsis, a transparent background, and the whole text as its tooltip only while it is cut (Converters/CutTextTip). Status-bar segments get a transparent background too. No new control. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shman4ik
force-pushed
the
fix/status-line-full-text
branch
from
October 1, 2026 07:58
03ae69b to
57f109c
Compare
Shman4ik
added this pull request to stack #335
October 1, 2026 07:58
7 of 9 tasks
Shman4ik
added a commit
that referenced
this pull request
Oct 1, 2026
…#337) * fix(ui): every tooltip answers the pointer, through one class handler A TextBlock or panel with no background is not hit-testable, glyphs included, so a tooltip on one never opens: the pointer reaches the list item, card or column header behind it. #332 patched the status bar with two transparent backgrounds. A walk of every scenario window found the same defect in about 50 more places: history and saved-query rows, connection endpoints, the Activity and Slow Queries query text, Database Overview's cache-hit tiles, the Security window's "connected as", raw filter chips, the schema tree's column types, and every results-grid column header. Nimbus.Ui.Controls.ToolTipHitTesting (installed from App.Initialize) gives any panel, text block, border, presenter or templated control that gets a tooltip a transparent background as a current value. A background the markup or a style sets still wins, and one that goes back to null is filled again. Renders of every scenario are byte-identical before and after, except the windows whose tab animation differs between any two renders. TextBlock.statusMessage and CutTextTip move to nimbusUi too (DESIGN.md rule 21), and the per-site backgrounds from #332 go, so the handler is the only mechanism. TooltipReachTests walks every window in Scenarios.All and hit-tests each tooltip-bearing element's text (203 failures without the handler), hovers a history row for real, and pins the handler's priority. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(nimbusUi): both apps are on Avalonia 12.1.3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(ui): the tooltip walk skips points a clipping ancestor hides kubeNimbus's wide and narrow grids put probe points inside the window but outside a scroll viewport, which read as dead tooltips. Same probe in both apps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <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.
What and why
Release-checklist finding 3 for 1.0.1. In a narrow window, a failed safe-mode commit showed only "Commit failed…", and the reason could not be read.
Cause, confirmed: the main status text has had
ToolTip.Tipbound to the full message since the status bar was built, but the tooltip never opened. ATextBlockwith noBackgroundis not hit-testable in Avalonia. A headless scan found 0 of 4,536 points over the status text reaching theTextBlock; every one reached thestatusBarborder behind it.Reproducing it live in the AOT build turned up a second cause: the server's error carries
DETAIL:after a newline, so the status grew to two lines, each cut on its own ("Commit failed — no staged…", "DETAIL: Detail redacted…").The same hit-test defect affected two more places:
Fix, one mechanism, no new control (UI rule 1):
TextBlock.statusMessageinStyles/Theme.axaml. It is a single line (MaxLines=1), cut with an ellipsis, with a transparent background so it can be hovered. Its tooltip shows the whole text, every line of it, only while something is cut or left out:Converters/CutTextTipchecks the block'sTextLayout. The style is used by:Border.statusBar StackPanelalso gets a transparent background, so the segment tooltips open over their text.The Slow Queries status line keeps its wrapping: it is a paragraph of caveats (hidden statements, evictions) meant to be read, not a one-line status.
Visible to users (release notes)
A status line stays one line, and hovering it shows the whole message, including a server error's DETAIL. This applies to the main window and the Activity, Database Overview and Security windows. The tooltips on the status bar's "read-only", "In transaction" and staged-changes segments now open over their text.
Verified
dotnet build: 0 warnings, 0 errors.Core tests against a live Postgres 17: 2039 total, 0 failed, 17 skipped. App tests: 736 total, 0 failed (the 14 tests gated on PGNIMBUS_TEST_CONN skipped in this final run; the live run before the one-line change passed 735 of 735).
StatusLineTestsmoves the real pointer over each status line and segment. All 5 tests failed before the fix and pass now:The only shortcut: the tooltip's 400 ms show delay is a dispatcher timer that the headless clock never advances, so the test sets the delay to 0. The hit test, pointer-over state and tooltip service are the real path, and the failures before the fix came from the hit test, not the delay.
Live, in a NativeAOT win-x64 build (all four 1.0.1 fixes merged locally) against a local Postgres: a unique-violation commit failure in safe mode, narrow window, hover. The tooltip shows the whole message including DETAIL. (That run predates
MaxLines=1; the one-line folding is covered by the headless test.)Screenshots: the transparent background draws nothing, and the scenarios' status lines fit, so no published image changes.
update-published.shwas not run.Checklist
TextBlockor panel is not hit-testable.shared/nimbusUi: not done, on purpose, for a patch release.statusMessageandCutTextTipdescribe no Postgres concept, so they are candidates for nimbusUi. kubeNimbus's status bar probably has the same dead tooltip. Moving them means a subtree push and a paired kubeNimbus PR, so that is left as a follow-up.PgNimbus.Coreuntouched.Follow-up spotted, not fixed here: about 25 more tooltip-bearing
TextBlocks and panels have no background (history rows, schema tree details, the staged-conflict dialog, the Slow Queries headers). They are probably dead the same way.🤖 Generated with Claude Code