Skip to content

[Bug]: Pi extension editor dialog displays prefill as read-only text and cannot accept an edited value #16101

Description

@nethbotheju

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Start T3 Code Nightly with the Pi provider.
  2. Load a Pi extension that intercepts git commits and asks the user to review/edit the proposed commit message using:
const edited = await ctx.ui.editor(
  "Commit message (edit, then submit):",
  proposedCommitMessage
);
  1. Ask the agent to commit changes, triggering the extension's editor dialog.
  2. Try to edit the proposed message and submit a non-empty value.

The dialog appears, but the proposed message is displayed under "Current value" rather than inside an editable field. I cannot enter an edited message through the bottom composer, the only available option is "Submit empty value".

Expected behavior

The editor request should open an editable text field prefilled with the proposed commit message. I should be able to keep or edit that message and submit the resulting text back to the Pi extension.

Actual behavior

The proposed message appears as read-only "Current value" text. The question card offers "Submit empty value", and I cannot enter and submit a replacement message through the composer.

Submitting the empty value causes my extension to reject the commit because it intentionally blocks blank messages. This prevents completing the commit approval workflow.

Impact

Blocks work completely

Version or commit

0.0.46-nightly.20261005.2676 (7812230)

Environment

macOS 15.7.3 (24G419), Apple Silicon / arm64
T3 Code Nightly desktop application
Provider: Pi
Pi CLI version: 1.0.3
Custom git-gate extension using ctx.ui.editor(title, prefill)

Screenshots, recordings, or supporting files

Screenshot 2026-10-05 at 20.53.06.png

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 5, 2026
  2. juliusmarminge commented on Oct 5, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Triage

    Thanks for the detailed report and the screenshot! I reproduced this on current main and on nightly 0.0.46-nightly.20261005.2676 (78122305).

    What I found

    • This comes from the Pi adapter, not the desktop shell; desktop is just rendering the shared composer.
    • ctx.ui.editor is converted into a normal user-input question in piQuestion (apps/server/src/orchestration-v2/Adapters/PiAdapterV2.ts). The user-input contract has no prefill field, so the adapter appends the prefill as read-only question text (Current value: plus the first 2,000 characters).
    • Both input and editor get a single option, Submit empty value, which sends "". Pressing 1 does the same, since a single-select option auto-submits. That's why your extension rejects the commit.
    • The composer under the card is a custom answer field, not an editor for the prefill. It starts empty, nothing seeds it with the proposed message, and Submit answer stays disabled until it's non-empty.
    • docs/user/providers-pi.md says blocking editor dialogs work, which doesn't hold for a prefilled editor.

    Workaround for now: copy the text under Current value (without the label) into the composer, edit it, and use Submit answer rather than Submit empty value. Two limits: the card truncates the prefill at 2,000 characters, and the custom answer is trimmed, so leading or trailing whitespace is dropped.

    Likely fix area

    One option is for editor requests to open an editable field prefilled with the proposed value and submit that text as extension_ui_response.value, which would need a prefill field in the user-input contract or a Pi-specific path. The empty-string option could stay for a deliberate blank submit without being the only control.

    A maintainer will decide on the fix direction.

  3. added
    via-triageFiled through npx t3 triage
    and removed
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions