CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

fix(pulls+issues): first-PR dead ends die — forms keep your input, templates render, single-branch guidance #5547

MergedXSccantynz wants to mergefix/first-pr-dead-endsmainopened 6d ago
ccantynzcommented 6d ago

Queue item #1 from the flow audit — three findings with one shared root, the new-PR form:

  1. Forms no longer wipe what you typed. Every POST validation failure used to redirect to ?error= and land on a blank form — a one-word mistake cost the whole description. The form is now a shared renderer and every error path re-renders with the typed title, body, and branch selections preserved.
  2. Single-branch repos get guidance, not a broken form. branches.filter(b => b !== base) rendered an empty head dropdown that submitted into a cryptic error — a hard dead end on the fresh-repo → first-PR journey. Now: "a PR compares two branches, and this repository has only main" plus the exact commands, and a way back.
  3. PR and issue templates finally do something. loadPrTemplate/loadIssueTemplate were called and their results discarded for as long as the forms have existed — a team committing .github/PULL_REQUEST_TEMPLATE.md saw nothing, with no error. Both now prefill their body TextAreas (PR side only when the user hasn't typed their own body).

?error=/?head= on GET kept for old links. Pinned by first-pr-form-honesty.test.ts (5 tests). Typecheck clean; full local sweep of pull-matching suites green.

ccantynzAI Reviewcommented 6d ago

AI Triage

(no summary)

Priority: medium Risk area: mixed

Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)

Suggestions only — nothing has been applied. The PR author stays in control.

gluecron[bot]🤖 botAI Reviewcommented 6d ago

AI review unavailable

The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts