P1 exit: chat UI, sessions column, agent create — 11 E2E journeys green
- Stream layer: incremental SSE parser tested against bytes captured from
the REAL gateway (chunking-independent, UTF-8-safe, heartbeat-tolerant);
Zod gateway event schemas; pure transcript reducer (optimistic send,
delta streaming, step traces, resume dedupe, error states)
- Same-origin /api proxy route: httpOnly cookie -> bearer, unbuffered SSE
passthrough; NuqsAdapter in root layout
- Chat workspace: route /claws/{id}/chat/{key} (RSC history + settings),
WelcomeState with suggested prompts, MessageList (right user bubbles,
left agent messages, blink caret), collapsible StepTrace, Composer
(Enter sends, Shift+Enter newline)
- SessionsColumn in 208px SlidePanel (?sessions=1): search, relative
times, active coral border, new session; /claws/{id} resumes latest or
opens fresh; minimal create-claw form; rail + button and roster links
- P1 exit E2E: scripted reply streams, tool step trace survives reload,
separate transcripts across sessions with column switching, create claw
and chat immediately
83 Rust + 56 frontend unit/component tests + 11 Playwright journeys.
Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5
parent
32008c9ef0
commit
9f9f507c15
@@ -0,0 +1,42 @@
|
||||
import type { Agent } from "@/lib/api/schemas";
|
||||
import { Avatar } from "@/components/ui/Avatar";
|
||||
|
||||
const SUGGESTED_PROMPTS = [
|
||||
"Create a daily briefing",
|
||||
"Write a report",
|
||||
"Make a presentation",
|
||||
"What can you do?",
|
||||
];
|
||||
|
||||
/** Empty-session welcome (§5a). */
|
||||
export function WelcomeState({
|
||||
agent,
|
||||
onPick,
|
||||
}: {
|
||||
agent: Agent;
|
||||
onPick: (prompt: string) => void;
|
||||
}) {
|
||||
return (
|
||||
<div className="flex flex-1 flex-col items-center justify-center gap-3 px-4 motion-safe:animate-[fade-up_var(--duration-normal)_var(--ease-app)]">
|
||||
<Avatar name={agent.name} accent={agent.accent} size="lg" />
|
||||
<h2 className="text-center text-xl font-semibold tracking-tight">
|
||||
Hi, I'm {agent.name}. What can I help with?
|
||||
</h2>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{agent.job_title} · Shared with your team
|
||||
</p>
|
||||
<div className="flex max-w-md flex-wrap justify-center gap-2 pt-2">
|
||||
{SUGGESTED_PROMPTS.map((prompt) => (
|
||||
<button
|
||||
key={prompt}
|
||||
type="button"
|
||||
onClick={() => onPick(prompt)}
|
||||
className="rounded-(--radius-button) border border-border bg-subtle px-3 py-1.5 text-xs text-muted-foreground hover:border-accent hover:text-foreground"
|
||||
>
|
||||
{prompt}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user