FN-7181: improve PR metadata generation feedback

Ground PR metadata generation in repository evidence and make Create PR loading states explicit.

- Upgrade the PR metadata system/context prompt while preserving configurable title and description guidance.\n- Show disabled title/body skeleton states while AI metadata generates and block submission until content resolves.\n- Extend dashboard tests, docs, and changeset coverage for the improved PR prompt and loading behavior.\n\nFiles changed:\n .../fn-7181-pr-generation-prompt-and-loading.md    |  7 +++\n docs/dashboard-guide.md                            |  2 +-\n .../dashboard/app/components/PrCreateModal.css     | 62 ++++++++++++++++++++++\n .../dashboard/app/components/PrCreateModal.tsx     | 47 +++++++++++++---\n .../components/__tests__/PrCreateModal.test.tsx    | 60 ++++++++++++++++-----\n .../src/__tests__/pr-metadata-generator.test.ts    | 44 ++++++++++++---\n packages/dashboard/src/pr-metadata-generator.ts    | 33 +++++++++---\n 7 files changed, 221 insertions(+), 34 deletions(-)

Fusion-Task-Id: FN-7181

Fusion-Task-Lineage: 6565ddce-c205-4050-a37f-ffbb2f2d46d4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
gsxdsm
2026-06-28 01:17:22 -07:00
parent 3a52c7a7cd
commit 65abae26c6
7 changed files with 221 additions and 34 deletions

View File

@@ -1004,7 +1004,7 @@ Inspect task definition, logs, review feedback, comments, artifacts, workflow ou
- The **Create Pull Request** modal is a floating pop-out like Plan Mission, New Task, and Automations: drag its header or resize from desktop edges/corners, while mobile keeps the full-screen dialog layout. Close it with **X**, **Cancel**, or **Escape**; stray clicks inside or outside the floating shell do not dismiss it.
- The modal shell renders immediately: preflight checks and PR options load independently of AI-generated title/body metadata, so slow AI suggestions no longer block base-branch selection, diagnostics, or manual PR authoring. The **Diff & commit preview** section starts collapsed and can be expanded on demand.
- The **Body** section includes a **Preview/Edit** toggle so authors can review the rendered markdown description before creating the PR without changing the submitted raw body text.
- AI title/body generation in the dialog is bounded to 15 seconds and is canceled if the request disconnects; on timeout/cancel, Fusion falls back to deterministic task-based PR title/body content instead of leaving the spinner stuck forever.
- AI title/body generation is bounded to 60 seconds on the server and 15 seconds in the dialog, and is canceled if the request disconnects; while it runs, the title and body fields show a skeleton loading state and are temporarily disabled, then resolve into generated content or deterministic task-based fallback content on timeout/cancel.
- Project Settings → Project Models includes optional **PR title prompt guidance** and **PR description prompt guidance** fields. Blank fields preserve the default Create PR metadata prompt; populated fields append guidance for the generated title or body sections.
- The **Artifacts** tab combines task documents written by agents or users with task-scoped registered media artifacts. The gallery uses thumbnail-first image/video cards, image and video previews can expand into a dismissible full-size lightbox, video and audio use native controls, document artifacts show text previews, and generic artifacts open through their media URL.
- The **Review** tab is separate from **Comments**: Review shows actionable PR/reviewer feedback and same-task revision controls, while Comments remains the general collaboration thread.