Design system/Components
Page assistant
One pill in the page header opens every assistant, and the whole conversation lives in one window: a dialog sized to the conversation on desktop, and a full-height sheet on phones. One component for every page that has an assistant.
In codecomponents/assistant-panel/index.tsxcomponents/assistant-panel/composer.tsx
Sample
The assistant pill is a btn-ghost with an orange sparkle icon; while the assistant is busy, an orange dot sits on its corner.
Action planner
Summer campaign
Tell me what's coming up; I'll ask a few short questions and suggest actions.
Three stages
- Intro: a title, a short description, suggestion pills, and an input box.
- Conversation: bubbles, a typing indicator, questions the assistant asks with answer pills (or a date, person, or picker), and a compose box with attachments.
- Draft: an editable preview of what will be created, and a confirm button. Nothing is created until you confirm.
Honest about AI
If the flag, plan, or service key is missing, or the service doesn't respond, the assistant doesn't stop: it moves ahead with ready-made questions and plans, and its card says "Without AI." When the plan is what's in the way, an upgrade prompt appears above the conversation and the path without AI is still available.
Sizes
640px × 85vh.modal.assist-modal92vh.sheet-menu.assist-sheet30px · accent-soft<AssistantPanel
id="plan"
userId={session.id}
title={tr("برنامهریز اقدامها")}
intro={tr("بگو چه کاری در پیش است؛ چند سؤال کوتاه میپرسم و اقدامها را پیشنهاد میکنم.")}
/* ask → produce → confirm */
/>States and accessibility
7px · top 4px · inset-inline-end 6pxaria-hiddencolor: var(--accent)2px solid var(--accent) · offset 2px--accent on --accent-soft3.21 : 1 · 4.32 : 1- The window on desktop and the sheet on phones both have role="dialog", aria-modal="true", and an aria-label equal to the assistant's title.
- The chat body is aria-live="polite", so a new assistant message gets read; the typing indicator has the aria-label “Writing…”.
- Reply pills have aria-pressed, and the date pill has aria-haspopup="dialog" and aria-expanded.
- The busy dot is aria-hidden; being busy is also visible in the chat itself.
Do
An editable draft and one confirm button.
Don't
Creating something before the person confirms.
Do
When AI isn't available, a “No AI” card and a ready-made path.
Don't
An assistant that only returns errors.
Related pages