Skip to content

fix(setup): fold TUI requests with Pi-native expansion (#654) - #659

Merged
tt-a1i merged 3 commits into
mainfrom
pi/fix-654-1-wf_deb89288f46f-6-9bd9ee
Oct 4, 2026
Merged

tt-a1i merged 3 commits into
mainfrom
pi/fix-654-1-wf_deb89288f46f-6-9bd9ee

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Related #654. Setup requests currently expose the full internal configuration prompt by default in the TUI, obscuring the user's original command and request.

This PR implements the scoped presentation fix, but does not claim all issue acceptance criteria are complete. Outstanding gaps are listed below; this is intentionally not a closing reference.

Value

Keep setup interactions readable while preserving access to the complete execution prompt, the model's context, and the authoritative Session facts. No configuration or permission changes are required to gain the improved presentation.

Approach

  • Merge current main (94f6dfb2) into the PR branch without conflicts; preserve setup presentation and execution semantics.

  • Register a Pi-native renderer only for openpi-setup-request. The collapsed view shows [OpenPi] <actual command> and the original request, including the compatibility alias, with natural wrapping and terminal-control sanitization confined to display.

  • Let Pi own expansion (app.tools.expand, default Ctrl+O). Expanded requests and legacy/invalid metadata fall back to native full-content rendering. No separate toggle or click mechanism is introduced where the supported host has no disclosure-click API.

  • Preserve content, metadata, receipts, writer authority, and lifecycle. Web retains its existing projection; persistence, real RPC get_messages JSONL, and HTML exported entry payloads are checked against the full runtime content.

  • Make integration Session storage and cleanup explicitly test-owned. Document the presentation boundary in SETUP.md.

Scope: five files, two commits; fixed implementation base c7862b852d866123e2b32c79d309bd49a3cf515f, final HEAD 578071c4baa9348fb73c595321293cea913ec104. No source edits were made during PR preparation.

Validation

Current follow-up head: b8dce62e.

  • Follow-up after updating main: bun run check passed (8.08 s); setup unit tests passed 41/41 (1.46 s). Full platform validation runs through the new CI suite. Required human approval remains separate from CI.

Earlier implementation evidence (retained for provenance):

Implementation evidence at the exact final HEAD (from the supplied receipt and retained local logs; these commands were not rerun during PR preparation):

  • node --test --experimental-strip-types tests/extensions/setup/index.test.ts tests/extensions/setup/integration.test.ts tests/extensions/setup/package-contract.test.ts tests/web/prompt-navigation.test.ts: 52/52 passed.
  • bun run typecheck: passed.
  • bun run check: passed in a frozen source mirror outside a .git ancestor. In the assigned worktree it fails at lint with nine unused-suppression warnings in unchanged Web files. The same warnings reproduce at the exact fixed base inside a .git ancestor; the fixed-base mirror outside .git passes. This is not a claim that the worktree gate is green.
  • bun run test: failed — 2,137 Node tests, 2,125 passed, four failed, eight skipped. Setup integration passed. The four failures reproduce at the exact fixed base using node --test --experimental-strip-types tests/extensions/goal/goal-surface.integration.test.ts tests/extensions/plan-mode/result-rendering.test.ts (25/29 passed): two Goal surface RPC/Web fixture assertions and two rich/extreme-width plan-rendering hyperlink assertions. The runner stopped before Vitest/UI.
  • PR preparation: scoped diff inspected; git diff --check passed. Current published main has advanced beyond the fixed base; its merge base with this branch remains the exact fixed base, and the PR comparison contains only the same five scoped files. Validation above does not establish results against the newer base tip.

Explicit gaps / not run:

  • Real interactive Pi TUI smoke: collapsed two-line display, Ctrl+O expansion/collapse, history restoration/reload, and failure/cancellation readability. Installed-host behavior (including the host version reported in the issue) has not been smoke-tested; implementation boundary inspection used the supported Pi dependency 0.99.1.
  • No actual click interaction or live Web/browser smoke. HTML assertions verify exported content, not browser-rendered appearance. No evidenced broader audit of other commands is claimed.
  • Full repository test gate remains red with the four fixed-base failures above; Vitest/UI was not separately run.
  • CI was not run in the implementation receipt. After publication, gh pr checks 659 --repo openpi-dev/openpi reported all 14 checks pending (queued/in progress; exit 8), with no completed results at observation. CI run. Published branch and PR HEAD both match 578071c4baa9348fb73c595321293cea913ec104; pending checks are not passes.

Raw local evidence and private Session/configuration data are not published. No merge or live installation/update was performed.

Impact

  • User-visible behavior: setup request summaries replace the default multi-screen internal prompt in the TUI; native expansion reveals the full prompt. Existing Web presentation is unchanged.
  • Model-visible context/tools: none; complete prompt and existing tool boundaries remain unchanged.
  • Runtime/lifecycle: no production lifecycle change; Pi owns disclosure state and setup writer gating remains intact. Integration fixtures now explicitly own persisted Session storage and verify cleanup.
  • Persisted config/data: no schema, migration, configuration-write, or canonical Session-content changes.
  • Compatibility/risk: legacy or invalid metadata uses native rendering; RPC/JSON and HTML retain full content. Host-native keyboard expansion is used rather than assuming a click API. Manual TUI and CI evidence remain outstanding, and the full baseline gate is red as described above.

@github-actions github-actions Bot added documentation Improvements or additions to documentation area:setup OpenPI setup, configuration, or setup documentation labels Oct 4, 2026
@tt-a1i
tt-a1i merged commit f54f2e3 into main Oct 4, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:setup OpenPI setup, configuration, or setup documentation documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant