Skip to content

fix(pi): read pi's dialog when the footer rows are only faint - #726

Open
mithyer wants to merge 1 commit into
AltanS:mainfrom
mithyer:ray/fix/pi-dim-footer
Open

mithyer wants to merge 1 commit into
AltanS:mainfrom
mithyer:ray/fix/pi-dim-footer

Conversation

@mithyer

@mithyer mithyer commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

On pi's default theme, a dialog came back modal: unreadable on a read with colour, so a phone could not tap it. The same screen with the escape codes removed read fine (since #721), and so did pi's rgb themes (dark, light).

Cause. pi's default "system" theme (no theme in settings.json) paints with the terminal's 16 colours and draws the footer rows (working directory, usage, model) faint, SGR 2, with no colour at all. The footer reader (footerAt in web/src/lib/harness/pi/ask.ts, and paintedStatus in web/src/lib/harness/pi/composer.ts) asked each footer row for a foreground colour or a rule, so the footer was not found and the frame was refused. The comment above footerAt already says a footer row is "painted (dim or coloured)"; the check only counted the colour.

Change. A footer row that is faint now counts as painted, in those two places only. A dialog's own rows (the title, the top row, the notes) still need real colour, so a faint line of agent prose cannot open a dialog. A plain row straight under the frame (a shell prompt, output) is still refused.

Evidence

  • New live capture, pi--v150-herdr-system-theme-permission-gate--w119.txt: pi 1.5.0's example permission-gate.ts asking about chmod 777 gate-probe.txt, in a pane of a real Herdr 0.9.5 session, read through the bridge with colour (last 22 rows). On main it reads modal: "unreadable", blocks all raw; with this change it reads as an ask with Yes / No / Cancel. README row and surface-labels.json entry added; the model label was replaced with neutral text of the same length, nothing else changed.
  • All 1225 pane captures, each read with colour and again with the codes stripped (2450 reads): turn, modal, composer and block kinds are identical before and after the change. So no existing capture reads differently; the change only opens the screen it was written for.
  • Unit tests (pi/ask.test.ts): the capture lifts with its options, the walk and Escape; reads as an ask on the Surface; reads the same with no styling; the same footer with its codes removed is still not pi's; plain output straight under the frame ($ , alice@box:~/project$ , # , ❯ , prose) is still refused. Four of them fail on main and pass here; pi.test.ts counts one more lifted screen.

Base branch

  • Opened against main

Checks

  • bun run typecheck (root and web/), bun run lint pass.
  • cd web && bun run test: 596 files pass, 53735 tests.
  • bun test ./bridge ./cli ./scripts: this change touches web/ only. My run did not finish in 28 minutes (8930 passed, 108 failed before it was cut). I ran the 12 files that failed on their own with and without this change: the same 216 tests fail in both (durable control/action/answer/chat/sources, files view, mux conformance, launchers, folder browse), so they do not come from this change, but I did not find their cause here.
  • CHANGELOG: a fork PR is exempt, so I did not touch CHANGELOG.md or any version file. For the maintainer:
### Fixed

- **A pi dialog reads on pi's default theme.** That theme draws the footer rows faint with no colour, and the footer reader wanted a colour or a rule, so on a read with colour the dialog came back unreadable and could not be tapped. A faint footer row now counts as painted; a dialog's own rows still need colour. Thanks @mithyer (#726).

pi's default "system" theme paints the footer rows (working directory,
usage, model) with SGR 2 and no colour. The footer reader asked every
footer row for a colour or a rule, so on that theme a dialog came back
modal: unreadable on a read with colour, while the same screen with the
codes removed read fine. pi's rgb themes colour the footer and were never
affected.

Faint now counts as paint for the footer rows only (footerAt in ask.ts and
paintedStatus in composer.ts). A dialog's own rows (title, top row, notes)
still need real colour, and a plain row straight under the frame is still
refused.

Add a real capture of pi 1.5.0's permission-gate on a Herdr 0.9.5 pane in
the default theme, with its README row and surface label, and tests.
@github-actions github-actions Bot added area: web Phone PWA — UI, mirror, composer, service worker area: harness Per-agent adapters and send guards (claude/codex/pi/omp) bug Something isn't working labels Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: harness Per-agent adapters and send guards (claude/codex/pi/omp) area: web Phone PWA — UI, mirror, composer, service worker bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant