Files
airship/packages/overlay
Nayan 75d437b112 feat(overlay): grey out the git verbs, with the reason on hover
Commit, Commit & push and Create pull request were offered whatever the state
of git, so the first thing a user in a broken repository learned was a toast
after the click. The daemon now reports git health on connect and after every
turn, and the turn menu greys them with the reason attached.

Greyed rather than hidden: a Commit that is simply missing reads as a bug in
the editor, and one that fails after the click has already cost the click.

Two gates, because the two failures are unrelated. Revert rewrites files from
the before-state the turn captured and needs no git at all, so it is greyed
only when this turn has files whose baseline was never captured — a fact the
bundle already carries on `noBaseline`. Commit and Create pull request need
git, equally for every turn.

`git:health` is sent beside the handshake and before `job:done`, not after: that
event is what paints the finished turn, and the menu captures the health it was
rendered with. An absent report reads as healthy, so an older daemon that never
sends one keeps its buttons.

A disabled row that carries a reason had to become hoverable to show it.
Browsers dispatch no pointer events from a disabled form control, and `Tooltips`
matches on `pointerover`, so `data-tip` on one is never read. The greying comes
from `[aria-disabled="true"]` in pop.css.ts rather than from `:disabled`, which
is what makes dropping the attribute free; `tabindex="-1"` keeps the row out of
the tab order the attribute used to hold it out of, and the reason rides the
accessible name too, since `aria-disabled` alone announces that a row is
unavailable and never why. Rows with no reason to give are unchanged.

The tooltip carries the reason and not the hint. `GitStatus.hint` is a command
to run, sized for a terminal, and a tip clamps at three lines — the banner and
`airship doctor` are where the fix gets spelled out. Every reason is inside the
44-character budget tooltip.copy.test.ts enforces, which is why `GitStatus`
carries no path and the banner adds the directory itself.
2026-08-16 13:05:37 +05:30
..