diff --git a/.changeset/plan-prompt-full-width.md b/.changeset/plan-prompt-full-width.md new file mode 100644 index 0000000000..91639c0f10 --- /dev/null +++ b/.changeset/plan-prompt-full-width.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Make the task Plan prompt editor span the full task-detail card width. +category: fix +dev: Adds scoped TaskDetailModal Plan prompt width guards for modal, embedded, and mobile surfaces. diff --git a/packages/dashboard/app/components/SpecEditor.css b/packages/dashboard/app/components/SpecEditor.css index bb441575a5..e3af37515b 100644 --- a/packages/dashboard/app/components/SpecEditor.css +++ b/packages/dashboard/app/components/SpecEditor.css @@ -39,15 +39,25 @@ display: flex; align-items: center; justify-content: flex-end; + flex-wrap: wrap; gap: var(--space-sm); + width: 100%; + min-width: 0; + max-width: 100%; margin-top: var(--space-sm); } -/* Edit mode container in Definition tab */ +/* +FNXC:TaskDetailPlan 2026-06-30-00:00: +Inline Plan editing and AI revision controls share SpecEditor primitives, so these rows must shrink within task-detail modal and embedded cards instead of imposing a narrow or overflowing editor column. +*/ .spec-editor-edit-mode { display: flex; flex-direction: column; gap: var(--space-sm); + width: 100%; + min-width: 0; + max-width: 100%; } /* Content area - flexible and scrollable */ @@ -61,7 +71,10 @@ /* Textarea - fills available space in edit mode */ .spec-editor-textarea { + box-sizing: border-box; width: 100%; + min-width: 0; + max-width: 100%; min-height: 200px; height: 100%; flex: 1; @@ -121,6 +134,10 @@ /* AI Revision section - fixed at bottom */ .spec-editor-revision { + box-sizing: border-box; + width: 100%; + min-width: 0; + max-width: 100%; padding: 16px 0; border-top: 1px solid var(--border); flex-shrink: 0; @@ -140,7 +157,10 @@ } .spec-editor-feedback { + box-sizing: border-box; width: 100%; + min-width: 0; + max-width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); @@ -168,6 +188,11 @@ display: flex; align-items: center; justify-content: space-between; + flex-wrap: wrap; + gap: var(--space-sm); + width: 100%; + min-width: 0; + max-width: 100%; margin-top: var(--space-sm); } diff --git a/packages/dashboard/app/components/TaskDetailModal.css b/packages/dashboard/app/components/TaskDetailModal.css index 5b4abdb923..6e4f989eb1 100644 --- a/packages/dashboard/app/components/TaskDetailModal.css +++ b/packages/dashboard/app/components/TaskDetailModal.css @@ -2007,6 +2007,42 @@ The desktop table needs a token-scale min-width and non-anywhere model-name wrap margin-top: 0; } +/* +FNXC:TaskDetailPlan 2026-06-30-00:00: +The Plan prompt editor is a task-detail body surface, not a narrow prose inset. Scope full-width guards to the Plan prompt section so modal and embedded cards align markdown, empty fallback, inline edit, and AI revision controls without changing unrelated detail sections. +*/ +.detail-section--plan-prompt { + display: flex; + flex-direction: column; + width: 100%; + min-width: 0; + max-width: 100%; +} + +.detail-section--plan-prompt .markdown-body, +.detail-section--plan-prompt .detail-prompt, +.detail-section--plan-prompt .spec-loading, +.detail-section--plan-prompt .spec-editor-edit-mode, +.detail-section--plan-prompt .spec-editor-revision, +.detail-section--plan-prompt .spec-editor-textarea, +.detail-section--plan-prompt .spec-editor-feedback { + box-sizing: border-box; + width: 100%; + min-width: 0; + max-width: 100%; +} + +.detail-section--plan-prompt .markdown-body, +.detail-section--plan-prompt .detail-prompt { + overflow-wrap: anywhere; +} + +.task-detail-content--embedded .detail-section--plan-prompt { + width: 100%; + min-width: 0; + max-width: 100%; +} + /* Back button for changed-files modal - hidden on desktop */ .changed-files-back-button { display: none; @@ -2196,6 +2232,26 @@ The desktop table needs a token-scale min-width and non-anywhere model-name wrap flex: 1; min-height: 0; } + + .detail-section--plan-prompt .detail-spec-edit-trigger, + .detail-section--plan-prompt .spec-editor-actions-row, + .detail-section--plan-prompt .spec-editor-revision-actions { + align-items: stretch; + } + + .detail-section--plan-prompt .spec-editor-actions-row, + .detail-section--plan-prompt .spec-editor-revision-actions { + flex-wrap: wrap; + } + + .detail-section--plan-prompt .spec-editor-actions-row .btn, + .detail-section--plan-prompt .spec-editor-revision-actions .btn { + flex: 1 1 auto; + } + + .detail-section--plan-prompt .spec-editor-char-count { + flex: 1 1 auto; + } } .detail-section h4 { @@ -2222,7 +2278,7 @@ The desktop table needs a token-scale min-width and non-anywhere model-name wrap color: var(--text-muted); display: flex; align-items: center; - gap: 8px; + gap: var(--space-sm); } .spec-loading::before { diff --git a/packages/dashboard/app/components/TaskDetailModal.tsx b/packages/dashboard/app/components/TaskDetailModal.tsx index 17ca3802b4..119a34cc05 100644 --- a/packages/dashboard/app/components/TaskDetailModal.tsx +++ b/packages/dashboard/app/components/TaskDetailModal.tsx @@ -3923,13 +3923,16 @@ export function TaskDetailContent({
{t("taskDetail.progress.noSteps", "(no steps defined)")}
)} -
+
{!isEditingSpec && (
- {/* - FNXC:TaskDetailPlan 2026-06-30-00:00: - The Plan tab keeps the internal definition route for stable links, while exposing a direct PROMPT.md editor action so operators can comment on the executable task plan file without replacing the inline AI revision flow. - */} + {/** + * FNXC:TaskDetailPlan 2026-06-30-00:00: + * The Plan tab keeps the internal definition route for stable links, while exposing a direct PROMPT.md editor action so operators can comment on the executable task plan file without replacing the inline AI revision flow. + * + * FNXC:TaskDetailPlan 2026-06-30-00:00: + * The Plan prompt surfaces must span the task-detail card body in modal and embedded renderings. Keep the scoped wrapper around markdown, no-prompt fallback, inline edit, and AI revision controls so width fixes do not alter unrelated detail sections. + */} {fileBrowser && (