Skip to content

fix(ui): a cut status line shows its whole text on hover - #332

Merged
Shman4ik merged 1 commit into
fix/imported-plan-tab-namefrom
fix/status-line-full-text
Oct 1, 2026
Merged

Shman4ik merged 1 commit into
fix/imported-plan-tab-namefrom
fix/status-line-full-text

Conversation

@Shman4ik

@Shman4ik Shman4ik commented Oct 1, 2026

Copy link
Copy Markdown
Owner

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.Tip bound to the full message since the status bar was built, but the tooltip never opened. A TextBlock with no Background is not hit-testable in Avalonia. A headless scan found 0 of 4,536 points over the status text reaching the TextBlock; every one reached the statusBar border 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:

  • The bar's segment tooltips (why results are read-only, what "In transaction" means, what is staged) opened only when the pointer was exactly over an icon.
  • The Activity, Database Overview and Security windows' status lines had no tooltip and no ellipsis at all.

Fix, one mechanism, no new control (UI rule 1): TextBlock.statusMessage in Styles/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/CutTextTip checks the block's TextLayout. The style is used by:

  • the main status message and the cap warning;
  • the Activity, Database Overview and Security windows' status lines.

Border.statusBar StackPanel also 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).

  • StatusLineTests moves the real pointer over each status line and segment. All 5 tests failed before the fix and pass now:

    • a cut message shows its text on hover;
    • a two-line message stays one line and shows both lines on hover;
    • a message that fits has no tooltip;
    • every status-bar segment that has a tooltip receives the pointer over its text;
    • the three windows' status lines are cut and show their text on hover.

    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.sh was not run.

Checklist

  • CLAUDE.md updated (UI rule 6), including the landmine: a background-less TextBlock or panel is not hit-testable.
  • Anything general enough for kubeNimbus went into shared/nimbusUi: not done, on purpose, for a patch release. statusMessage and CutTextTip describe 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.Core untouched.

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

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
Shman4ik force-pushed the fix/status-line-full-text branch from 03ae69b to 57f109c Compare October 1, 2026 07:58
@Shman4ik
Shman4ik changed the base branch from main to fix/imported-plan-tab-name October 1, 2026 07:58
@Shman4ik
Shman4ik added this pull request to stack #335 October 1, 2026 07:58
@Shman4ik
Shman4ik merged commit e6bd579 into main Oct 1, 2026
2 checks passed
@Shman4ik
Shman4ik deleted the fix/status-line-full-text branch October 1, 2026 08:04
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>
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