Skip to content

feat: bottom-dock extension dialogs, declutter titles, unlock full extension UIs - #761

Draft
luckrnx09 wants to merge 2 commits into
agegr:mainfrom
luckrnx09:feat/dialog-ux
Draft

feat: bottom-dock extension dialogs, declutter titles, unlock full extension UIs#761
luckrnx09 wants to merge 2 commits into
agegr:mainfrom
luckrnx09:feat/dialog-ux

Conversation

@luckrnx09

Copy link
Copy Markdown
Contributor

What

Three interaction fixes for extension UI requests (select/confirm/input/editor + custom panels), reported in #679 and related pain points:

  1. Bottom-docked cards instead of centered modalsExtensionDialog and ExtensionCustomPanel now anchor above the composer. The chat stays scrollable while a request is open, so users can re-read context before answering (希望AskUserQuestion,可以换成非弹窗 #679).
  2. Multi-paragraph titles split into header + body — hosts/extensions that fold context into the title (previews, instructions, [header] prefixes) now render the first paragraph as the header and the rest as scrollable body text, instead of cramming everything into the title row.
  3. Attention sound debounced across chained dialogs — a select followed by an input (the "type your own answer" flow) is one interaction and now rings once, not twice.
  4. Advertise mode: "tui" to extensions — pi-web runs the agent in-process and its uiContext.custom() is fully implemented (terminal-rendered panel), but extensions were told "rpc", so extensions with rich TUI components (e.g. tabbed multi-question questionnaires with checkboxes) degraded to sequential select/input dialogs. The label now matches actual capabilities, unlocking their native UIs.

Verification

  • npm test (956 pass), eslint, tsc --noEmit clean
  • Source-assertion tests added for docking, sound debounce, and title splitting
  • Playwright geometry check: dialog bottom sits above the composer, chat scrolls while open
  • Real-extension end-to-end check with a questionnaire extension: full multi-select checkbox questionnaire renders and submits through the custom panel

Collapsed-pill behavior, keyboard navigation, draft preservation, and Esc semantics are unchanged (covered by existing e2e fixture).

- Render ExtensionDialog and ExtensionCustomPanel as bottom-docked cards
  above the composer instead of centered overlays, keeping the chat
  scrollable while a request is open (agegr#679)
- Split multi-paragraph request titles: first paragraph stays the
  header, the rest renders as body text instead of cramming previews
  and instructions into the title
- Debounce the attention sound across chained dialogs (select followed
  by an input) so one interaction rings once
…ustom UIs

Pi Web runs the agent in-process and its uiContext implements custom()
via the terminal-rendered panel, but extensions were told mode "rpc",
so extensions with rich TUI components (e.g. tabbed questionnaires)
degraded to sequential select/input dialogs. Advertise "tui" to unlock
their native components.
@luckrnx09 luckrnx09 closed this Sep 7, 2026
@luckrnx09

Copy link
Copy Markdown
Contributor Author

@agegr Adapt and extend in the web UI (especially custom terminal UI) is really tricky.

How about just using the custom UI from the Terminal? Although its interaction feels quite abrupt compared to web components, it would ensure that the extension's functionality matches TUI without introducing compatibility issues.

This PR is just my initial idea and hasn't been fully tested yet.
If you're interested, let me know what you think so I can decide whether to move forward with it or not.

@luckrnx09 luckrnx09 reopened this Sep 7, 2026
@luckrnx09
luckrnx09 marked this pull request as draft September 7, 2026 13:53
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