mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-30 06:27:13 +02:00
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:
@@ -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">"implement the plan"</span>,{' '}
|
||||
<span className="text-zinc-300">"adjust step 3"</span>, or ask for a different approach.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user