Skip to content

Show issue_write MCP App form for labels/assignees/milestone/type#2767

Merged
mattdholloway merged 1 commit into
mainfrom
fix-issue-write-ui-form-gating
Jun 25, 2026
Merged

Show issue_write MCP App form for labels/assignees/milestone/type#2767
mattdholloway merged 1 commit into
mainfrom
fix-issue-write-ui-form-gating

Conversation

@mattdholloway

Copy link
Copy Markdown
Contributor

Problem

The issue_write tool decides whether to render the MCP App form or execute directly via the issueWriteFormParams allow-list: a call carrying any parameter outside that set bypasses the form (so the model-supplied values aren't silently dropped on form re-submit).

But the issue-write MCP App form actually prefills from toolInput and re-submits labels, assignees, milestone, and type (ui/src/apps/issue-write/App.tsx lines 874–957, 1012–1023). Those four were missing from issueWriteFormParams, so passing any of them made issueWriteHasNonFormParams return true and skipped the confirmation form — precisely in the cases where the form is most useful. This left the gating logic out of sync with what the UI supports (issue_fields, which the form handles identically, was already in the allow-list — the asymmetry confirms the list was simply stale).

The PR forms (create_pull_request, update_pull_request) were already aligned, so no gating change there.

Fix

  • Add labels, assignees, milestone, type to issueWriteFormParams. The allow-list now covers every input-schema property, so issueWriteHasNonFormParams becomes a forward-compatibility safety net (trips only for a future schema property not yet wired into the form).
  • Correct the now-inaccurate show_ui guidance on both issue_write and create_pull_request. Both descriptions claimed the form "does not collect" fields it actually collects (labels/assignees/milestone/type/issue_fields for issues; reviewers for PRs). The PR gating was already correct — only its description text was misleading.
  • Update the stale issueWriteHasNonFormParams comment and the Test_issueWriteSchemaClassification knownNonForm allow-list.

Tests / generated files

  • Updated Test_issueWriteHasNonFormParams, Test_issueWriteSchemaClassification, and the Test_IssueWrite_MCPAppsFeature_UIGate labels subtest (labels now routes through the form).
  • Regenerated toolsnaps (issue_write, create_pull_request) and docs (feature-flags.md, insiders-features.md). README is unchanged because show_ui is stripped from the non-UI schema it renders.
  • script/lint clean, script/test (race) passing.

No behavior change for non-UI clients or for the PR tools' execution paths.

The issue_write form-gating logic uses issueWriteFormParams to decide whether
to render the MCP App form or execute directly: a call carrying any parameter
outside that allowlist bypasses the form. The form prefills and re-submits
labels, assignees, milestone and type, but those four were absent from the
allowlist, so passing any of them skipped the confirmation form even though the
form fully supports them.

Add labels, assignees, milestone and type to issueWriteFormParams so the form
is shown when they are present. The allowlist now covers every input-schema
property, leaving issueWriteHasNonFormParams as a forward-compatibility safety
net for properties added without form support.

Also correct the now-inaccurate show_ui guidance on issue_write and
create_pull_request: both descriptions claimed the form "does not collect"
fields it actually collects (labels/assignees/milestone/type/issue_fields, and
reviewers respectively).

Update unit tests and regenerate toolsnaps and docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattdholloway mattdholloway requested a review from a team as a code owner June 25, 2026 09:57
Copilot AI review requested due to automatic review settings June 25, 2026 09:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request aligns the issue_write MCP App UI gating logic with what the issue-write UI form actually supports, ensuring the confirmation form is shown (and prefills/resubmits correctly) when callers provide labels/assignees/milestone/type. It also updates show_ui guidance text for both issue_write and create_pull_request to remove now-misleading “form does not collect …” examples.

Changes:

  • Expand issueWriteFormParams to include labels, assignees, milestone, and type, so those inputs no longer force bypassing the MCP App form.
  • Update show_ui descriptions for issue_write and create_pull_request to reflect current UI form capabilities.
  • Update tests, toolsnaps, and generated docs to match the new gating behavior and updated descriptions.
Show a summary per file
File Description
pkg/github/pullrequests.go Updates create_pull_request show_ui description to remove misleading “form does not collect reviewers” guidance.
pkg/github/issues.go Adds labels/assignees/milestone/type to the UI allow-list and updates issue_write show_ui description + gating commentary.
pkg/github/issues_test.go Adjusts UI-gating tests and schema-classification guardrails for the expanded form parameter set.
pkg/github/toolsnaps/issue_write.snap Regenerated snapshot reflecting the updated show_ui description.
pkg/github/toolsnaps/create_pull_request.snap Regenerated snapshot reflecting the updated show_ui description.
docs/insiders-features.md Regenerated docs reflecting updated show_ui descriptions.
docs/feature-flags.md Regenerated docs reflecting updated show_ui descriptions.

Copilot's findings

  • Files reviewed: 7/7 changed files
  • Comments generated: 0

@mattdholloway mattdholloway merged commit 3c4749d into main Jun 25, 2026
20 checks passed
@mattdholloway mattdholloway deleted the fix-issue-write-ui-form-gating branch June 25, 2026 13:07
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.

4 participants