pi-mono/packages
Petr Houška 7f47a2ed09
feat(coding-agent): let ctx.ui.custom() overlays report blocked program status (#11851)
Closes #11816.

## Problem

`ctx.ui.custom()` accepted `blocked` only for inline components.
Overlays ignored it, so an extension question shown as an overlay left
pi reporting `working` over OSC 7501. Example: pi-ask-user in its
default overlay mode inside Herdr App never shows the session as blocked
and never notifies.

## Change

- Each overlay opened with `blocked` registers its own program status
source (`extension-overlay:N`) after `showOverlay()` and clears it when
the overlay calls `done()`.
- The status stays while the overlay is hidden with `setHidden()` or
covered by another overlay: the question is still unanswered.
- Separate sources per overlay, so closing one keeps other open
questions, dialogs and login prompts blocked. With several blocking
prompts, the most recently shown one supplies `kind` and `message`.
- Overlays without `blocked` (loaders etc.) register nothing and cannot
clear another overlay's status.
- `/reload` and session switches drop overlays without calling `done()`;
`resetExtensionUI()` now clears their blocked status so pi does not stay
blocked.
- Inline components are unchanged: they report the dialog shown in the
editor slot, so a non-blocking component shown in its place clears the
status until it closes.
- Docs (`docs/tui.md`, `custom()` JSDoc) and changelog updated.

## Testing

- `npm run check`
- `test/interactive-mode-extension-dialogs.test.ts`: new regression test
(two blocking overlays, one non-blocking overlay, hide, close in order)
and one for clearing the status on reset.

pi-ask-user still needs to pass `blocked` for its overlay prompts.
2026-11-05 23:23:58 +01:00
..
agent Anthropic message threads (#11545) 2026-11-03 14:07:57 +01:00
ai fix(ai,coding-agent): remove "(legacy)" marker from OpenAI Codex provider name 2026-11-05 22:51:36 +01:00
chord feat(p2): Chord v2 cleanup pass 2026-11-05 18:22:13 +00:00
codemode Add [Unreleased] section for next cycle 2026-11-02 11:38:21 +01:00
coding-agent feat(coding-agent): let ctx.ui.custom() overlays report blocked program status (#11851) 2026-11-05 23:23:58 +01:00
durable fix(durable): raise timeout of seeded SqliteStorage batch commit tests 2026-11-05 09:50:00 +01:00
env fix(env): kill what a process program left running when it exits 2026-11-03 14:17:21 +01:00
evals Release v1.5.0 2026-11-02 11:38:21 +01:00
mcp chore(licenses): rename dir (#11834) 2026-11-05 12:42:32 +01:00
schema fix(schema): num no longer takes nan and infinity 2026-11-05 14:20:32 +01:00
telemetry feat(chord): telemetry from pages and workers stored by the server, who a span was for 2026-11-04 11:59:14 +00:00
tui fix(tui): prevent cursor marker leaks (#9441) 2026-11-04 11:26:48 +01:00