Skip to content

fix(ask-user): allow controls in full-size answer drafts - #578

Open
ooiuuii wants to merge 1 commit into
openpi-dev:mainfrom
ooiuuii:fix/ask-user-full-draft-controls
Open

ooiuuii wants to merge 1 commit into
openpi-dev:mainfrom
ooiuuii:fix/ask-user-full-draft-controls

Conversation

@ooiuuii

@ooiuuii ooiuuii commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Problem

Fixes #577.

At the legal 8,000-byte answer limit, ask_user rejects Enter and Backspace as if their raw control bytes were new inserted text. A valid full draft cannot reach review or be shortened.

Value

Keep valid maximum-size answers editable and submittable without weakening the input budget or confirmation flow.

Approach

Use the outer range check only to bound input allocation. Let the existing prospectiveAnswerDraftFits path distinguish inserted text from editor commands. Keep the post-editor byte check and all existing limits.

This does not implement #499's overlay reopen, draft lifecycle or unanswered-review work; that claimed scope stays separate.

Validation

  • Registered ask_user + actual native Pi Editor: exact-size paste followed by Enter; full draft followed by Backspace and replacement text.
  • Unchanged production 2/2 fail; fixed affected ask-user / terminal-text group 30/30 pass.
  • Existing oversized/fragmented paste, over-limit text, sanitization, RPC and review behavior remain covered.
  • bun run check, git diff --check, one scoped read-only review — pass/no actionable findings.
  • No private UI/model state. Full local suite not claimed green because the host has separately reproduced baseline timeouts and Windows background cleanup hangs; fresh branch CI provides broader validation.

Impact

  • User-visible: Enter and Backspace work on an already legal full draft.
  • Model-visible/schema: unchanged 1–3 question and parent-only contract.
  • Runtime/lifecycle/persisted config: unchanged; no cross-call draft storage.
  • Compatibility/risk: byte cap, review-before-submit, dismissal semantics and oversized-input rejection remain unchanged.

@ooiuuii

ooiuuii commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

CI readback for d24b5c626f0387f593aa315118914ec6ae2d1876: Node 22/24/26 pass. The Web lane fails only the mobile viewport test waiting for Workspace options at tests/web/openpi-web.e2e.ts:394 (30-second timeout; 33 cases pass).

This same test/line/locator failure is present on the current base f6b49ae: main job, this PR's job. This PR changes only the existing TUI answer-draft input gate and its tests; it does not alter the Web workspace menu.

I have kept that separate baseline issue out of scope. A maintainer rerun of the failed Web lane would be helpful; I do not have upstream rerun permissions and have not pushed a no-op commit.

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.

bug(ask-user): full-size answer drafts block editor control keys

1 participant