refactor: improve plan mode UX with composer-integrated toggle and guidance text

- Move plan mode toggle from pills row to composer send button area
- Plan toggle sits next to the send button as a mode switch icon
- Send button turns emerald when plan mode is active
- Add mode indicator strip below composer when plan mode is on
- Replace 'Implement this plan' auto-send button with instructional
  guidance text that tells the user to send a follow-up message
- Keep Dismiss button to clear the plan review banner

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-03-26 23:46:04 +01:00
co-authored by Copilot
parent 231be36e6c
commit b670680a7d
2 changed files with 63 additions and 73 deletions
@@ -1,22 +1,16 @@
import { useCallback } from 'react';
import { ClipboardList, Play, X } from 'lucide-react';
import { ClipboardList, X } from 'lucide-react';
import { MarkdownContent } from '@renderer/components/MarkdownContent';
import type { PendingPlanReviewRecord } from '@shared/domain/planReview';
export function PlanReviewBanner({
planReview,
onImplement,
onDismiss,
}: {
planReview: PendingPlanReviewRecord;
onImplement: (planReview: PendingPlanReviewRecord) => void;
onDismiss: (planReview: PendingPlanReviewRecord) => void;
}) {
const handleImplement = useCallback(() => {
onImplement(planReview);
}, [planReview, onImplement]);
const handleDismiss = useCallback(() => {
onDismiss(planReview);
}, [planReview, onDismiss]);
@@ -63,26 +57,14 @@ export function PlanReviewBanner({
<MarkdownContent content={planReview.planContent} />
</div>
)}
</div>
</div>
{/* Actions */}
<div className="mt-3 flex items-center gap-2">
<button
className="inline-flex items-center gap-1.5 rounded-lg bg-emerald-600 px-3.5 py-1.5 text-[12px] font-medium text-white transition hover:bg-emerald-500"
onClick={handleImplement}
type="button"
>
<Play className="size-3" />
Implement this plan
</button>
<button
className="rounded-lg border border-zinc-600 px-3.5 py-1.5 text-[12px] font-medium text-zinc-300 transition hover:border-zinc-500 hover:bg-zinc-800 hover:text-white"
onClick={handleDismiss}
type="button"
>
Dismiss
</button>
{/* Guidance */}
<p className="mt-3 text-[12px] leading-relaxed text-zinc-400">
Send a follow-up message to proceed e.g.{' '}
<span className="text-zinc-300">&quot;implement the plan&quot;</span>,{' '}
<span className="text-zinc-300">&quot;adjust step 3&quot;</span>, or ask for a different approach.
</p>
</div>
</div>
</div>
);