Skip to content

Open-source SEO, GEO, and marketing skills for AI agents.

feat(notfair-cmo): apply Apple-flavored design system to entire app

Yuting Zhong6e6ce9532c69
diff --git a/notfair-cmo/src/app/(app)/[project]/activity/page.tsx b/notfair-cmo/src/app/(app)/[project]/activity/page.tsx
index 89acbfe5..e614c1c9 100644
--- a/notfair-cmo/src/app/(app)/[project]/activity/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/activity/page.tsx
@@ -1,6 +1,4 @@
import { notFound } from "next/navigation";
-import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
-import { Badge } from "@/components/ui/badge";
import { getProject } from "@/server/db/projects";
import { listAgentActions } from "@/server/db/agent-actions";
@@ -23,58 +21,54 @@ export default async function ActivityPage({
const actions = listAgentActions(project.slug, 200);
return (
- <div className="mx-auto max-w-4xl space-y-6">
- <header>
- <h1 className="text-2xl font-semibold tracking-tight">Activity</h1>
- <p className="text-sm text-muted-foreground">
- Workspace <span className="font-mono">{project.slug}</span> · {actions.length} actions ·
- append-only audit log
- </p>
+ <div className="ns-app-wide" style={{ maxWidth: 900 }}>
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">Activity</h1>
+ <p className="ns-page-sub">
+ <b>{actions.length}</b> {actions.length === 1 ? "action" : "actions"}
+ {" "}· append-only audit log of every autonomous decision and
+ scheduled run.
+ </p>
+ </div>
</header>
{actions.length === 0 ? (
- <Card>
- <CardContent className="space-y-2 py-12 text-center text-sm">
- <h2 className="text-base font-medium">No activity yet.</h2>
- <p className="text-muted-foreground">
- Every autonomous decision and scheduled job lands here for auditing.
- When you provision agents or schedule crons, the events show up.
- </p>
- </CardContent>
- </Card>
+ <div className="ns-empty">
+ <p className="ns-empty-title">No activity yet.</p>
+ <p className="ns-empty-sub">
+ Every autonomous decision and scheduled job lands here for auditing.
+ When you provision agents or schedule crons, the events show up.
+ </p>
+ </div>
) : (
- <Card>
- <CardContent className="p-0">
- <ul className="divide-y">
- {actions.map((a) => (
- <li key={a.id} className="space-y-1 px-4 py-3 text-sm">
- <div className="flex items-baseline gap-2">
- <Badge variant="outline" className="font-mono text-[10px]">
- {a.action_type}
- </Badge>
- <span className="font-mono text-xs text-muted-foreground">
- {a.agent_id}
- </span>
- <span className="ml-auto text-xs text-muted-foreground tabular-nums">
- {timeAgo(a.occurred_at)} · {new Date(a.occurred_at).toLocaleString()}
- </span>
- </div>
- <p className="leading-snug">{a.summary}</p>
- {a.reasoning && (
- <p className="rounded-md bg-muted/40 px-2.5 py-1.5 text-xs text-muted-foreground whitespace-pre-wrap">
- {a.reasoning}
- </p>
- )}
- </li>
- ))}
- </ul>
- </CardContent>
- </Card>
+ <ol className="ns-group">
+ {actions.map((a) => (
+ <li key={a.id} className="ns-row flex-col items-start gap-2">
+ <div className="flex w-full flex-wrap items-baseline gap-2">
+ <span className="ns-tag-mono">{a.action_type}</span>
+ <span className="font-mono text-[11px] text-[hsl(var(--notfair-ink-4))]">
+ {a.agent_id}
+ </span>
+ <span className="ml-auto text-[11.5px] tabular-nums text-[hsl(var(--notfair-ink-4))]">
+ {timeAgo(a.occurred_at)} ·{" "}
+ {new Date(a.occurred_at).toLocaleString()}
+ </span>
+ </div>
+ <p className="m-0 text-[13px] leading-snug text-[hsl(var(--notfair-ink-2))]">
+ {a.summary}
+ </p>
+ {a.reasoning && (
+ <p className="m-0 w-full whitespace-pre-wrap rounded-lg bg-[hsl(var(--notfair-surface-2))] px-3 py-2 text-[12.5px] leading-snug text-[hsl(var(--notfair-ink-3))]">
+ {a.reasoning}
+ </p>
+ )}
+ </li>
+ ))}
+ </ol>
)}
</div>
);
}
-// Force this page to re-render on every visit so freshly-logged actions show up
-// without a hard refresh.
export const dynamic = "force-dynamic";
diff --git a/notfair-cmo/src/app/(app)/[project]/agents/[agent]/cron/page.tsx b/notfair-cmo/src/app/(app)/[project]/agents/[agent]/cron/page.tsx
index 46131704..aaf3d83a 100644
--- a/notfair-cmo/src/app/(app)/[project]/agents/[agent]/cron/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/agents/[agent]/cron/page.tsx
@@ -1,5 +1,4 @@
import { notFound } from "next/navigation";
-import { Card, CardContent } from "@/components/ui/card";
import { getProject } from "@/server/db/projects";
import { resolveAgentBySlug } from "@/server/agent-meta";
import { listCronsForProject } from "@/server/scheduler/display";
@@ -50,11 +49,9 @@ export default async function AgentCronPage({
error = err instanceof Error ? err.message : String(err);
}
- // Scope to this agent only.
const myGroup = view.groups.find((g) => g.agent === templateSlug);
const allCrons = myGroup?.crons ?? [];
- // Expand to occurrences over the window.
const today = new Date();
today.setHours(0, 0, 0, 0);
const startOfFirstDay = today.getTime();
@@ -79,8 +76,6 @@ export default async function AgentCronPage({
for (const o of occs) occurrences.push({ ...o, cron_disabled: cron.disabled });
schedulesByCronId.set(cron.id, scheduleForCalendar(cron.schedule_raw));
}
- // Stamp each past occurrence with its run's status so the calendar chip
- // can render the green-check / red-X indicator without a per-chip fetch.
annotateOccurrencesWithRunStatus(
occurrences,
new Map(
@@ -112,45 +107,47 @@ export default async function AgentCronPage({
const totalDisabled = allCrons.length - totalActive;
return (
- <div className="h-full overflow-y-auto p-6">
- <div className="mx-auto max-w-6xl space-y-4">
- <header className="flex flex-row items-center justify-between gap-4">
- <div>
- <h2 className="text-lg font-semibold tracking-tight">
- {resolved.name}&rsquo;s scheduled work
- </h2>
- <p className="text-sm text-muted-foreground">
- {totalActive} active
+ <div className="h-full overflow-y-auto">
+ <div className="ns-app-wide">
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">{resolved.name}&rsquo;s schedule</h1>
+ <p className="ns-page-sub">
+ <b>{totalActive}</b> active
{totalDisabled > 0 ? ` · ${totalDisabled} disabled` : ""}
</p>
</div>
- <ScheduleCronDialog projectSlug={project.slug} />
+ <div className="ns-page-actions">
+ <ScheduleCronDialog projectSlug={project.slug} />
+ </div>
</header>
{error && (
- <Card>
- <CardContent className="py-6 text-sm">
- <p className="font-medium text-destructive">Could not load crons.</p>
- <p className="mt-1 text-xs text-muted-foreground">{error}</p>
- </CardContent>
- </Card>
+ <div className="ns-card">
+ <div className="ns-card-body">
+ <p className="text-[14px] font-semibold text-destructive">
+ Could not load crons.
+ </p>
+ <p className="mt-1 text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ {error}
+ </p>
+ </div>
+ </div>
)}
{!error && allCrons.length === 0 && (
- <Card>
- <CardContent className="space-y-2 py-10 text-center">
- <p className="text-sm font-medium">
- No scheduled work for {resolved.name} yet.
- </p>
- <p className="text-xs text-muted-foreground">
- Ask the agent in chat (&ldquo;run a daily bid review at 9am&rdquo;) or
- schedule one directly.
- </p>
- <div className="flex justify-center pt-2">
- <ScheduleCronDialog projectSlug={project.slug} />
- </div>
- </CardContent>
- </Card>
+ <div className="ns-empty">
+ <p className="ns-empty-title">
+ No scheduled work for {resolved.name} yet.
+ </p>
+ <p className="ns-empty-sub">
+ Ask the agent in chat (&ldquo;run a daily bid review at 9am&rdquo;)
+ or schedule one directly.
+ </p>
+ <div className="ns-empty-action">
+ <ScheduleCronDialog projectSlug={project.slug} />
+ </div>
+ </div>
)}
{!error && allCrons.length > 0 && (
diff --git a/notfair-cmo/src/app/(app)/[project]/agents/[agent]/files/page.tsx b/notfair-cmo/src/app/(app)/[project]/agents/[agent]/files/page.tsx
index 74defed5..2ba0fe2e 100644
--- a/notfair-cmo/src/app/(app)/[project]/agents/[agent]/files/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/agents/[agent]/files/page.tsx
@@ -1,7 +1,6 @@
import Link from "next/link";
import { notFound } from "next/navigation";
import { FileText, FileX } from "lucide-react";
-import { Badge } from "@/components/ui/badge";
import { getProject } from "@/server/db/projects";
import { resolveAgentBySlug } from "@/server/agent-meta";
import { listAgentFiles, getAgentFile } from "@/server/agents/files";
@@ -41,21 +40,15 @@ export default async function AgentFilesPage({
error = err instanceof Error ? err.message : String(err);
}
- // listAgentFiles already enumerates every workspace file from disk
- // (including PROJECT.md when present), so no augment splice is needed.
- // Reorder so PROJECT.md sits right after IDENTITY.md when both exist,
- // matching the v0.1.0 reading order without duplicating entries.
const identityIdx = files.findIndex((f) => f.name === "IDENTITY.md");
const projectIdx = files.findIndex((f) => f.name === "PROJECT.md");
if (identityIdx >= 0 && projectIdx >= 0 && projectIdx !== identityIdx + 1) {
- const project = files[projectIdx]!;
+ const projectFile = files[projectIdx]!;
const without = files.filter((_, i) => i !== projectIdx);
const insertAt = without.findIndex((f) => f.name === "IDENTITY.md") + 1;
- files = [...without.slice(0, insertAt), project, ...without.slice(insertAt)];
+ files = [...without.slice(0, insertAt), projectFile, ...without.slice(insertAt)];
}
- // Pick which file to show: explicit search param wins, else first present
- // file, else first overall (which may be missing).
const selectedName =
(requestedFile && files.find((f) => f.name === requestedFile)?.name) ||
files.find((f) => !f.missing)?.name ||
@@ -82,25 +75,25 @@ export default async function AgentFilesPage({
}
return (
- <div className="grid h-full grid-cols-[260px_minmax(0,1fr)] divide-x">
+ <div className="grid h-full grid-cols-[260px_minmax(0,1fr)] divide-x divide-border bg-background">
{/* Left rail — file list */}
- <aside className="flex min-h-0 flex-col">
- <div className="border-b px-4 py-2">
- <div className="text-[11px] uppercase tracking-wide text-muted-foreground">
+ <aside className="flex min-h-0 flex-col bg-[hsl(0_0%_99%)]">
+ <div className="border-b border-border/60 px-4 py-3">
+ <div className="text-[11px] font-semibold uppercase tracking-wide text-[hsl(var(--notfair-ink-4))]">
Workspace files
</div>
{workspace && (
- <div className="mt-1 truncate font-mono text-[10px] text-muted-foreground">
+ <div className="mt-1 truncate font-mono text-[10px] text-[hsl(var(--notfair-ink-4))]">
{workspace}
</div>
)}
</div>
- <div className="min-h-0 flex-1 overflow-y-auto py-1">
+ <div className="min-h-0 flex-1 overflow-y-auto py-2">
{error && (
<div className="px-4 py-3 text-xs text-destructive">{error}</div>
)}
{!error && files.length === 0 && (
- <div className="px-4 py-3 text-xs text-muted-foreground">
+ <div className="px-4 py-3 text-xs text-[hsl(var(--notfair-ink-4))]">
No files yet.
</div>
)}
@@ -114,26 +107,23 @@ export default async function AgentFilesPage({
`/agents/${agentSlug}/files?file=${encodeURIComponent(f.name)}`,
)}
className={cn(
- "flex items-center gap-2 px-4 py-1.5 text-sm transition-colors",
+ "mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] transition-colors",
isActive
- ? "bg-accent text-accent-foreground"
- : "hover:bg-accent/50",
- f.missing && "text-muted-foreground/70",
+ ? "bg-[hsl(var(--notfair-accent-soft))] text-[hsl(var(--notfair-accent))]"
+ : "text-[hsl(var(--notfair-ink-3))] hover:bg-[hsl(var(--notfair-surface-2))] hover:text-[hsl(var(--notfair-ink))]",
+ f.missing && !isActive && "opacity-60",
)}
>
{f.missing ? (
- <FileX className="size-3.5 shrink-0 opacity-60" />
+ <FileX className="size-3.5 shrink-0 opacity-70" />
) : (
<FileText className="size-3.5 shrink-0" />
)}
- <span className="truncate font-mono text-[13px]">{f.name}</span>
+ <span className="truncate font-mono">{f.name}</span>
{f.missing && (
- <Badge
- variant="outline"
- className="ml-auto h-4 px-1 text-[9px] uppercase tracking-wide"
- >
+ <span className="ml-auto rounded-[4px] bg-[hsl(var(--notfair-surface-2))] px-1 py-px text-[9px] font-medium uppercase tracking-wide text-[hsl(var(--notfair-ink-4))]">
empty
- </Badge>
+ </span>
)}
</Link>
);
@@ -142,18 +132,19 @@ export default async function AgentFilesPage({
</aside>
{/* Right pane — file viewer */}
- <section className="flex min-h-0 flex-col">
+ <section className="flex min-h-0 flex-col bg-background">
{!selectedName ? (
- <div className="flex h-full items-center justify-center p-6 text-sm text-muted-foreground">
+ <div className="flex h-full items-center justify-center p-6 text-sm text-[hsl(var(--notfair-ink-4))]">
Select a file to view its contents.
</div>
) : selectedMissing ? (
<div className="flex h-full flex-col items-center justify-center gap-2 p-6 text-center">
- <FileX className="size-6 text-muted-foreground/60" />
- <div className="text-sm text-muted-foreground">
- <span className="font-mono">{selectedName}</span> does not exist yet for this agent.
+ <FileX className="size-7 text-[hsl(var(--notfair-ink-4))] opacity-60" />
+ <div className="text-[14px] font-medium text-[hsl(var(--notfair-ink-2))]">
+ <span className="font-mono">{selectedName}</span> doesn&rsquo;t exist
+ yet.
</div>
- <div className="text-xs text-muted-foreground/80">
+ <div className="text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
The agent may create it during onboarding or when first invoked.
</div>
</div>
@@ -161,10 +152,12 @@ export default async function AgentFilesPage({
<div className="p-6 text-sm text-destructive">{selectedError}</div>
) : (
<>
- <header className="flex items-center justify-between border-b px-6 py-3">
+ <header className="flex items-center justify-between border-b border-border/60 px-6 py-3">
<div className="min-w-0">
- <div className="truncate font-mono text-sm">{selectedName}</div>
- <div className="mt-0.5 text-[11px] text-muted-foreground">
+ <div className="truncate font-mono text-[13.5px] text-[hsl(var(--notfair-ink))]">
+ {selectedName}
+ </div>
+ <div className="mt-0.5 text-[11px] text-[hsl(var(--notfair-ink-4))]">
{selectedSize !== undefined && `${formatBytes(selectedSize)}`}
{selectedSize !== undefined && selectedUpdatedAtMs && " · "}
{selectedUpdatedAtMs &&
@@ -173,7 +166,7 @@ export default async function AgentFilesPage({
</div>
</header>
<div className="min-h-0 flex-1 overflow-y-auto">
- <pre className="whitespace-pre-wrap break-words p-6 font-mono text-[13px] leading-relaxed">
+ <pre className="whitespace-pre-wrap break-words p-6 font-mono text-[13px] leading-relaxed text-[hsl(var(--notfair-ink-2))]">
{selectedContent}
</pre>
</div>
diff --git a/notfair-cmo/src/app/(app)/[project]/agents/[agent]/settings/page.tsx b/notfair-cmo/src/app/(app)/[project]/agents/[agent]/settings/page.tsx
index dbdaafc8..b4a50d50 100644
--- a/notfair-cmo/src/app/(app)/[project]/agents/[agent]/settings/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/agents/[agent]/settings/page.tsx
@@ -1,5 +1,4 @@
import { notFound } from "next/navigation";
-import { Card, CardContent } from "@/components/ui/card";
import { TEMPLATES } from "@/server/agent-templates";
import { getProject } from "@/server/db/projects";
import { resolveAgentBySlug, readAgentMeta } from "@/server/agent-meta";
@@ -24,63 +23,86 @@ export default async function AgentSettingsPage({
: undefined;
return (
- <div className="h-full overflow-y-auto p-6">
- <div className="mx-auto max-w-2xl space-y-6">
- <header>
- <h2 className="text-lg font-semibold tracking-tight">Settings</h2>
- <p className="text-sm text-muted-foreground">
- {resolved.name}{" "}
- <span className="font-mono text-xs">· {resolved.agent_id}</span>
- </p>
+ <div className="h-full overflow-y-auto">
+ <div className="ns-app-narrow">
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">Settings</h1>
+ <p className="ns-page-sub">
+ <b>{resolved.name}</b>{" "}
+ <span className="font-mono text-[12px]">· {resolved.agent_id}</span>
+ </p>
+ </div>
</header>
- <Card>
- <CardContent className="p-4">
- <dl className="grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm">
- <dt className="text-muted-foreground">Name</dt>
- <dd>{resolved.name}</dd>
+ <section>
+ <h2 className="ns-h2">
+ <span>Identity</span>
+ <span className="ns-h2-meta">Immutable for the life of the project</span>
+ </h2>
+ <div className="ns-card">
+ <dl className="grid grid-cols-[auto_1fr] gap-x-6 gap-y-3 p-[18px]">
+ <dt className="text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ Name
+ </dt>
+ <dd className="text-[13px] font-medium text-[hsl(var(--notfair-ink-2))]">
+ {resolved.name}
+ </dd>
{role && (
<>
- <dt className="text-muted-foreground">Role</dt>
- <dd>{role.display_name}</dd>
+ <dt className="text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ Role
+ </dt>
+ <dd className="text-[13px] text-[hsl(var(--notfair-ink-2))]">
+ {role.display_name}
+ </dd>
</>
)}
- <dt className="text-muted-foreground">URL slug</dt>
- <dd className="font-mono text-xs">{resolved.slug}</dd>
+ <dt className="text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ URL slug
+ </dt>
+ <dd>
+ <span className="ns-tag-mono">{resolved.slug}</span>
+ </dd>
- <dt className="text-muted-foreground">Agent id</dt>
- <dd className="font-mono text-xs">{resolved.agent_id}</dd>
+ <dt className="text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ Agent id
+ </dt>
+ <dd>
+ <span className="ns-tag-mono">{resolved.agent_id}</span>
+ </dd>
{meta?.source_agent_id && (
<>
- <dt className="text-muted-foreground">Cloned from</dt>
- <dd className="font-mono text-xs">{meta.source_agent_id}</dd>
+ <dt className="text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ Cloned from
+ </dt>
+ <dd>
+ <span className="ns-tag-mono">{meta.source_agent_id}</span>
+ </dd>
</>
)}
{meta?.created_at && (
<>
- <dt className="text-muted-foreground">Created</dt>
- <dd className="tabular-nums">
+ <dt className="text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ Created
+ </dt>
+ <dd className="text-[13px] tabular-nums text-[hsl(var(--notfair-ink-2))]">
{new Date(meta.created_at).toLocaleString()}
</dd>
</>
)}
</dl>
- <p className="mt-4 border-t pt-3 text-xs text-muted-foreground">
- Agent identity is immutable. The name set at onboarding stays
- fixed for the life of the project; the URL slug is computed
- from the role + name.
- </p>
- </CardContent>
- </Card>
+ </div>
+ </section>
- <section className="space-y-2 pt-2">
- <h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
- Danger zone
- </h3>
+ <section>
+ <h2 className="ns-h2">
+ <span>Danger zone</span>
+ </h2>
<AgentDangerZone
agentId={resolved.agent_id}
agentDisplayName={resolved.name}
diff --git a/notfair-cmo/src/app/(app)/[project]/agents/[agent]/skills/page.tsx b/notfair-cmo/src/app/(app)/[project]/agents/[agent]/skills/page.tsx
index c2904ba5..fbe18d8f 100644
--- a/notfair-cmo/src/app/(app)/[project]/agents/[agent]/skills/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/agents/[agent]/skills/page.tsx
@@ -1,5 +1,4 @@
import { notFound } from "next/navigation";
-import { Card, CardContent } from "@/components/ui/card";
import { getProject } from "@/server/db/projects";
import { resolveAgentBySlug } from "@/server/agent-meta";
import { getSkillStatus } from "@/server/agents/skills";
@@ -30,35 +29,32 @@ export default async function AgentSkillsPage({
const skills = report?.skills ?? [];
return (
- <div className="h-full overflow-y-auto p-6">
- <div className="mx-auto max-w-4xl space-y-4">
- <header>
- <h2 className="text-lg font-semibold tracking-tight">Skills</h2>
- <p className="text-sm text-muted-foreground">
- Capabilities available to {resolved.name} from this workspace.
- </p>
+ <div className="h-full overflow-y-auto">
+ <div className="ns-app-wide" style={{ maxWidth: 880 }}>
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">Skills</h1>
+ <p className="ns-page-sub">
+ Capabilities available to <b>{resolved.name}</b> from this
+ workspace.
+ </p>
+ </div>
</header>
{error && (
- <Card>
- <CardContent className="space-y-1 py-4 text-sm">
- <p className="font-medium text-destructive">Could not load skills.</p>
- <p className="text-xs text-muted-foreground">{error}</p>
- </CardContent>
- </Card>
+ <div className="ns-card">
+ <div className="ns-card-body">
+ <p className="text-[14px] font-semibold text-destructive">
+ Could not load skills.
+ </p>
+ <p className="mt-1 text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ {error}
+ </p>
+ </div>
+ </div>
)}
- {!error && skills.length === 0 && (
- <Card>
- <CardContent className="py-12 text-center text-sm text-muted-foreground">
- No skills installed in this workspace yet.
- </CardContent>
- </Card>
- )}
-
- {!error && skills.length > 0 && (
- <SkillsList skills={skills} />
- )}
+ {!error && <SkillsList skills={skills} />}
</div>
</div>
);
diff --git a/notfair-cmo/src/app/(app)/[project]/agents/page.tsx b/notfair-cmo/src/app/(app)/[project]/agents/page.tsx
index 693299bb..b966c0ad 100644
--- a/notfair-cmo/src/app/(app)/[project]/agents/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/agents/page.tsx
@@ -1,17 +1,31 @@
import Link from "next/link";
-import { Bot, Check, MessageSquare, Clock } from "lucide-react";
-import { Button } from "@/components/ui/button";
-import { Card, CardContent, CardHeader } from "@/components/ui/card";
-import { Badge } from "@/components/ui/badge";
+import {
+ Bot,
+ Briefcase,
+ Check,
+ Clock,
+ Megaphone,
+ MessageCircle,
+ MessageSquare,
+ Search,
+ type LucideIcon,
+} from "lucide-react";
import { notFound } from "next/navigation";
import { getProject } from "@/server/db/projects";
-import { TEMPLATES } from "@/server/agent-templates";
+import { TEMPLATES, type AgentTemplateKey } from "@/server/agent-templates";
import { listProjectAgents } from "@/server/agent-meta";
import { listCronsForProject } from "@/server/scheduler/display";
import { reprovisionAgentsAction } from "@/server/actions/projects";
import { ReprovisionButton } from "@/components/reprovision-button";
import { projectHref } from "@/lib/project-href";
+const ROLE_ICON: Record<AgentTemplateKey, LucideIcon> = {
+ cmo: Briefcase,
+ google_ads: Megaphone,
+ meta_ads: MessageCircle,
+ seo: Search,
+};
+
export default async function AgentsPage({
params,
}: {
@@ -21,8 +35,6 @@ export default async function AgentsPage({
const project = getProject(slug);
if (!project || project.archived_at) notFound();
- // Best-effort cron count per agent (keyed by agent_id, since slugs now
- // encode names — the cron rows still bucket by full agent id).
const cronByAgent = new Map<string, number>();
try {
const view = await listCronsForProject(project.slug);
@@ -30,22 +42,24 @@ export default async function AgentsPage({
} catch {}
const projectAgents = await listProjectAgents(project.slug);
-
- // Bind the project slug into the server action for the client button.
const reprovision = reprovisionAgentsAction.bind(null, project.slug);
return (
- <div className="mx-auto max-w-4xl space-y-6">
- <header className="flex flex-row items-center justify-between gap-4">
- <div>
- <h1 className="text-2xl font-semibold tracking-tight">Agents</h1>
- <p className="text-sm text-muted-foreground">
- Workspace <span className="font-mono">{project.slug}</span> ·{" "}
- {projectAgents.length} agent
- {projectAgents.length === 1 ? "" : "s"} · running on {project.harness_adapter === "codex-local" ? "Codex" : "Claude Code"}
+ <div className="ns-app-wide" style={{ maxWidth: 880 }}>
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">Agents</h1>
+ <p className="ns-page-sub">
+ <b>{projectAgents.length}</b> agent
+ {projectAgents.length === 1 ? "" : "s"} · running on{" "}
+ <b>
+ {project.harness_adapter === "codex-local" ? "Codex" : "Claude Code"}
+ </b>
</p>
</div>
- <ReprovisionButton action={reprovision} />
+ <div className="ns-page-actions">
+ <ReprovisionButton action={reprovision} />
+ </div>
</header>
<div className="grid gap-4">
@@ -53,65 +67,60 @@ export default async function AgentsPage({
const role = agent.template_key
? TEMPLATES.find((t) => t.key === agent.template_key)
: undefined;
+ const Icon = agent.template_key
+ ? ROLE_ICON[agent.template_key] ?? Bot
+ : Bot;
const crons = cronByAgent.get(agent.agent_id) ?? 0;
return (
- <Card key={agent.agent_id}>
- <CardHeader className="flex flex-row items-start justify-between space-y-0">
- <div className="flex items-start gap-3">
- <div className="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted">
- <Bot className="size-4" />
- </div>
- <div className="space-y-1">
- <div className="flex flex-wrap items-baseline gap-x-2">
- <h2 className="text-base font-semibold">{agent.name}</h2>
- {role && (
- <Badge
- variant="outline"
- className="text-[10px] font-medium uppercase tracking-wider"
- >
- {role.display_name}
- </Badge>
- )}
- <Badge variant="outline" className="text-[10px] font-mono">
- {agent.agent_id}
- </Badge>
- </div>
- <p className="text-sm text-muted-foreground">
- {role?.description ?? agent.description ?? ""}
- </p>
+ <div key={agent.agent_id} className="ns-card">
+ <div className="flex items-start gap-4 p-[18px]">
+ <span className="ns-glyph" aria-hidden>
+ <Icon className="size-[18px] text-[hsl(var(--notfair-ink-2))]" />
+ </span>
+ <div className="min-w-0 flex-1">
+ <div className="flex flex-wrap items-baseline gap-x-2 gap-y-1">
+ <h2 className="m-0 text-[15.5px] font-semibold tracking-tight text-[hsl(var(--notfair-ink))]">
+ {agent.name}
+ </h2>
+ {role && <span className="ns-tag">{role.display_name}</span>}
+ <span className="ns-tag-mono">{agent.agent_id}</span>
</div>
+ <p className="mt-1 text-[13px] leading-snug text-[hsl(var(--notfair-ink-3))]">
+ {role?.description ?? agent.description ?? "Custom agent."}
+ </p>
</div>
<div className="flex shrink-0 items-center gap-2">
{crons > 0 && (
<Link
href={projectHref(slug, "/crons")}
- className="flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground"
+ className="inline-flex items-center gap-1 rounded-md px-2 py-1 text-[12px] text-[hsl(var(--notfair-ink-4))] transition-colors hover:bg-[hsl(var(--notfair-surface-2))] hover:text-[hsl(var(--notfair-ink-2))]"
>
<Clock className="size-3" />
{crons}
</Link>
)}
- <Button asChild size="sm">
- <Link href={projectHref(slug, `/agents/${agent.slug}/chat`)}>
- <MessageSquare className="mr-1.5 size-4" />
- Chat
- </Link>
- </Button>
+ <Link
+ href={projectHref(slug, `/agents/${agent.slug}/chat`)}
+ className="ns-btn ns-btn-primary ns-btn-sm"
+ >
+ <MessageSquare className="size-3.5" />
+ Chat
+ </Link>
</div>
- </CardHeader>
+ </div>
{role && (
- <CardContent>
- <ul className="grid grid-cols-1 gap-1.5 text-sm md:grid-cols-2">
+ <div className="border-t border-border/60 px-[18px] py-3">
+ <ul className="grid grid-cols-1 gap-1.5 text-[13px] text-[hsl(var(--notfair-ink-3))] md:grid-cols-2">
{role.capabilities.map((c) => (
<li key={c} className="flex items-start gap-2">
- <Check className="mt-0.5 size-3.5 shrink-0 text-emerald-600" />
+ <Check className="mt-0.5 size-3.5 shrink-0 text-[hsl(var(--notfair-accent))]" />
<span>{c}</span>
</li>
))}
</ul>
- </CardContent>
+ </div>
)}
- </Card>
+ </div>
);
})}
</div>
diff --git a/notfair-cmo/src/app/(app)/[project]/approvals/page.tsx b/notfair-cmo/src/app/(app)/[project]/approvals/page.tsx
index f6c35ced..bad5ae91 100644
--- a/notfair-cmo/src/app/(app)/[project]/approvals/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/approvals/page.tsx
@@ -1,7 +1,5 @@
import Link from "next/link";
import { notFound } from "next/navigation";
-import { Card, CardContent } from "@/components/ui/card";
-import { Badge } from "@/components/ui/badge";
import { getProject } from "@/server/db/projects";
import {
listActionableApprovals,
@@ -34,8 +32,6 @@ export default async function ApprovalsPage({
const project = getProject(slug);
if (!project || project.archived_at) notFound();
- // Bulk-fetch everything we render — better-sqlite3 is synchronous and the
- // page is small enough that one round-trip per panel keeps the code simple.
const actionable = listActionableApprovals(project.slug);
const resolved =
activeTab === "resolved" ? listResolvedApprovals(project.slug, 50) : [];
@@ -48,26 +44,35 @@ export default async function ApprovalsPage({
};
return (
- <div className="mx-auto max-w-3xl space-y-4">
- <header className="space-y-1">
- <h1 className="text-2xl font-semibold tracking-tight">Approvals</h1>
- <p className="text-sm text-muted-foreground">
- Inbox for the project <span className="font-mono">{project.slug}</span>. Approvals
- surface here when an agent wants to make a write that the project's policies
- don't already cover.
- </p>
+ <div className="ns-app-narrow">
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">Approvals</h1>
+ <p className="ns-page-sub">
+ Your inbox for agent decisions. Anything not already covered by an
+ <b> auto-approve rule</b> lands here for a quick yes or no.
+ </p>
+ </div>
</header>
- <nav className="flex gap-1 border-b border-border" role="tablist" aria-label="Approval tabs">
+ <nav
+ className="ns-tabs mb-6"
+ role="tablist"
+ aria-label="Approval tabs"
+ >
<TabLink
slug={slug}
tab="pending"
active={activeTab}
label="Inbox"
count={counts.pending}
- highlightCount
/>
- <TabLink slug={slug} tab="resolved" active={activeTab} label="Resolved" />
+ <TabLink
+ slug={slug}
+ tab="resolved"
+ active={activeTab}
+ label="Resolved"
+ />
<TabLink
slug={slug}
tab="policies"
@@ -76,52 +81,46 @@ export default async function ApprovalsPage({
/>
</nav>
- {activeTab === "pending" && (
- actionable.length === 0 ? (
- <Card>
- <CardContent className="py-16 text-center">
- <h2 className="text-lg font-medium">All caught up.</h2>
- <p className="mt-2 text-sm text-muted-foreground">
- Agents will surface decisions here. Manage auto-approve rules in the
- <span className="px-1">
- <Link
- href={`${projectHref(slug, "/approvals")}?tab=policies`}
- className="underline"
- >
- Auto-approve rules
- </Link>
- </span>
- tab.
- </p>
- </CardContent>
- </Card>
+ {activeTab === "pending" &&
+ (actionable.length === 0 ? (
+ <div className="ns-empty">
+ <p className="ns-empty-title">All caught up.</p>
+ <p className="ns-empty-sub">
+ When an agent needs your go-ahead, it&rsquo;ll show up here.
+ Manage rules in{" "}
+ <Link
+ href={`${projectHref(slug, "/approvals")}?tab=policies`}
+ className="ns-link"
+ >
+ Auto-approve rules
+ </Link>
+ .
+ </p>
+ </div>
) : (
<div className="space-y-3">
{actionable.map((a) => (
<ApprovalCard key={a.id} approval={a} />
))}
</div>
- )
- )}
+ ))}
- {activeTab === "resolved" && (
- resolved.length === 0 ? (
- <Card>
- <CardContent className="py-16 text-center">
- <h2 className="text-lg font-medium">No resolved approvals yet.</h2>
- <p className="mt-2 text-sm text-muted-foreground">
- Decisions show up here after they're approved, rejected, or auto-handled.
- </p>
- </CardContent>
- </Card>
+ {activeTab === "resolved" &&
+ (resolved.length === 0 ? (
+ <div className="ns-empty">
+ <p className="ns-empty-title">No resolved approvals yet.</p>
+ <p className="ns-empty-sub">
+ Decisions show up here after they&rsquo;re approved, rejected, or
+ auto-handled.
+ </p>
+ </div>
) : (
<div className="space-y-3">
{resolved.map((a) => (
<ApprovalCard key={a.id} approval={a} />
))}
</div>
- )
- )}
+ ))}
{activeTab === "policies" && (
<PolicyList projectSlug={project.slug} policies={policies} />
@@ -136,38 +135,37 @@ function TabLink({
active,
label,
count,
- highlightCount = false,
}: {
slug: string;
tab: TabKey;
active: TabKey;
label: string;
count?: number;
- highlightCount?: boolean;
}) {
const isActive = active === tab;
- const href = tab === "pending"
- ? projectHref(slug, "/approvals")
- : `${projectHref(slug, "/approvals")}?tab=${tab}`;
+ const href =
+ tab === "pending"
+ ? projectHref(slug, "/approvals")
+ : `${projectHref(slug, "/approvals")}?tab=${tab}`;
return (
<Link
href={href}
role="tab"
aria-selected={isActive}
- className={`inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-sm transition-colors ${
- isActive
- ? "border-foreground font-medium text-foreground"
- : "border-transparent text-muted-foreground hover:text-foreground"
- }`}
+ className="ns-tab"
+ data-active={isActive}
>
{label}
{count !== undefined && count > 0 && (
- <Badge
- variant={highlightCount ? "default" : "secondary"}
- className="h-5 px-1.5 text-[10px]"
+ <span
+ className={`ml-1 inline-flex h-[16px] min-w-[16px] items-center justify-center rounded-full px-1 text-[10px] font-semibold tabular-nums leading-none ${
+ isActive
+ ? "bg-[hsl(var(--notfair-ink))] text-white"
+ : "bg-[hsl(var(--notfair-surface-2))] text-[hsl(var(--notfair-ink-3))]"
+ }`}
>
{count}
- </Badge>
+ </span>
)}
</Link>
);
diff --git a/notfair-cmo/src/app/(app)/[project]/connections/page.tsx b/notfair-cmo/src/app/(app)/[project]/connections/page.tsx
index f21c6287..e0eea223 100644
--- a/notfair-cmo/src/app/(app)/[project]/connections/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/connections/page.tsx
@@ -24,23 +24,12 @@ export default async function ConnectionsPage({
if (!project || project.archived_at) notFound();
const catalog = getMcpCatalog(project.slug);
- // Status probes happen in parallel — each goes through the in-process
- // probe cache (60s for connected, 10s for unreachable), so a hot reload
- // resolves almost entirely from memory. First-visit cost is bounded by
- // the per-probe timeout in `getMcpStatus` (6s) since Promise.all waits
- // for the slowest probe.
const statuses = await Promise.all(
catalog.map((s) => getMcpStatus(project.slug, s.key)),
);
const builtinTools = summarizeBuiltinTools();
const connectedCount = statuses.filter((s) => s.state === "connected").length;
- // Used by the Browse-connectors dialog to render already-connected
- // tiles as non-clickable "connected" pills. We pass both keys *and*
- // normalized resource URLs because the trusted-connector id and the
- // stored mcp_tokens.server_name don't always match (e.g. NotFair Meta
- // Ads was historically slugified to `notfair-meta-ads` while the tile
- // uses canonical id `notfair-metaads`). The URL is the stable signal.
const connectedSpecs = catalog.filter(
(_, i) => statuses[i].state === "connected",
);
@@ -50,42 +39,31 @@ export default async function ConnectionsPage({
);
return (
- <div className="mx-auto max-w-3xl px-6 py-12">
- {/* Editorial header — eyebrow, large title, sublabel, and the
- primary action lifted into the top-right slot. */}
- <header className="border-b border-border/60 pb-8">
- <div className="flex items-start justify-between gap-6">
- <div className="min-w-0">
- <p className="font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground">
- Workspace · {project.display_name}
- </p>
- <h1 className="mt-2 text-3xl font-semibold tracking-tight">
- Connections
- </h1>
- <p className="mt-3 max-w-md text-sm leading-relaxed text-muted-foreground">
- MCP servers are the tools your agents call. Browse the curated
- list or paste any OAuth&nbsp;2.0 URL.
- </p>
- </div>
- <div className="shrink-0">
- <AddMcpServerMenu
- connectedKeys={connectedKeys}
- connectedResourceUrls={connectedResourceUrls}
- />
- </div>
+ <div className="ns-app-narrow">
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">Connections</h1>
+ <p className="ns-page-sub">
+ MCP servers are the tools your agents call. Browse the curated list
+ or paste any <b>OAuth&nbsp;2.0</b> URL.
+ </p>
+ </div>
+ <div className="ns-page-actions">
+ <AddMcpServerMenu
+ connectedKeys={connectedKeys}
+ connectedResourceUrls={connectedResourceUrls}
+ />
</div>
</header>
<McpFlashBanner connected={mcp_connected} error={mcp_error} />
- {/* Built-in section — visually anchored with the orchestration
- accent so users can tell at a glance it's not an external MCP. */}
- <section className="mt-10">
- <SectionHeading
- label="Built-in"
- meta="ships with the platform"
- />
- <div className="mt-3 overflow-hidden rounded-xl border border-border bg-card">
+ <section>
+ <h2 className="ns-h2">
+ <span>Built-in</span>
+ <span className="ns-h2-meta">Ships with notfair-cmo</span>
+ </h2>
+ <div className="ns-group">
<BuiltinMcpCard
name="Orchestration"
description="Built-in tools your agents use to coordinate: assign tasks, request approvals, write PROJECT.md, comment, and report status."
@@ -94,26 +72,25 @@ export default async function ConnectionsPage({
</div>
</section>
- {/* External servers — one list, one container, sharp row dividers. */}
- <section className="mt-10">
- <SectionHeading
- label="Servers"
- meta={
- catalog.length === 0
- ? "none yet"
- : `${connectedCount} of ${catalog.length} connected`
- }
- />
+ <section>
+ <h2 className="ns-h2">
+ <span>Servers</span>
+ <span className="ns-h2-meta">
+ {catalog.length === 0
+ ? "None yet"
+ : `${connectedCount} of ${catalog.length} connected`}
+ </span>
+ </h2>
{catalog.length === 0 ? (
- <div className="mt-3 overflow-hidden rounded-xl border border-dashed border-border bg-card">
- <p className="px-6 py-12 text-center text-sm text-muted-foreground">
- No external MCP servers yet. Use{" "}
- <span className="font-medium text-foreground">Add server</span>{" "}
+ <div className="ns-empty">
+ <p className="ns-empty-title">No MCP servers yet.</p>
+ <p className="ns-empty-sub">
+ Use <span className="font-medium text-foreground">Add server</span>{" "}
above to browse trusted connectors or paste a URL.
</p>
</div>
) : (
- <ol className="mt-3 overflow-hidden rounded-xl border border-border bg-card divide-y divide-border">
+ <ol className="ns-group">
{catalog.map((spec, i) => (
<li key={spec.key}>
<McpCard spec={spec} status={statuses[i]} />
@@ -125,16 +102,3 @@ export default async function ConnectionsPage({
</div>
);
}
-
-function SectionHeading({ label, meta }: { label: string; meta: string }) {
- return (
- <div className="flex items-baseline justify-between gap-4">
- <h2 className="font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground">
- {label}
- </h2>
- <span className="font-mono text-[10px] uppercase tracking-[0.14em] text-muted-foreground/70">
- {meta}
- </span>
- </div>
- );
-}
diff --git a/notfair-cmo/src/app/(app)/[project]/crons/page.tsx b/notfair-cmo/src/app/(app)/[project]/crons/page.tsx
index f27db46f..ba048e5c 100644
--- a/notfair-cmo/src/app/(app)/[project]/crons/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/crons/page.tsx
@@ -1,5 +1,4 @@
import { notFound } from "next/navigation";
-import { Card, CardContent } from "@/components/ui/card";
import { getProject } from "@/server/db/projects";
import { listCronsForProject } from "@/server/scheduler/display";
import {
@@ -23,7 +22,7 @@ function scheduleForCalendar(s: unknown): ScheduleInput | null {
return null;
}
-const NUM_DAYS = 14; // 2-week window; UI shows 7 at a time with prev/next.
+const NUM_DAYS = 14;
export default async function CronsPage({
params,
@@ -43,18 +42,15 @@ export default async function CronsPage({
error = err instanceof Error ? err.message : String(err);
}
- // Flatten crons + agent slugs for the calendar.
const allCrons = view.groups.flatMap((g) => g.crons);
const agentSlugs = view.groups.map((g) => g.agent);
- // Compute the time window: today 00:00 local → +NUM_DAYS.
const today = new Date();
today.setHours(0, 0, 0, 0);
const startOfFirstDay = today.getTime();
const dayMs = 24 * 60 * 60 * 1000;
const until = startOfFirstDay + NUM_DAYS * dayMs;
- // Expand every cron into occurrences within the window.
const occurrences: CalendarOccurrence[] = [];
const schedulesByCronId = new Map<string, ReturnType<typeof scheduleForCalendar>>();
for (const cron of allCrons) {
@@ -102,42 +98,51 @@ export default async function CronsPage({
const totalDisabled = allCrons.length - totalActive;
return (
- <div className="mx-auto max-w-6xl space-y-6">
- <header className="flex flex-row items-center justify-between gap-4">
- <div>
- <h1 className="text-2xl font-semibold tracking-tight">Crons</h1>
- <p className="text-sm text-muted-foreground">
- Workspace <span className="font-mono">{project.slug}</span> ·{" "}
- {totalActive} active{totalDisabled > 0 ? ` · ${totalDisabled} disabled` : ""}
+ <div className="ns-app-wide">
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">Crons</h1>
+ <p className="ns-page-sub">
+ <b>{totalActive}</b> active
+ {totalDisabled > 0 ? ` · ${totalDisabled} disabled` : ""} ·
+ recurring work scheduled across your agents.
</p>
</div>
- <ScheduleCronDialog projectSlug={project.slug} />
+ <div className="ns-page-actions">
+ <ScheduleCronDialog projectSlug={project.slug} />
+ </div>
</header>
{error && (
- <Card>
- <CardContent className="py-6 text-sm">
- <p className="font-medium text-destructive">Could not load crons.</p>
- <p className="mt-1 text-xs text-muted-foreground">{error}</p>
- <p className="mt-2 text-xs">
- Run <code className="rounded bg-muted px-1.5 py-0.5">notfair-cmo doctor</code> for help.
+ <div className="ns-card">
+ <div className="ns-card-body">
+ <p className="text-[14px] font-semibold text-destructive">
+ Could not load crons.
+ </p>
+ <p className="mt-1 text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ {error}
</p>
- </CardContent>
- </Card>
+ <p className="mt-2 text-[12px] text-[hsl(var(--notfair-ink-4))]">
+ Run{" "}
+ <code className="rounded bg-[hsl(var(--notfair-surface-2))] px-1.5 py-px font-mono">
+ notfair-cmo doctor
+ </code>{" "}
+ for help.
+ </p>
+ </div>
+ </div>
)}
{!error && allCrons.length === 0 && (
- <Card>
- <CardContent className="space-y-3 py-12 text-center">
- <h2 className="text-base font-medium">No scheduled work yet.</h2>
- <p className="text-sm text-muted-foreground">
- Schedule a recurring job for one of this project&rsquo;s agents.
- </p>
- <div className="flex justify-center pt-2">
- <ScheduleCronDialog projectSlug={project.slug} />
- </div>
- </CardContent>
- </Card>
+ <div className="ns-empty">
+ <p className="ns-empty-title">No scheduled work yet.</p>
+ <p className="ns-empty-sub">
+ Schedule a recurring job for one of this project&rsquo;s agents.
+ </p>
+ <div className="ns-empty-action">
+ <ScheduleCronDialog projectSlug={project.slug} />
+ </div>
+ </div>
)}
{!error && allCrons.length > 0 && (
diff --git a/notfair-cmo/src/app/(app)/[project]/page.tsx b/notfair-cmo/src/app/(app)/[project]/page.tsx
index 2b112637..04ae1e0f 100644
--- a/notfair-cmo/src/app/(app)/[project]/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/page.tsx
@@ -1,21 +1,20 @@
import Link from "next/link";
import { notFound } from "next/navigation";
-import { MessageSquare, Clock, Bot, ListChecks, CheckCircle2 } from "lucide-react";
import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-import { Button } from "@/components/ui/button";
-import { Badge } from "@/components/ui/badge";
+ Bot,
+ Briefcase,
+ Megaphone,
+ MessageCircle,
+ MessageSquare,
+ Search,
+ type LucideIcon,
+} from "lucide-react";
import { getProject } from "@/server/db/projects";
import { costToday } from "@/server/db/cost";
import { listPendingApprovals } from "@/server/db/approvals";
import { listTasks } from "@/server/db/tasks";
import { listAgentActions } from "@/server/db/agent-actions";
-import { TEMPLATES } from "@/server/agent-templates";
+import { TEMPLATES, type AgentTemplateKey } from "@/server/agent-templates";
import { listProjectAgents } from "@/server/agent-meta";
import { projectHref } from "@/lib/project-href";
@@ -31,6 +30,13 @@ function timeAgo(iso: string) {
return `${Math.floor(seconds / 86400)}d ago`;
}
+const ROLE_ICON: Record<AgentTemplateKey, LucideIcon> = {
+ cmo: Briefcase,
+ google_ads: Megaphone,
+ meta_ads: MessageCircle,
+ seo: Search,
+};
+
export default async function ProjectHomePage({
params,
}: {
@@ -45,222 +51,241 @@ export default async function ProjectHomePage({
const tasks = listTasks(project.slug);
const recent = listAgentActions(project.slug, 8);
const projectAgents = await listProjectAgents(project.slug);
- // CMO's URL slug (e.g. "cmo-greg") for any "chat with CMO" deep links
- // on this page. Falls back to a sensible empty path; the project home
- // is fine if CMO somehow isn't provisioned yet.
const cmoAgent = projectAgents.find((a) => a.template_key === "cmo");
const cmoChatHref = cmoAgent
? projectHref(slug, `/agents/${cmoAgent.slug}/chat`)
: projectHref(slug, "");
- // Intentionally NOT calling openclaw here. The cron tab is the source of
- // truth for scheduled jobs; calling `openclaw cron list` from the home page
- // would block render for 5-15s on some machines. Show a link instead.
const running = tasks.filter((t) => t.status === "working").length;
+ const nothingHappened = tasks.length === 0 && recent.length === 0;
return (
- <div className="mx-auto max-w-6xl space-y-6">
- <div className="flex items-baseline justify-between">
- <div>
- <h1 className="text-2xl font-semibold tracking-tight">{project.display_name}</h1>
- <p className="text-sm text-muted-foreground">
- Workspace home · slug <span className="font-mono">{project.slug}</span>
+ <div className="ns-app-wide">
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">{project.display_name}</h1>
+ <p className="ns-page-sub">
+ Your local AI marketing team. Hand a goal to the CMO and they&rsquo;ll
+ delegate.
</p>
</div>
- <Button asChild>
- <Link href={cmoChatHref}>
- <MessageSquare className="mr-1.5 size-4" />
+ <div className="ns-page-actions">
+ <Link href={cmoChatHref} className="ns-btn ns-btn-primary">
+ <MessageSquare className="size-4" />
Chat with CMO
</Link>
- </Button>
- </div>
+ </div>
+ </header>
- {/* KPI row */}
- <div className="grid gap-4 md:grid-cols-4">
- <KpiCard
+ {/* KPI strip — four quiet metric tiles. */}
+ <div className="grid grid-cols-2 gap-3 md:grid-cols-4">
+ <KpiTile
label="Spend today"
value={formatUsd(cost.total_usd)}
hint={`LLM ${formatUsd(cost.by_source.llm)} · Ads ${formatUsd(
cost.by_source.google_ads + cost.by_source.gsc,
)}`}
/>
- <KpiCard
- label="Scheduled crons"
- value="→"
- hint="open cron tab"
- href={projectHref(slug, "/crons")}
- />
- <KpiCard
+ <KpiTile
label="Active tasks"
value={String(running)}
hint={`${tasks.length} total`}
href={projectHref(slug, "/tasks")}
/>
- <KpiCard
+ <KpiTile
label="Pending approvals"
value={String(pending.length)}
hint={pending.length === 0 ? "all caught up" : "review →"}
href={projectHref(slug, "/approvals")}
+ accent={pending.length > 0}
+ />
+ <KpiTile
+ label="Crons"
+ value="·"
+ hint="scheduled work"
+ href={projectHref(slug, "/crons")}
/>
</div>
- <div className="grid gap-4 lg:grid-cols-3">
- {/* Agents column */}
- <Card className="lg:col-span-2">
- <CardHeader>
- <div className="flex items-center justify-between">
- <div>
- <CardTitle className="text-base">Your agents</CardTitle>
- <CardDescription>
- Each agent runs in its own workspace. Click to chat.
- </CardDescription>
- </div>
- <Button asChild variant="outline" size="sm">
- <Link href={projectHref(slug, "/agents")}>View all</Link>
- </Button>
- </div>
- </CardHeader>
- <CardContent className="space-y-2">
+ {/* Two-up: agents on the left, recent activity on the right. */}
+ <div className="mt-8 grid gap-6 lg:grid-cols-3">
+ <section className="lg:col-span-2">
+ <div className="ns-h2">
+ <span>Your agents</span>
+ <Link href={projectHref(slug, "/agents")} className="ns-link ns-h2-meta">
+ View all ›
+ </Link>
+ </div>
+ <ol className="ns-group">
{projectAgents.map((agent) => {
const role = agent.template_key
? TEMPLATES.find((t) => t.key === agent.template_key)
: undefined;
+ const Icon = agent.template_key
+ ? ROLE_ICON[agent.template_key] ?? Bot
+ : Bot;
return (
- <Link
- key={agent.agent_id}
- href={projectHref(slug, `/agents/${agent.slug}/chat`)}
- className="flex items-center gap-3 rounded-md border bg-card p-3 transition-colors hover:bg-accent/50"
- >
- <div className="flex size-8 shrink-0 items-center justify-center rounded-md bg-muted">
- <Bot className="size-4" />
- </div>
- <div className="min-w-0 flex-1">
- <div className="flex items-baseline gap-2">
- <span className="font-medium">{agent.name}</span>
- {role && (
- <span className="text-[10px] uppercase tracking-wide text-muted-foreground">
- {role.display_name}
- </span>
- )}
- </div>
- <p className="line-clamp-1 text-xs text-muted-foreground">
- {role?.description ?? agent.description ?? ""}
- </p>
- </div>
- <MessageSquare className="size-4 shrink-0 text-muted-foreground" />
- </Link>
+ <li key={agent.agent_id}>
+ <Link
+ href={projectHref(slug, `/agents/${agent.slug}/chat`)}
+ className="ns-row-button"
+ >
+ <span className="ns-glyph" aria-hidden>
+ <Icon className="size-[18px] text-[hsl(var(--notfair-ink-2))]" />
+ </span>
+ <span className="ns-row-body">
+ <span className="ns-row-title-row">
+ <span className="ns-row-title">{agent.name}</span>
+ {role && (
+ <span className="ns-tag">{role.display_name}</span>
+ )}
+ </span>
+ <span className="ns-row-desc block">
+ {role?.description ?? agent.description ?? "Custom agent."}
+ </span>
+ </span>
+ <span className="ns-row-meta">
+ <span className="chev" aria-hidden>
+ ›
+ </span>
+ </span>
+ </Link>
+ </li>
);
})}
- </CardContent>
- </Card>
+ </ol>
+ </section>
- {/* Activity column */}
- <Card>
- <CardHeader>
- <div className="flex items-center justify-between">
- <div>
- <CardTitle className="text-base">Recent activity</CardTitle>
- <CardDescription>Last 8 agent actions</CardDescription>
- </div>
- <Button asChild variant="outline" size="sm">
- <Link href={projectHref(slug, "/activity")}>All</Link>
- </Button>
+ <section>
+ <div className="ns-h2">
+ <span>Recent activity</span>
+ <Link
+ href={projectHref(slug, "/activity")}
+ className="ns-link ns-h2-meta"
+ >
+ All ›
+ </Link>
+ </div>
+ {recent.length === 0 ? (
+ <div className="ns-empty">
+ <p className="ns-empty-title">Nothing yet.</p>
+ <p className="ns-empty-sub">
+ Autonomous decisions and scheduled work will show up here.
+ </p>
</div>
- </CardHeader>
- <CardContent>
- {recent.length === 0 ? (
- <div className="space-y-2 text-sm">
- <p className="text-muted-foreground">No activity yet.</p>
- <p className="text-xs text-muted-foreground">
- Activity logs autonomous decisions, scheduled work, and tool calls.
- </p>
- </div>
- ) : (
- <ul className="space-y-2.5 text-xs">
- {recent.map((a) => (
- <li key={a.id} className="space-y-0.5">
- <div className="flex items-center gap-2">
- <Badge variant="outline" className="font-mono text-[9px]">
- {a.action_type}
- </Badge>
- <span className="ml-auto text-[10px] text-muted-foreground tabular-nums">
- {timeAgo(a.occurred_at)}
- </span>
- </div>
- <p className="line-clamp-2 leading-snug">{a.summary}</p>
- </li>
- ))}
- </ul>
- )}
- </CardContent>
- </Card>
+ ) : (
+ <ol className="ns-group">
+ {recent.map((a) => (
+ <li key={a.id} className="ns-row flex-col items-start gap-1">
+ <div className="flex w-full items-baseline justify-between gap-2">
+ <span className="ns-tag-mono">{a.action_type}</span>
+ <span className="text-[11px] tabular-nums text-[hsl(var(--notfair-ink-4))]">
+ {timeAgo(a.occurred_at)}
+ </span>
+ </div>
+ <p className="m-0 text-[12.5px] leading-snug text-[hsl(var(--notfair-ink-3))] line-clamp-2">
+ {a.summary}
+ </p>
+ </li>
+ ))}
+ </ol>
+ )}
+ </section>
</div>
- {/* Onboarding nudge if nothing has happened yet */}
- {tasks.length === 0 && recent.length === 0 && (
- <Card>
- <CardContent className="space-y-3 py-6 text-sm">
- <h3 className="font-medium">Getting started</h3>
- <ol className="space-y-1.5 text-muted-foreground">
- <li>
- 1.{" "}
- <Link href={projectHref(slug, "/connections")} className="underline">
- Connect Google Ads or GSC
- </Link>{" "}
- if you want agents to do real work (optional, chat works without it)
- </li>
- <li>
- 2.{" "}
- <Link href={projectHref(slug, "/agents/cmo/chat")} className="underline">
- Chat with the CMO
- </Link>{" "}
- to plan what to do
- </li>
- <li>
- 3.{" "}
- <Link href={projectHref(slug, "/crons")} className="underline">
- Schedule recurring jobs
- </Link>{" "}
- for specialist agents
- </li>
- </ol>
- </CardContent>
- </Card>
+ {nothingHappened && (
+ <section className="mt-10">
+ <div className="ns-h2">
+ <span>Getting started</span>
+ </div>
+ <ol className="ns-group">
+ <GettingStartedStep
+ n="1"
+ title="Connect your data sources"
+ desc="Wire up Google Ads, Meta Ads, or Search Console so agents can do real work."
+ href={projectHref(slug, "/connections")}
+ />
+ <GettingStartedStep
+ n="2"
+ title="Chat with your CMO"
+ desc="Brief them on goals, audience, and constraints. They&rsquo;ll plan from there."
+ href={cmoChatHref}
+ />
+ <GettingStartedStep
+ n="3"
+ title="Schedule recurring work"
+ desc="Daily bid review, weekly SEO audit — whatever cadence you want."
+ href={projectHref(slug, "/crons")}
+ />
+ </ol>
+ </section>
)}
</div>
);
}
-function KpiCard({
+function KpiTile({
label,
value,
hint,
href,
+ accent,
}: {
label: string;
value: string;
hint: string;
href?: string;
+ accent?: boolean;
}) {
- const content = (
- <Card className={href ? "transition-colors hover:bg-accent/30" : undefined}>
- <CardHeader className="pb-2">
- <CardDescription>{label}</CardDescription>
- <CardTitle className="text-2xl tabular-nums">{value}</CardTitle>
- </CardHeader>
- <CardContent className="pt-0 text-xs text-muted-foreground">{hint}</CardContent>
- </Card>
+ const body = (
+ <>
+ <p className="ns-kpi-label">{label}</p>
+ <p
+ className={`ns-kpi-value ${
+ accent ? "text-[hsl(var(--notfair-accent))]" : ""
+ }`}
+ >
+ {value}
+ </p>
+ <p className="ns-kpi-hint">{hint}</p>
+ </>
);
if (href)
return (
- <Link href={href} className="block">
- {content}
+ <Link href={href} className="ns-kpi">
+ {body}
</Link>
);
- return content;
+ return <div className="ns-kpi">{body}</div>;
}
-// Silence unused lint for icons reserved for future activity-feed expansion.
-void ListChecks;
-void CheckCircle2;
-void Clock;
+function GettingStartedStep({
+ n,
+ title,
+ desc,
+ href,
+}: {
+ n: string;
+ title: string;
+ desc: string;
+ href: string;
+}) {
+ return (
+ <li>
+ <Link href={href} className="ns-row-button">
+ <span className="ns-glyph ns-glyph-accent" aria-hidden>
+ {n}
+ </span>
+ <span className="ns-row-body">
+ <span className="ns-row-title">{title}</span>
+ <span className="ns-row-desc block">{desc}</span>
+ </span>
+ <span className="ns-row-meta">
+ <span className="chev" aria-hidden>
+ ›
+ </span>
+ </span>
+ </Link>
+ </li>
+ );
+}
diff --git a/notfair-cmo/src/app/(app)/[project]/settings/page.tsx b/notfair-cmo/src/app/(app)/[project]/settings/page.tsx
index 386c4fb1..a9797806 100644
--- a/notfair-cmo/src/app/(app)/[project]/settings/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/settings/page.tsx
@@ -13,22 +13,56 @@ export default async function SettingsPage({
if (!project || project.archived_at) notFound();
return (
- <div className="mx-auto max-w-2xl space-y-6">
- <header>
- <h1 className="text-2xl font-semibold tracking-tight">Settings</h1>
- <p className="text-sm text-muted-foreground">
- Workspace <span className="font-mono">{project.slug}</span>
- </p>
+ <div className="ns-app-narrow">
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">Settings</h1>
+ <p className="ns-page-sub">
+ Manage <b>{project.display_name}</b> — name, slug, and the danger
+ zone.
+ </p>
+ </div>
</header>
- <ProjectRenameCard
- currentSlug={project.slug}
- currentDisplayName={project.display_name}
- />
+ <section>
+ <h2 className="ns-h2">
+ <span>General</span>
+ </h2>
+ <ProjectRenameCard
+ currentSlug={project.slug}
+ currentDisplayName={project.display_name}
+ />
+ </section>
+
+ <section>
+ <h2 className="ns-h2">
+ <span>Workspace details</span>
+ </h2>
+ <div className="ns-card">
+ <dl className="grid grid-cols-[auto_1fr] gap-x-6 gap-y-3 p-[18px]">
+ <dt className="text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ Display name
+ </dt>
+ <dd className="text-[13px] font-medium text-[hsl(var(--notfair-ink-2))]">
+ {project.display_name}
+ </dd>
+ <dt className="text-[12.5px] text-[hsl(var(--notfair-ink-4))]">URL slug</dt>
+ <dd>
+ <span className="ns-tag-mono">{project.slug}</span>
+ </dd>
+ <dt className="text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
+ AI agent runtime
+ </dt>
+ <dd className="text-[13px] text-[hsl(var(--notfair-ink-2))]">
+ {project.harness_adapter === "codex-local" ? "Codex" : "Claude Code"}
+ </dd>
+ </dl>
+ </div>
+ </section>
- <section className="space-y-2 pt-4">
- <h2 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
- Danger zone
+ <section>
+ <h2 className="ns-h2">
+ <span>Danger zone</span>
</h2>
<DangerZone projectSlug={project.slug} projectName={project.display_name} />
</section>
diff --git a/notfair-cmo/src/app/(app)/[project]/tasks/page.tsx b/notfair-cmo/src/app/(app)/[project]/tasks/page.tsx
index 001de6c2..fc13ed81 100644
--- a/notfair-cmo/src/app/(app)/[project]/tasks/page.tsx
+++ b/notfair-cmo/src/app/(app)/[project]/tasks/page.tsx
@@ -14,22 +14,21 @@ export default async function TasksPage({
const project = getProject(slug);
if (!project || project.archived_at) notFound();
- // listTasks returns DESC by created_at; the board re-sorts where needed
- // (list view is updated_at desc; kanban keeps insertion order within
- // a column, which matches "newest at top").
const [tasks, agents] = await Promise.all([
Promise.resolve(listTasks(project.slug)),
listProjectAgents(project.slug),
]);
return (
- <div className="mx-auto max-w-6xl space-y-6">
- <header>
- <h1 className="text-2xl font-semibold tracking-tight">Tasks</h1>
- <p className="text-sm text-muted-foreground">
- {tasks.length} {tasks.length === 1 ? "task" : "tasks"} · CMO and
- specialist agents create tasks here as they delegate work.
- </p>
+ <div className="ns-app-wide">
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">Tasks</h1>
+ <p className="ns-page-sub">
+ <b>{tasks.length}</b> {tasks.length === 1 ? "task" : "tasks"} ·
+ CMO and specialists create work here as they delegate.
+ </p>
+ </div>
</header>
<TasksBoard projectSlug={project.slug} tasks={tasks} agents={agents} />
diff --git a/notfair-cmo/src/app/(app)/layout.tsx b/notfair-cmo/src/app/(app)/layout.tsx
index d4327f1c..2afd5de8 100644
--- a/notfair-cmo/src/app/(app)/layout.tsx
+++ b/notfair-cmo/src/app/(app)/layout.tsx
@@ -40,7 +40,7 @@ export default async function AppLayout({ children }: { children: React.ReactNod
<a href="#main-content" className="sr-only focus:not-sr-only">
Skip to content
</a>
- <main id="main-content" className="relative flex-1 p-6">
+ <main id="main-content" className="relative flex-1">
{children}
</main>
</SidebarInset>
diff --git a/notfair-cmo/src/app/(app)/projects/page.tsx b/notfair-cmo/src/app/(app)/projects/page.tsx
index 34621ade..805fd3d3 100644
--- a/notfair-cmo/src/app/(app)/projects/page.tsx
+++ b/notfair-cmo/src/app/(app)/projects/page.tsx
@@ -1,49 +1,83 @@
import Link from "next/link";
-import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
-import { Button } from "@/components/ui/button";
-import { Badge } from "@/components/ui/badge";
+import { Archive } from "lucide-react";
import { listProjects } from "@/server/db/projects";
+function initials(name: string): string {
+ const parts = name.trim().split(/\s+/).filter(Boolean);
+ if (parts.length >= 2) return (parts[0]![0]! + parts[1]![0]!).toUpperCase();
+ return name.slice(0, 2).toUpperCase();
+}
+
export default function ProjectsListPage() {
const projects = listProjects({ includeArchived: true });
return (
- <div className="space-y-4">
- <div className="flex items-baseline justify-between">
- <div>
- <h1 className="text-2xl font-semibold tracking-tight">Workspaces</h1>
- <p className="text-sm text-muted-foreground">{projects.length} total</p>
+ <div className="ns-app-narrow">
+ <header className="ns-page-head">
+ <div className="ns-page-head-stack">
+ <h1 className="ns-page-title">Workspaces</h1>
+ <p className="ns-page-sub">
+ <b>{projects.length}</b>{" "}
+ {projects.length === 1 ? "workspace" : "workspaces"} on this
+ machine.
+ </p>
+ </div>
+ <div className="ns-page-actions">
+ <Link href="/onboarding" className="ns-btn ns-btn-primary">
+ New workspace
+ </Link>
</div>
- <Button asChild>
- <Link href="/onboarding">New workspace</Link>
- </Button>
- </div>
+ </header>
{projects.length === 0 ? (
- <Card>
- <CardContent className="py-12 text-center text-sm text-muted-foreground">
- No workspaces yet.{" "}
- <Link className="underline" href="/onboarding">
- Create your first one
- </Link>
- .
- </CardContent>
- </Card>
+ <div className="ns-empty">
+ <p className="ns-empty-title">No workspaces yet.</p>
+ <p className="ns-empty-sub">
+ Create your first workspace to get started.
+ </p>
+ <Link
+ href="/onboarding"
+ className="ns-btn ns-btn-primary ns-empty-action"
+ >
+ Create workspace
+ </Link>
+ </div>
) : (
- <div className="grid gap-3">
+ <ol className="ns-group">
{projects.map((p) => (
- <Card key={p.slug}>
- <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
- <CardTitle className="text-base">{p.display_name}</CardTitle>
- {p.archived_at && <Badge variant="outline">archived</Badge>}
- </CardHeader>
- <CardContent className="flex items-center justify-between pt-0 text-xs text-muted-foreground">
- <span className="font-mono">{p.slug}</span>
- <span>Created {new Date(p.created_at).toLocaleDateString()}</span>
- </CardContent>
- </Card>
+ <li key={p.slug}>
+ <Link href={`/${p.slug}`} className="ns-row-button">
+ <span
+ aria-hidden
+ className="grid size-[38px] shrink-0 place-items-center rounded-[9px] bg-[hsl(var(--notfair-accent-soft))] text-[13px] font-semibold tracking-tight text-[hsl(var(--notfair-accent))]"
+ >
+ {initials(p.display_name)}
+ </span>
+ <span className="ns-row-body">
+ <span className="ns-row-title-row">
+ <span className="ns-row-title">{p.display_name}</span>
+ {p.archived_at && (
+ <span className="ns-tag inline-flex items-center gap-1">
+ <Archive className="size-3" />
+ archived
+ </span>
+ )}
+ </span>
+ <span className="ns-row-desc block">
+ <span className="font-mono">{p.slug}</span>
+ {" · Created "}
+ {new Date(p.created_at).toLocaleDateString()}
+ </span>
+ </span>
+ <span className="ns-row-meta">
+ <span className="chev" aria-hidden>
+ ›
+ </span>
+ </span>
+ </Link>
+ </li>
))}
- </div>
+ </ol>
)}
</div>
);
diff --git a/notfair-cmo/src/app/globals.css b/notfair-cmo/src/app/globals.css
index d6d1ff67..de38ceee 100644
--- a/notfair-cmo/src/app/globals.css
+++ b/notfair-cmo/src/app/globals.css
@@ -252,20 +252,23 @@
font-size: 12px; font-weight: 500; letter-spacing: -0.005em;
}
- /* Grouped list — single rounded container, hairline dividers. */
+ /* Grouped list — single rounded container, hairline dividers.
+ Dividers live on the container's direct children, not on the tile
+ itself, so wrappers like `<li>` don't break the :last-child rule. */
.ns-list {
@apply flex flex-col bg-card rounded-[14px] overflow-hidden;
margin-top: 20px;
box-shadow: var(--notfair-shadow);
}
+ .ns-list > * + * {
+ border-top: 1px solid hsl(var(--border));
+ }
.ns-tile {
@apply flex items-center gap-3 bg-card border-0 cursor-pointer transition-colors;
padding: 12px 16px;
- border-bottom: 0.5px solid hsl(var(--border));
text-align: left;
width: 100%;
}
- .ns-tile:last-child { border-bottom: 0; }
.ns-tile:hover { background: #FAFAFC; }
.ns-tile:disabled { cursor: not-allowed; opacity: 0.6; }
.ns-tile-glyph {
@@ -421,4 +424,366 @@
padding-left: 12px;
border-left: 0.5px solid hsl(var(--notfair-border-strong));
}
+
+ /* ── App-shell tokens (every authenticated page) ─────────────────
+ The onboarding `.ns-page` is intentionally compact (720px). The
+ app shell wants more breathing room — Apple settings + product
+ pages are wide but never edge-to-edge. */
+
+ /* Page wrappers. The narrow variant matches Settings / Approvals;
+ the wide one is the default for product surfaces (Home, Tasks,
+ Crons, Activity, Connections, Agents). */
+ .ns-app {
+ margin-inline: auto; width: 100%;
+ padding: 32px 28px 96px;
+ }
+ .ns-app-narrow {
+ margin-inline: auto; width: 100%;
+ padding: 32px 28px 96px;
+ max-width: 720px;
+ }
+ .ns-app-wide {
+ margin-inline: auto; width: 100%;
+ padding: 32px 28px 96px;
+ max-width: 1100px;
+ }
+
+ /* Page header — left-aligned title + meta, right-aligned actions.
+ Apple's settings-page convention: large h1, quiet meta line, no
+ decorative chrome. Action lives in the right slot. */
+ .ns-page-head {
+ @apply flex items-start justify-between gap-6;
+ margin-bottom: 28px;
+ }
+ .ns-page-head-stack { @apply min-w-0; }
+ .ns-page-title {
+ @apply text-foreground m-0;
+ font-size: 28px; line-height: 1.15; font-weight: 600;
+ letter-spacing: -0.026em;
+ }
+ .ns-page-sub {
+ color: hsl(var(--notfair-ink-4));
+ font-size: 13.5px; line-height: 1.45; letter-spacing: -0.006em;
+ margin: 6px 0 0;
+ }
+ .ns-page-sub b { color: hsl(var(--notfair-ink-2)); font-weight: 500; }
+ .ns-page-actions { @apply flex shrink-0 items-center gap-2; }
+
+ /* Section heading inside a page (above a grouped list). Apple
+ uses small, semibold caps for these, not mono uppercase. */
+ .ns-h2 {
+ @apply flex items-baseline justify-between gap-3 m-0;
+ font-size: 13px; font-weight: 600; letter-spacing: -0.012em;
+ color: hsl(var(--notfair-ink-2));
+ margin-top: 32px; margin-bottom: 10px;
+ }
+ .ns-h2 .ns-h2-meta {
+ color: hsl(var(--notfair-ink-4));
+ font-size: 12px; font-weight: 400; letter-spacing: -0.005em;
+ }
+
+ /* Apple-grouped list (app-scope variant of .ns-list — same shape,
+ no auto top-margin so it can sit directly under a section head).
+ Dividers are drawn between direct children rather than as a
+ row-level :last-child rule — `<article class="ns-row">` is often
+ wrapped in `<li>`, so :last-child on the article matches every
+ row and would suppress the divider on all of them. The
+ `> * + *` border-top is structural and works regardless of the
+ wrapping element. */
+ .ns-group {
+ @apply flex flex-col bg-card rounded-[14px] overflow-hidden;
+ box-shadow: var(--notfair-shadow);
+ }
+ .ns-group > * + * {
+ border-top: 1px solid hsl(var(--border));
+ }
+ .ns-row {
+ @apply flex items-center gap-3 bg-card;
+ padding: 14px 18px;
+ text-align: left;
+ }
+ .ns-row-button {
+ @apply flex items-center gap-3 w-full cursor-pointer transition-colors;
+ padding: 14px 18px;
+ text-align: left;
+ border: 0;
+ background: transparent;
+ }
+ .ns-row-button:hover { background: #FAFAFC; }
+ .ns-row-button:disabled { cursor: not-allowed; opacity: 0.55; }
+
+ /* Glyph tile next to a row's title — 38px iOS-app-icon shape. */
+ .ns-glyph {
+ @apply grid place-items-center flex-shrink-0 font-semibold uppercase;
+ width: 38px; height: 38px; border-radius: 9px;
+ background: hsl(var(--notfair-surface-2));
+ color: hsl(var(--notfair-ink-2));
+ font-size: 14.5px; letter-spacing: -0.018em;
+ }
+ .ns-glyph-sm {
+ @apply grid place-items-center flex-shrink-0 font-semibold uppercase;
+ width: 30px; height: 30px; border-radius: 7px;
+ background: hsl(var(--notfair-surface-2));
+ color: hsl(var(--notfair-ink-2));
+ font-size: 12.5px; letter-spacing: -0.018em;
+ }
+ .ns-glyph-accent {
+ background: hsl(var(--notfair-accent-soft));
+ color: hsl(var(--notfair-accent));
+ }
+
+ /* Row body — title + description stacked. */
+ .ns-row-body { @apply min-w-0 flex-1; }
+ .ns-row-title {
+ @apply text-foreground m-0;
+ font-size: 14.5px; font-weight: 500; letter-spacing: -0.012em;
+ line-height: 1.3;
+ }
+ .ns-row-desc {
+ color: hsl(var(--notfair-ink-4));
+ font-size: 12.5px; line-height: 1.4; letter-spacing: -0.003em;
+ margin: 2px 0 0;
+ }
+ .ns-row-title-row {
+ @apply flex flex-wrap items-baseline gap-x-2 gap-y-1;
+ }
+
+ /* Right-side meta / action column. */
+ .ns-row-meta {
+ @apply flex shrink-0 items-center;
+ gap: 10px;
+ color: hsl(var(--notfair-ink-4));
+ font-size: 12.5px; font-weight: 500; letter-spacing: -0.005em;
+ }
+ .ns-row-meta .chev {
+ font-size: 18px; font-weight: 300; line-height: 1;
+ color: hsl(var(--notfair-ink-4));
+ }
+
+ /* Quiet metadata pill (used to label IDs, slugs, role names without
+ stealing focus). Soft surface, no border. Apple's "tag" look. */
+ .ns-tag {
+ @apply inline-flex items-center;
+ background: hsl(var(--notfair-surface-2));
+ color: hsl(var(--notfair-ink-3));
+ font-size: 11.5px; font-weight: 500; letter-spacing: -0.002em;
+ line-height: 1; padding: 4px 9px; border-radius: 6px;
+ }
+ .ns-tag-mono {
+ @apply inline-flex items-center font-mono;
+ background: hsl(var(--notfair-surface-2));
+ color: hsl(var(--notfair-ink-3));
+ font-size: 11px; font-weight: 500; letter-spacing: 0;
+ line-height: 1; padding: 4px 9px; border-radius: 6px;
+ }
+ .ns-tag-accent {
+ background: hsl(var(--notfair-accent-soft));
+ color: hsl(var(--notfair-accent));
+ }
+ .ns-tag-amber {
+ background: hsl(38 92% 95%);
+ color: hsl(28 76% 38%);
+ }
+ .ns-tag-red {
+ background: hsl(0 92% 96%);
+ color: hsl(0 72% 42%);
+ }
+
+ /* Status dot — small filled circle in semantic color. Pair with a
+ short label for inline status lines. */
+ .ns-dot {
+ display: inline-block; flex-shrink: 0;
+ width: 7px; height: 7px; border-radius: 50%;
+ background: hsl(var(--notfair-ink-4));
+ }
+ .ns-dot-on { background: hsl(var(--notfair-accent)); }
+ .ns-dot-warn { background: hsl(38 92% 50%); }
+ .ns-dot-err { background: hsl(0 72% 51%); }
+ .ns-dot-mute { background: hsl(var(--notfair-border-strong)); }
+
+ /* Pulsing live dot — for "running" / "live" indicators. */
+ .ns-dot-live {
+ background: hsl(var(--notfair-accent));
+ box-shadow: 0 0 0 0 hsl(var(--notfair-accent) / 0.45);
+ animation: ns-pulse 1.8s ease-out infinite;
+ }
+ @keyframes ns-pulse {
+ 0% { box-shadow: 0 0 0 0 hsl(var(--notfair-accent) / 0.45); }
+ 70% { box-shadow: 0 0 0 6px hsl(var(--notfair-accent) / 0); }
+ 100% { box-shadow: 0 0 0 0 hsl(var(--notfair-accent) / 0); }
+ }
+
+ /* Tabs — Apple "underline only" pattern. Quiet, lightweight; the
+ active tab gets a thin accent rule and ink-1 text. */
+ .ns-tabs {
+ @apply flex items-center gap-1;
+ border-bottom: 0.5px solid hsl(var(--border));
+ }
+ .ns-tab {
+ @apply relative inline-flex items-center gap-1.5 cursor-pointer;
+ padding: 9px 14px;
+ color: hsl(var(--notfair-ink-4));
+ font-size: 13px; font-weight: 500; letter-spacing: -0.006em;
+ background: transparent; border: 0;
+ transition: color 0.15s ease;
+ }
+ .ns-tab:hover { color: hsl(var(--notfair-ink-2)); }
+ .ns-tab[data-active="true"],
+ .ns-tab[aria-selected="true"] {
+ color: hsl(var(--notfair-ink));
+ }
+ .ns-tab[data-active="true"]::after,
+ .ns-tab[aria-selected="true"]::after {
+ content: ""; position: absolute; left: 10px; right: 10px;
+ bottom: -0.5px; height: 1.5px; border-radius: 1px;
+ background: hsl(var(--notfair-ink));
+ }
+ /* Accent variant for the in-task surface: chat/transcript/etc. */
+ .ns-tab.is-accent[data-active="true"]::after,
+ .ns-tab.is-accent[aria-selected="true"]::after {
+ background: hsl(var(--notfair-accent));
+ }
+
+ /* KPI card — small surface with quiet label + large metric. */
+ .ns-kpi {
+ @apply block bg-card rounded-[14px] transition-colors;
+ padding: 16px 18px;
+ box-shadow: var(--notfair-shadow-sm);
+ }
+ a.ns-kpi:hover, button.ns-kpi:hover { background: #FAFAFC; }
+ .ns-kpi-label {
+ color: hsl(var(--notfair-ink-4));
+ font-size: 12px; font-weight: 500; letter-spacing: -0.005em;
+ margin: 0 0 6px;
+ }
+ .ns-kpi-value {
+ @apply text-foreground m-0 tabular-nums;
+ font-size: 26px; font-weight: 600; letter-spacing: -0.024em;
+ line-height: 1.1;
+ }
+ .ns-kpi-hint {
+ color: hsl(var(--notfair-ink-4));
+ font-size: 11.5px; line-height: 1.4; letter-spacing: -0.003em;
+ margin: 6px 0 0;
+ }
+
+ /* Empty state — for sections that need a no-results placeholder. */
+ .ns-empty {
+ @apply flex flex-col items-center justify-center text-center bg-card rounded-[14px];
+ padding: 48px 24px;
+ box-shadow: var(--notfair-shadow-sm);
+ }
+ .ns-empty-title {
+ @apply text-foreground m-0;
+ font-size: 15.5px; font-weight: 600; letter-spacing: -0.012em;
+ }
+ .ns-empty-sub {
+ color: hsl(var(--notfair-ink-4));
+ font-size: 13px; line-height: 1.5; letter-spacing: -0.005em;
+ margin: 6px 0 0; max-width: 380px;
+ }
+ .ns-empty .ns-empty-action { margin-top: 16px; }
+
+ /* Card — plain surface with shadow, used when grouped-list isn't
+ the right shape (e.g. forms, detail panes). */
+ .ns-card {
+ @apply bg-card rounded-[14px] overflow-hidden;
+ box-shadow: var(--notfair-shadow);
+ }
+ .ns-card-body { padding: 18px 22px; }
+
+ /* Inline action link — accent color, no chrome. Common in row metas. */
+ .ns-link {
+ color: hsl(var(--notfair-accent));
+ font-weight: 500;
+ text-decoration: none;
+ }
+ .ns-link:hover { text-decoration: underline; }
+
+ /* Secondary pill button — neutral surface, used alongside primary CTA. */
+ .ns-btn-secondary {
+ background: hsl(var(--notfair-surface-2));
+ color: hsl(var(--notfair-ink-2));
+ }
+ .ns-btn-secondary:hover { background: hsl(240 6% 90%); }
+
+ /* Outline pill — for low-emphasis actions next to a primary CTA. */
+ .ns-btn-outline {
+ background: hsl(var(--card));
+ color: hsl(var(--notfair-ink-2));
+ box-shadow: inset 0 0 0 0.5px hsl(var(--border));
+ }
+ .ns-btn-outline:hover { background: hsl(var(--notfair-surface-2)); }
+
+ /* Destructive pill — used in danger-zone buttons. */
+ .ns-btn-danger {
+ background: hsl(0 72% 51%); color: #fff;
+ }
+ .ns-btn-danger:hover { filter: brightness(0.94); }
+ .ns-btn-danger:disabled { opacity: 0.55; cursor: not-allowed; }
+
+ /* ── Sidebar (Apple-flavored override of shadcn sidebar) ─────────
+ The sidebar primitive's defaults are too dense and lean cool-grey.
+ These overrides give it Apple Settings rail feel: roomy padding,
+ softer ink, accent-tinted active row, fine hairlines. */
+ [data-sidebar="sidebar"] {
+ background: hsl(0 0% 99%);
+ border-color: hsl(var(--border));
+ }
+ [data-sidebar="header"] {
+ padding: 10px 8px;
+ border-bottom: 0.5px solid hsl(var(--border));
+ }
+ [data-sidebar="group-label"] {
+ font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
+ color: hsl(var(--notfair-ink-4));
+ text-transform: none;
+ padding-inline: 12px;
+ margin-top: 4px;
+ }
+ [data-sidebar="menu-button"] {
+ color: hsl(var(--notfair-ink-3));
+ font-weight: 500; font-size: 13px; letter-spacing: -0.008em;
+ border-radius: 8px; height: 32px;
+ transition: background-color 0.12s ease, color 0.12s ease;
+ }
+ [data-sidebar="menu-button"]:hover {
+ background: hsl(var(--notfair-surface-2));
+ color: hsl(var(--notfair-ink));
+ }
+ [data-sidebar="menu-button"][data-active="true"] {
+ background: hsl(var(--notfair-accent-soft));
+ color: hsl(var(--notfair-accent));
+ }
+ [data-sidebar="menu-button"][data-active="true"] svg {
+ color: hsl(var(--notfair-accent));
+ }
+ [data-sidebar="menu-button"] svg {
+ color: hsl(var(--notfair-ink-4));
+ }
+
+ /* App topbar — for in-app surfaces (separate from the wizard topbar). */
+ .ns-app-topbar {
+ @apply sticky top-0 z-30 flex items-center;
+ height: 44px;
+ background: rgba(245,245,247,0.78);
+ backdrop-filter: saturate(180%) blur(20px);
+ -webkit-backdrop-filter: saturate(180%) blur(20px);
+ border-bottom: 0.5px solid hsl(var(--border));
+ padding: 0 16px;
+ gap: 8px;
+ }
+ .ns-app-topbar-title {
+ color: hsl(var(--notfair-ink));
+ font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em;
+ }
+ .ns-app-topbar-sub {
+ color: hsl(var(--notfair-ink-4));
+ font-size: 12px; letter-spacing: -0.005em;
+ }
+ .ns-app-topbar-divider {
+ width: 0.5px; height: 18px;
+ background: hsl(var(--notfair-border-strong));
+ margin: 0 4px;
+ }
}
diff --git a/notfair-cmo/src/components/add-mcp-server-card.tsx b/notfair-cmo/src/components/add-mcp-server-card.tsx
index 12abd4fe..59d463ab 100644
--- a/notfair-cmo/src/components/add-mcp-server-card.tsx
+++ b/notfair-cmo/src/components/add-mcp-server-card.tsx
@@ -73,14 +73,10 @@ export function AddMcpServerMenu({
<DropdownMenu>
<DropdownMenuTrigger asChild>
{trigger ?? (
- <Button
- type="button"
- size="sm"
- className="h-9 gap-1.5 rounded-full px-4 shadow-sm"
- >
+ <button type="button" className="ns-btn ns-btn-primary">
<Plus className="size-3.5" />
Add server
- </Button>
+ </button>
)}
</DropdownMenuTrigger>
<DropdownMenuContent align={align} className="w-60">
diff --git a/notfair-cmo/src/components/agent-danger-zone.tsx b/notfair-cmo/src/components/agent-danger-zone.tsx
index 39e96bce..aa7612ad 100644
--- a/notfair-cmo/src/components/agent-danger-zone.tsx
+++ b/notfair-cmo/src/components/agent-danger-zone.tsx
@@ -88,26 +88,37 @@ export function AgentDangerZone({ agentId, agentDisplayName }: Props) {
return (
<>
- <div className="space-y-3 rounded-lg border border-destructive/40 bg-destructive/5 p-4">
- <div className="flex items-start gap-3">
- <AlertTriangle className="mt-0.5 size-4 shrink-0 text-destructive" />
+ <div
+ className="ns-card"
+ style={{
+ boxShadow:
+ "inset 0 0 0 0.5px hsl(0 72% 51% / 0.25), 0 1px 2px rgba(0,0,0,.04)",
+ }}
+ >
+ <div className="flex items-start gap-4 p-[18px]">
+ <span
+ aria-hidden
+ className="grid size-9 shrink-0 place-items-center rounded-[9px] bg-[hsl(0_92%_96%)] text-[hsl(0_72%_42%)]"
+ >
+ <AlertTriangle className="size-4" />
+ </span>
<div className="min-w-0 flex-1">
- <h3 className="text-sm font-semibold text-destructive">Delete this agent</h3>
- <p className="mt-0.5 text-xs text-muted-foreground">
- Removes the agent&rsquo;s workspace along with every chat thread and
- every scheduled job that targets it. This cannot be undone.
+ <h3 className="text-[14.5px] font-semibold tracking-tight text-[hsl(0_72%_42%)]">
+ Delete this agent
+ </h3>
+ <p className="mt-1 text-[12.5px] leading-snug text-[hsl(var(--notfair-ink-4))]">
+ Removes the agent&rsquo;s workspace along with every chat thread
+ and every scheduled job that targets it. This cannot be undone.
</p>
</div>
- <Button
+ <button
type="button"
- variant="destructive"
- size="sm"
onClick={() => setOpen(true)}
- className="shrink-0"
+ className="ns-btn ns-btn-danger ns-btn-sm shrink-0"
>
- <Trash2 className="mr-1.5 size-3.5" />
+ <Trash2 className="size-3.5" />
Delete agent
- </Button>
+ </button>
</div>
</div>
diff --git a/notfair-cmo/src/components/agent-mcp-blocker-card.tsx b/notfair-cmo/src/components/agent-mcp-blocker-card.tsx
index 17cf092b..c0fce784 100644
--- a/notfair-cmo/src/components/agent-mcp-blocker-card.tsx
+++ b/notfair-cmo/src/components/agent-mcp-blocker-card.tsx
@@ -1,14 +1,12 @@
import Link from "next/link";
import { Plug } from "lucide-react";
-import { Button } from "@/components/ui/button";
import { projectHref } from "@/lib/project-href";
import type { AgentMcpBlocker } from "@/server/onboarding/agent-mcp-blocker";
/**
- * Card rendered in place of the agent's chat/tasks UI when the agent's
- * template requires an MCP that isn't connected for this project. Server-
- * rendered — no client state. The "Connect now" button is just a link
- * into the Connections page where the existing OAuth flow takes over.
+ * Rendered when an agent's required MCP isn't connected for this project.
+ * Server-rendered — no client state. The "Connect" button is just a link
+ * into the Connections page where the OAuth flow takes over.
*/
export function AgentMcpBlockerCard({
projectSlug,
@@ -18,24 +16,30 @@ export function AgentMcpBlockerCard({
blocker: AgentMcpBlocker;
}) {
return (
- <div className="mx-auto flex h-full max-w-md flex-col items-center justify-center px-6 py-12 text-center">
- <div className="flex size-12 items-center justify-center rounded-full bg-muted">
- <Plug className="size-5 text-muted-foreground" aria-hidden />
+ <div className="mx-auto flex h-full max-w-[440px] flex-col items-center justify-center px-6 py-12 text-center">
+ <div
+ aria-hidden
+ className="grid size-14 place-items-center rounded-[14px] bg-[hsl(var(--notfair-accent-soft))] text-[hsl(var(--notfair-accent))]"
+ >
+ <Plug className="size-6" />
</div>
- <h1 className="mt-4 text-lg font-semibold tracking-tight">
- Connect {blocker.mcp_display_name} to use this agent
+ <h1 className="mt-5 text-[22px] font-semibold tracking-tight text-[hsl(var(--notfair-ink))]">
+ Connect {blocker.mcp_display_name}
</h1>
- <p className="mt-2 text-sm text-muted-foreground">
- The {blocker.agent_display_name} agent needs the{" "}
- {blocker.mcp_display_name} MCP before it can run. Connecting takes a
- single OAuth round-trip; we&rsquo;ll bring you back here when
- it&rsquo;s done.
+ <p className="mt-2 text-[14px] leading-relaxed text-[hsl(var(--notfair-ink-3))]">
+ The <b className="font-semibold text-[hsl(var(--notfair-ink-2))]">
+ {blocker.agent_display_name}
+ </b>{" "}
+ agent needs the {blocker.mcp_display_name} MCP before it can run.
+ Connecting takes a single OAuth round-trip; we&rsquo;ll bring you back
+ here when it&rsquo;s done.
</p>
- <Button asChild className="mt-6">
- <Link href={projectHref(projectSlug, "/connections")}>
- Connect {blocker.mcp_display_name}
- </Link>
- </Button>
+ <Link
+ href={projectHref(projectSlug, "/connections")}
+ className="ns-btn ns-btn-primary mt-6"
+ >
+ Connect {blocker.mcp_display_name}
+ </Link>
</div>
);
}
diff --git a/notfair-cmo/src/components/agent-nav.tsx b/notfair-cmo/src/components/agent-nav.tsx
index a3ea00c2..a3ca97d9 100644
--- a/notfair-cmo/src/components/agent-nav.tsx
+++ b/notfair-cmo/src/components/agent-nav.tsx
@@ -15,7 +15,6 @@ import {
SidebarMenuButton,
SidebarMenuItem,
} from "@/components/ui/sidebar";
-import { RunningDot } from "@/components/running-dot";
import type { AgentTemplateKey } from "@/server/agent-templates";
import { colorForRole } from "@/lib/agent-colors";
import { cn } from "@/lib/utils";
@@ -57,19 +56,14 @@ const TEMPLATE_ICONS: Record<AgentTemplateKey, LucideIcon> = {
export function AgentNav({ projectSlug, agents, inFlightCounts = {} }: Props) {
const pathname = usePathname();
- // Live counts override the server-side initial map so the badge
- // numbers update without a server re-render. Initial values keep
- // first paint correct.
const live = useLiveCounts();
const counts: Record<string, number> = { ...inFlightCounts, ...live.agents };
return (
<SidebarMenu>
{agents.map((a) => {
- // Every agent lands on Tasks now. The CMO's tasks are typically
- // its own first-turn work (onboarding audit, user-assigned planning
- // jobs); the work it delegates to specialists shows up in those
- // specialists' tabs. Chat tab is still one click away for free-form.
+ // Every agent lands on Tasks (its workspace) by default. Chat tab
+ // is one click away.
const href = projectHref(projectSlug, `/agents/${a.slug}/tasks`);
const agentBase = `/${projectSlug}/agents/${a.slug}`;
const isActive =
@@ -86,7 +80,7 @@ export function AgentNav({ projectSlug, agents, inFlightCounts = {} }: Props) {
{a.role_label && rolePalette && (
<span
className={cn(
- "ml-1 rounded-sm border px-1.5 py-[1px] text-[10px] font-medium leading-none",
+ "ml-1 rounded-[4px] border px-1.5 py-[1px] text-[9.5px] font-medium uppercase tracking-wide leading-none",
rolePalette.chip,
)}
>
@@ -94,9 +88,16 @@ export function AgentNav({ projectSlug, agents, inFlightCounts = {} }: Props) {
</span>
)}
{liveCount > 0 && (
- <span className="ml-auto inline-flex items-center gap-1.5">
- <RunningDot size="sm" aria-label={`${liveCount} running`} />
- <span className="text-[10px] font-medium tabular-nums text-sky-600 dark:text-sky-400">
+ <span
+ className="ml-auto inline-flex items-center gap-1.5"
+ role="status"
+ aria-label={`${liveCount} running`}
+ >
+ <span
+ aria-hidden
+ className="ns-dot ns-dot-live"
+ />
+ <span className="text-[10px] font-semibold tabular-nums text-[hsl(var(--notfair-accent))]">
{liveCount}
</span>
</span>
diff --git a/notfair-cmo/src/components/agent-rename-card.tsx b/notfair-cmo/src/components/agent-rename-card.tsx
index 2bf71cdc..e46ec85f 100644
--- a/notfair-cmo/src/components/agent-rename-card.tsx
+++ b/notfair-cmo/src/components/agent-rename-card.tsx
@@ -2,9 +2,8 @@
import { useEffect, useState, useTransition } from "react";
import { useRouter } from "next/navigation";
-import { Loader2, Pencil } from "lucide-react";
+import { Loader2 } from "lucide-react";
import { toast } from "sonner";
-import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import { cn } from "@/lib/utils";
import { slugify } from "@/lib/slug";
@@ -70,81 +69,91 @@ export function AgentRenameCard({
!pending && !slugError && trimmed.length > 0 && (nameChanged || slugChanged);
return (
- <div className="space-y-3 rounded-lg border bg-card p-4">
- <div className="flex items-start gap-3">
- <Pencil className="mt-0.5 size-4 shrink-0 text-muted-foreground" />
- <div className="min-w-0 flex-1">
- <h3 className="text-sm font-semibold">Rename this agent</h3>
- <p className="mt-0.5 text-xs text-muted-foreground">
+ <div className="ns-card">
+ <div className="space-y-3 p-[18px]">
+ <div>
+ <h3 className="text-[14.5px] font-semibold tracking-tight text-[hsl(var(--notfair-ink))]">
+ Rename this agent
+ </h3>
+ <p className="mt-1 text-[12.5px] leading-snug text-[hsl(var(--notfair-ink-4))]">
Changing the slug rewrites the URL, workspace path, sessions
location, and every cron name. Chat history and prompts come along.
</p>
</div>
- </div>
- <div className="space-y-2">
- <Label htmlFor="rename-display-name" className="text-xs">
- Display name
- </Label>
- <div
- className={cn(
- "flex h-9 items-stretch overflow-hidden rounded-md border bg-background text-sm shadow-sm focus-within:ring-1 focus-within:ring-ring",
- slugError && "border-destructive focus-within:ring-destructive",
- pending && "opacity-50",
- )}
- >
- <span
- className="flex select-none items-center border-r bg-muted/50 px-2.5 font-mono text-[12px] text-muted-foreground"
- aria-hidden
+ <div className="space-y-1.5">
+ <Label
+ htmlFor="rename-display-name"
+ className="text-[12px] font-medium text-[hsl(var(--notfair-ink-3))]"
>
- {projectSlug}-
- </span>
- <input
- id="rename-display-name"
- type="text"
- value={name}
- onChange={(e) => setName(e.target.value)}
- disabled={pending}
- className="flex-1 bg-transparent px-2 font-mono text-[13px] placeholder:text-muted-foreground/60 focus-visible:outline-none disabled:cursor-not-allowed"
- placeholder={currentSlug}
- aria-invalid={!!slugError}
- />
- </div>
- {slugError ? (
- <p className="text-[11px] text-destructive">Invalid name: {slugError}</p>
- ) : slugChanged ? (
- <p className="text-[11px] text-muted-foreground">
- Slug changes from{" "}
- <code className="rounded bg-muted px-1 font-mono">{currentSlug}</code>{" "}
- to{" "}
- <code className="rounded bg-muted px-1 font-mono">{derivedSlug}</code>
- . Full rename: clones into the new id, then deletes the old.
- </p>
- ) : (
- <p className="text-[11px] text-muted-foreground">
- Same slug — only the display name changes.
- </p>
- )}
- </div>
-
- <div className="flex justify-end">
- <Button
- type="button"
- size="sm"
- onClick={save}
- disabled={!canSave}
- >
- {pending ? (
- <>
- <Loader2 className="mr-1.5 size-3.5 animate-spin" />
- {slugChanged ? "Renaming…" : "Saving…"}
- </>
+ Display name
+ </Label>
+ <div
+ className={cn(
+ "flex h-9 items-stretch overflow-hidden rounded-lg border bg-background text-sm shadow-sm focus-within:ring-2 focus-within:ring-[hsl(var(--notfair-accent-border))]",
+ slugError && "border-destructive focus-within:ring-destructive",
+ pending && "opacity-50",
+ )}
+ >
+ <span
+ className="flex select-none items-center border-r bg-[hsl(var(--notfair-surface-2))] px-3 font-mono text-[12px] text-[hsl(var(--notfair-ink-4))]"
+ aria-hidden
+ >
+ {projectSlug}-
+ </span>
+ <input
+ id="rename-display-name"
+ type="text"
+ value={name}
+ onChange={(e) => setName(e.target.value)}
+ disabled={pending}
+ className="flex-1 bg-transparent px-3 font-mono text-[13px] placeholder:text-muted-foreground/60 focus-visible:outline-none disabled:cursor-not-allowed"
+ placeholder={currentSlug}
+ aria-invalid={!!slugError}
+ />
+ </div>
+ {slugError ? (
+ <p className="text-[11.5px] text-destructive">
+ Invalid name: {slugError}
+ </p>
) : slugChanged ? (
- "Rename agent"
+ <p className="text-[11.5px] text-[hsl(var(--notfair-ink-4))]">
+ Slug changes from{" "}
+ <code className="rounded bg-[hsl(var(--notfair-surface-2))] px-1.5 py-px font-mono text-[11px]">
+ {currentSlug}
+ </code>{" "}
+ to{" "}
+ <code className="rounded bg-[hsl(var(--notfair-accent-soft))] px-1.5 py-px font-mono text-[11px] text-[hsl(var(--notfair-accent))]">
+ {derivedSlug}
+ </code>
+ . Full rename: clones into the new id, then deletes the old.
+ </p>
) : (
- "Save name"
+ <p className="text-[11.5px] text-[hsl(var(--notfair-ink-4))]">
+ Same slug — only the display name changes.
+ </p>
)}
- </Button>
+ </div>
+
+ <div className="flex justify-end pt-1">
+ <button
+ type="button"
+ onClick={save}
+ disabled={!canSave}
+ className="ns-btn ns-btn-primary ns-btn-sm"
+ >
+ {pending ? (
+ <>
+ <Loader2 className="size-3.5 animate-spin" />
+ {slugChanged ? "Renaming…" : "Saving…"}
+ </>
+ ) : slugChanged ? (
+ "Rename agent"
+ ) : (
+ "Save name"
+ )}
+ </button>
+ </div>
</div>
</div>
);
diff --git a/notfair-cmo/src/components/agent-tabs.tsx b/notfair-cmo/src/components/agent-tabs.tsx
index eaeebf86..94a2ed6b 100644
--- a/notfair-cmo/src/components/agent-tabs.tsx
+++ b/notfair-cmo/src/components/agent-tabs.tsx
@@ -2,7 +2,14 @@
import Link from "next/link";
import { usePathname } from "next/navigation";
-import { MessageSquare, FileText, Sparkles, Clock, Settings, ListChecks } from "lucide-react";
+import {
+ MessageSquare,
+ FileText,
+ Sparkles,
+ Clock,
+ Settings,
+ ListChecks,
+} from "lucide-react";
import { cn } from "@/lib/utils";
type Tab = {
@@ -11,9 +18,7 @@ type Tab = {
icon: React.ComponentType<{ className?: string }>;
};
-// Tasks is the default landing surface for specialists (and the workspace
-// where the live transcript lives), so it leads. Chat is still available as
-// a free-form thread when the user wants to talk outside the task model.
+// Tasks leads — it's the agent's workspace where the live transcript sits.
const TABS: Tab[] = [
{ key: "tasks", label: "Tasks", icon: ListChecks },
{ key: "chat", label: "Chat", icon: MessageSquare },
@@ -35,8 +40,12 @@ export function AgentTabs({
return (
<nav
- className="flex items-center gap-1 border-b bg-background/60 px-4 backdrop-blur"
+ className="sticky top-0 z-20 flex items-center gap-1 border-b border-border/60 bg-[rgba(245,245,247,0.78)] px-4 backdrop-blur-md"
aria-label="Agent sections"
+ style={{
+ backdropFilter: "saturate(180%) blur(20px)",
+ WebkitBackdropFilter: "saturate(180%) blur(20px)",
+ }}
>
{TABS.map(({ key, label, icon: Icon }) => {
const href = `${base}/${key}`;
@@ -47,7 +56,7 @@ export function AgentTabs({
key={key}
href={href}
className={cn(
- "relative flex items-center gap-1.5 px-3 py-2 text-sm transition-colors",
+ "relative flex items-center gap-1.5 px-3 py-2 text-[13px] font-medium tracking-tight transition-colors",
isActive
? "text-foreground"
: "text-muted-foreground hover:text-foreground",
@@ -58,7 +67,7 @@ export function AgentTabs({
{isActive && (
<span
aria-hidden
- className="absolute inset-x-2 -bottom-px h-0.5 rounded-full bg-foreground"
+ className="absolute inset-x-2.5 -bottom-px h-[1.5px] rounded-full bg-[hsl(var(--notfair-accent))]"
/>
)}
</Link>
diff --git a/notfair-cmo/src/components/app-sidebar.tsx b/notfair-cmo/src/components/app-sidebar.tsx
index 4238fa72..38bfeec6 100644
--- a/notfair-cmo/src/components/app-sidebar.tsx
+++ b/notfair-cmo/src/components/app-sidebar.tsx
@@ -2,6 +2,7 @@ import Link from "next/link";
import {
Sidebar,
SidebarContent,
+ SidebarFooter,
SidebarGroup,
SidebarGroupContent,
SidebarGroupLabel,
@@ -11,6 +12,7 @@ import {
SidebarMenuItem,
SidebarTrigger,
} from "@/components/ui/sidebar";
+import { SidebarBrand } from "@/components/sidebar-brand";
import {
Home,
CheckCircle2,
@@ -43,7 +45,7 @@ const NAV: NavItem[] = [
{ href: "/tasks", label: "Tasks", icon: ListChecks },
{ href: "/crons", label: "Crons", icon: Clock },
{ href: "/activity", label: "Activity", icon: Activity },
- { href: "/connections", label: "MCP Connections", icon: Plug },
+ { href: "/connections", label: "Connections", icon: Plug },
{ href: "/settings", label: "Settings", icon: Settings },
];
@@ -51,18 +53,16 @@ export async function AppSidebar() {
const projects = listProjects();
const active = await getActiveProject();
const agentEntries = active ? await listProjectAgents(active.slug) : [];
- // In-flight counts + approvals badge are no longer computed here.
- // LiveCountsProvider (mounted at layout level) polls
- // /api/in-flight-counts client-side and pushes fresh numbers through
- // context. Sidebar's server-rendered structure stays stable so no
- // reconciliation thrash on every poll — only the badge nodes flip.
return (
<Sidebar collapsible="icon">
<SidebarHeader>
- {/* Project switcher + collapse toggle. Toggle stays visible in
- icon-collapsed mode so the user can always re-expand the rail. */}
+ {/* Brand mark + project switcher. The mark doubles as the expand
+ toggle when collapsed (SidebarBrand handles both modes);
+ SidebarTrigger only renders in the expanded state so the icon
+ rail isn't doubled up. */}
<div className="flex items-center gap-1">
+ <SidebarBrand homeHref={active ? projectHref(active.slug, "") : "/"} />
<div className="min-w-0 flex-1 group-data-[collapsible=icon]:hidden">
<SidebarMenu>
<SidebarMenuItem>
@@ -73,14 +73,14 @@ export async function AppSidebar() {
</SidebarMenuItem>
</SidebarMenu>
</div>
- <SidebarTrigger className="shrink-0" />
+ <SidebarTrigger className="shrink-0 group-data-[collapsible=icon]:hidden" />
</div>
</SidebarHeader>
<SidebarContent>
{active && (
<SidebarGroup>
- <SidebarGroupLabel>Agents</SidebarGroupLabel>
+ <SidebarGroupLabel>Team</SidebarGroupLabel>
<SidebarGroupContent>
<AgentNav
projectSlug={active.slug}
@@ -121,6 +121,16 @@ export async function AppSidebar() {
)}
</SidebarContent>
+ {active && (
+ <SidebarFooter className="border-t border-border/60 px-3 py-2 group-data-[collapsible=icon]:hidden">
+ <p className="text-[11px] leading-tight text-muted-foreground">
+ Local agents · running on{" "}
+ <span className="font-medium text-foreground">
+ {active.harness_adapter === "codex-local" ? "Codex" : "Claude Code"}
+ </span>
+ </p>
+ </SidebarFooter>
+ )}
</Sidebar>
);
}
diff --git a/notfair-cmo/src/components/approval-card.tsx b/notfair-cmo/src/components/approval-card.tsx
index 8cd0c80b..7c49af8b 100644
--- a/notfair-cmo/src/components/approval-card.tsx
+++ b/notfair-cmo/src/components/approval-card.tsx
@@ -3,8 +3,6 @@
import { useState, useTransition } from "react";
import { ShieldCheck } from "lucide-react";
import { Button } from "@/components/ui/button";
-import { Badge } from "@/components/ui/badge";
-import { Card, CardContent } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import {
Dialog,
@@ -31,15 +29,12 @@ const ACTION_TYPE_LABEL: Record<Approval["action_type"], string> = {
other: "Other",
};
-const STATUS_VARIANT: Record<
- Approval["status"],
- { label: string; variant: "default" | "secondary" | "outline" | "destructive" }
-> = {
- pending: { label: "Pending", variant: "default" },
- revision_requested: { label: "Revision requested", variant: "secondary" },
- approved: { label: "Approved", variant: "outline" },
- rejected: { label: "Rejected", variant: "destructive" },
- expired: { label: "Expired", variant: "outline" },
+const STATUS_TAG: Record<Approval["status"], { label: string; cls: string }> = {
+ pending: { label: "Pending", cls: "ns-tag-accent" },
+ revision_requested: { label: "Revision requested", cls: "ns-tag-amber" },
+ approved: { label: "Approved", cls: "ns-tag-accent" },
+ rejected: { label: "Rejected", cls: "ns-tag-red" },
+ expired: { label: "Expired", cls: "ns-tag" },
};
function formatUsd(n: number) {
@@ -68,7 +63,7 @@ export function ApprovalCard({ approval }: ApprovalCardProps) {
const actionable =
approval.status === "pending" || approval.status === "revision_requested";
- const statusBadge = STATUS_VARIANT[approval.status];
+ const statusTag = STATUS_TAG[approval.status];
function approve() {
start(async () => {
@@ -117,96 +112,93 @@ export function ApprovalCard({ approval }: ApprovalCardProps) {
return (
<>
- <Card
- className="overflow-hidden"
+ <article
+ className="ns-card"
role="region"
aria-label={approval.action_summary}
data-status={approval.status}
>
- <CardContent className="space-y-3 py-4">
- <div className="flex flex-wrap items-start justify-between gap-3">
- <div className="min-w-0 flex-1 space-y-1.5">
- <div className="flex flex-wrap items-center gap-1.5">
- <Badge variant="outline" className="text-[10px]">
- {ACTION_TYPE_LABEL[approval.action_type]}
- </Badge>
- <Badge variant={statusBadge.variant} className="text-[10px]">
- {statusBadge.label}
- </Badge>
- {approval.decided_by_kind === "policy" && (
- <Badge variant="outline" className="gap-1 text-[10px]">
- <ShieldCheck className="size-3" />
- Auto by policy
- </Badge>
- )}
- </div>
- <p className="text-sm font-medium leading-snug">
- {approval.action_summary}
- </p>
- <p className="text-xs text-muted-foreground">
- {approval.cost_estimate_usd > 0 && (
- <>
- Cost:{" "}
- <span className="font-medium">
- {formatUsd(approval.cost_estimate_usd)}
- </span>{" "}
- ·{" "}
- </>
- )}
- Agent <span className="font-mono">{approval.agent_id}</span> ·{" "}
- {timeAgo(approval.created_at)}
- </p>
- </div>
+ <div className="space-y-3 p-[18px]">
+ <div className="flex flex-wrap items-center gap-1.5">
+ <span className="ns-tag">{ACTION_TYPE_LABEL[approval.action_type]}</span>
+ <span className={statusTag.cls}>{statusTag.label}</span>
+ {approval.decided_by_kind === "policy" && (
+ <span className="ns-tag inline-flex items-center gap-1">
+ <ShieldCheck className="size-3" />
+ Auto by policy
+ </span>
+ )}
</div>
+ <p className="m-0 text-[14.5px] font-medium leading-snug text-[hsl(var(--notfair-ink))]">
+ {approval.action_summary}
+ </p>
+ <p className="m-0 text-[12px] text-[hsl(var(--notfair-ink-4))]">
+ {approval.cost_estimate_usd > 0 && (
+ <>
+ Cost:{" "}
+ <span className="font-medium text-[hsl(var(--notfair-ink-2))]">
+ {formatUsd(approval.cost_estimate_usd)}
+ </span>{" "}
+ ·{" "}
+ </>
+ )}
+ Agent <span className="font-mono">{approval.agent_id}</span> ·{" "}
+ {timeAgo(approval.created_at)}
+ </p>
- {/* Reasoning is shown inline (no toggle) when present — there's no
- separate Why? button to discover the rationale. */}
{approval.reasoning && (
- <p className="rounded-md bg-muted/40 p-3 text-xs leading-relaxed text-muted-foreground whitespace-pre-wrap">
+ <p className="m-0 whitespace-pre-wrap rounded-lg bg-[hsl(var(--notfair-surface-2))] p-3 text-[12.5px] leading-relaxed text-[hsl(var(--notfair-ink-3))]">
{approval.reasoning}
</p>
)}
{approval.decision_note && !actionable && (
- <div className="rounded-md border border-dashed border-border bg-muted/30 p-3 text-xs">
- <div className="text-[10px] uppercase tracking-wide text-muted-foreground">
+ <div className="rounded-lg border border-dashed border-border bg-[hsl(var(--notfair-surface-2))]/60 p-3 text-[12px]">
+ <div className="text-[10px] font-semibold uppercase tracking-wide text-[hsl(var(--notfair-ink-4))]">
Decision note
</div>
- <p className="mt-1 whitespace-pre-wrap leading-relaxed">
+ <p className="mt-1 whitespace-pre-wrap leading-relaxed text-[hsl(var(--notfair-ink-2))]">
{approval.decision_note}
</p>
</div>
)}
{actionable && (
- <div className="space-y-3">
+ <div className="space-y-3 pt-1">
<div className="flex flex-wrap gap-2">
- <Button size="sm" onClick={approve} disabled={pending}>
+ <button
+ type="button"
+ onClick={approve}
+ disabled={pending}
+ className="ns-btn ns-btn-primary ns-btn-sm"
+ >
Approve
- </Button>
- <Button
- size="sm"
- variant="outline"
+ </button>
+ <button
+ type="button"
onClick={() => setDenyOpen(true)}
disabled={pending}
+ className="ns-btn ns-btn-outline ns-btn-sm"
>
Deny
- </Button>
- <Button
- size="sm"
- variant="ghost"
+ </button>
+ <button
+ type="button"
onClick={() => setShowPolicyForm((s) => !s)}
disabled={pending}
+ className="ns-btn ns-btn-ghost ns-btn-sm"
>
<ShieldCheck className="size-3.5" />
Always approve
- </Button>
+ </button>
</div>
{showPolicyForm && (
- <div className="space-y-2 rounded-md border border-border bg-muted/40 p-3 text-xs">
- <p className="font-medium">Create auto-approval policy</p>
- <p className="text-muted-foreground">
+ <div className="space-y-2 rounded-lg border border-border bg-[hsl(var(--notfair-surface-2))]/60 p-3 text-[12px]">
+ <p className="m-0 font-semibold text-[hsl(var(--notfair-ink))]">
+ Create auto-approval policy
+ </p>
+ <p className="m-0 text-[hsl(var(--notfair-ink-4))]">
Future{" "}
<span className="font-mono">
{ACTION_TYPE_LABEL[approval.action_type]}
@@ -247,24 +239,29 @@ export function ApprovalCard({ approval }: ApprovalCardProps) {
/>
</label>
<div className="flex gap-2 pt-1">
- <Button size="sm" onClick={alwaysApprove} disabled={pending}>
+ <button
+ type="button"
+ onClick={alwaysApprove}
+ disabled={pending}
+ className="ns-btn ns-btn-primary ns-btn-sm"
+ >
Save policy
- </Button>
- <Button
- size="sm"
- variant="ghost"
+ </button>
+ <button
+ type="button"
onClick={() => setShowPolicyForm(false)}
disabled={pending}
+ className="ns-btn ns-btn-ghost ns-btn-sm"
>
Cancel
- </Button>
+ </button>
</div>
</div>
)}
</div>
)}
- </CardContent>
- </Card>
+ </div>
+ </article>
<Dialog open={denyOpen} onOpenChange={(open) => !pending && setDenyOpen(open)}>
<DialogContent>
diff --git a/notfair-cmo/src/components/builtin-mcp-card.tsx b/notfair-cmo/src/components/builtin-mcp-card.tsx
index 8e8be36b..02454c7f 100644
--- a/notfair-cmo/src/components/builtin-mcp-card.tsx
+++ b/notfair-cmo/src/components/builtin-mcp-card.tsx
@@ -1,17 +1,17 @@
"use client";
import { useState } from "react";
-import { Workflow, BookOpenText } from "lucide-react";
+import { Workflow } from "lucide-react";
-import { Button } from "@/components/ui/button";
import { McpToolsDialog } from "@/components/mcp-tools-dialog";
import type { ToolSummary } from "@/server/mcp-server/tool-summaries";
/**
* Row for an MCP that ships with notfair-cmo itself — no OAuth, no
- * connect/disconnect, always available to every agent. Visually
- * distinguished from external rows by an emerald-tinted icon tile and
- * a small "BUILT-IN" lozenge in place of a connection-state badge.
+ * connect/disconnect. Settings-row shaped to match McpCard. We drop
+ * the "Built-in" pill because the section heading and the metadata
+ * line ("self-hosted · 21 tools · no setup") already convey it; one
+ * label is enough.
*/
type Props = {
name: string;
@@ -24,47 +24,31 @@ export function BuiltinMcpCard({ name, description, tools }: Props) {
return (
<>
- <article className="flex items-center gap-4 px-5 py-4">
- <div className="flex size-10 shrink-0 items-center justify-center rounded-md bg-emerald-500/10 ring-1 ring-inset ring-emerald-500/25">
- <Workflow className="size-5 text-emerald-700 dark:text-emerald-400" />
- </div>
+ <article className="ns-row">
+ <span className="ns-glyph ns-glyph-accent" aria-hidden>
+ <Workflow className="size-[18px]" />
+ </span>
- <div className="min-w-0 flex-1">
- <div className="flex items-center gap-2">
- <h3 className="truncate text-sm font-medium tracking-tight">
- {name}
- </h3>
- <span className="inline-flex items-center gap-1.5 font-mono text-[10px] uppercase tracking-[0.14em] text-emerald-700 dark:text-emerald-400">
- <span
- className="size-1.5 rounded-full bg-emerald-500"
- aria-hidden
- />
- built-in
- </span>
- </div>
- <p className="mt-0.5 line-clamp-1 text-xs text-muted-foreground">
- {description}
- </p>
- <p className="mt-1 truncate font-mono text-[10.5px] text-muted-foreground/80">
+ <div className="ns-row-body">
+ <h3 className="ns-row-title">{name}</h3>
+ <p className="ns-row-desc line-clamp-1">{description}</p>
+ <p className="mt-1 truncate font-mono text-[10.5px] text-[hsl(var(--notfair-ink-4))]">
self-hosted
- <span className="mx-1.5 text-muted-foreground/40">·</span>
+ <span className="mx-1.5 opacity-50">·</span>
{tools.length} tool{tools.length === 1 ? "" : "s"}
- <span className="mx-1.5 text-muted-foreground/40">·</span>
+ <span className="mx-1.5 opacity-50">·</span>
no setup
</p>
</div>
- <div className="shrink-0">
- <Button
+ <div className="ns-row-meta">
+ <button
type="button"
- variant="outline"
- size="sm"
- className="h-8"
+ className="ns-btn ns-btn-outline ns-btn-sm"
onClick={() => setOpen(true)}
>
- <BookOpenText className="size-3.5" />
- Tools
- </Button>
+ View tools
+ </button>
</div>
</article>
diff --git a/notfair-cmo/src/components/danger-zone.tsx b/notfair-cmo/src/components/danger-zone.tsx
index dc091d23..a75d6eb7 100644
--- a/notfair-cmo/src/components/danger-zone.tsx
+++ b/notfair-cmo/src/components/danger-zone.tsx
@@ -64,7 +64,9 @@ export function DangerZone({ projectSlug, projectName }: Props) {
`${d.agents.length} agents, ${d.crons} crons removed.`,
);
} else {
- toast.success(`Deleted ${projectName}. ${d.agents.length} agents, ${d.crons} crons removed.`);
+ toast.success(
+ `Deleted ${projectName}. ${d.agents.length} agents, ${d.crons} crons removed.`,
+ );
}
setOpen(false);
router.push("/");
@@ -74,31 +76,42 @@ export function DangerZone({ projectSlug, projectName }: Props) {
return (
<>
- <div className="space-y-3 rounded-lg border border-destructive/40 bg-destructive/5 p-4">
- <div className="flex items-start gap-3">
- <AlertTriangle className="mt-0.5 size-4 shrink-0 text-destructive" />
+ <div
+ className="ns-card"
+ style={{
+ boxShadow:
+ "inset 0 0 0 0.5px hsl(0 72% 51% / 0.25), 0 1px 2px rgba(0,0,0,.04)",
+ }}
+ >
+ <div className="flex items-start gap-4 p-[18px]">
+ <span
+ aria-hidden
+ className="grid size-9 shrink-0 place-items-center rounded-[9px] bg-[hsl(0_92%_96%)] text-[hsl(0_72%_42%)]"
+ >
+ <AlertTriangle className="size-4" />
+ </span>
<div className="min-w-0 flex-1">
- <h3 className="text-sm font-semibold text-destructive">Delete this workspace</h3>
- <p className="mt-0.5 text-xs text-muted-foreground">
- Removes all agents created for this workspace, every scheduled cron job, and
- every thread of chat history. This cannot be undone.
+ <h3 className="text-[14.5px] font-semibold tracking-tight text-[hsl(0_72%_42%)]">
+ Delete this workspace
+ </h3>
+ <p className="mt-1 text-[12.5px] leading-snug text-[hsl(var(--notfair-ink-4))]">
+ Removes all agents, every scheduled cron job, and every thread of
+ chat history. This cannot be undone.
</p>
</div>
- <Button
+ <button
type="button"
- variant="destructive"
- size="sm"
onClick={() => setOpen(true)}
- className="shrink-0"
+ className="ns-btn ns-btn-danger ns-btn-sm shrink-0"
>
- <Trash2 className="mr-1.5 size-3.5" />
+ <Trash2 className="size-3.5" />
Delete workspace
- </Button>
+ </button>
</div>
</div>
<Dialog open={open} onOpenChange={setOpen}>
- <DialogContent className="max-w-md">
+ <DialogContent className="max-w-md rounded-2xl">
<DialogHeader>
<DialogTitle className="flex items-center gap-2 text-base">
<AlertTriangle className="size-4 text-destructive" />
@@ -116,12 +129,12 @@ export function DangerZone({ projectSlug, projectName }: Props) {
Counting what will be removed…
</div>
) : summaryError ? (
- <div className="rounded border border-destructive/40 bg-destructive/5 p-3 text-xs text-destructive">
+ <div className="rounded-lg border border-destructive/30 bg-destructive/5 p-3 text-xs text-destructive">
Could not load deletion summary: {summaryError}
</div>
) : summary ? (
<div className="space-y-3">
- <div className="grid grid-cols-4 divide-x rounded-lg border bg-card">
+ <div className="grid grid-cols-4 divide-x rounded-xl border border-border bg-card">
<Stat label="Agents" value={summary.totals.agents} />
<Stat label="Threads" value={summary.totals.threads} />
<Stat label="Crons" value={summary.totals.crons} />
@@ -132,7 +145,10 @@ export function DangerZone({ projectSlug, projectName }: Props) {
{summary.agents
.filter((a) => a.exists)
.map((a) => (
- <li key={a.agentId} className="flex items-center justify-between gap-2">
+ <li
+ key={a.agentId}
+ className="flex items-center justify-between gap-2"
+ >
<span>
{a.display_name}{" "}
<span className="font-mono text-[10px] text-muted-foreground">
@@ -185,9 +201,13 @@ export function DangerZone({ projectSlug, projectName }: Props) {
function Stat({ label, value }: { label: string; value: number }) {
return (
- <div className="px-3 py-2 text-center">
- <div className="text-lg font-semibold tabular-nums">{value}</div>
- <div className="text-[10px] uppercase tracking-wide text-muted-foreground">{label}</div>
+ <div className="px-3 py-2.5 text-center">
+ <div className="text-[18px] font-semibold tabular-nums tracking-tight">
+ {value}
+ </div>
+ <div className="mt-0.5 text-[10.5px] font-medium uppercase tracking-wide text-muted-foreground">
+ {label}
+ </div>
</div>
);
}
diff --git a/notfair-cmo/src/components/google-ads-mcp-banner.tsx b/notfair-cmo/src/components/google-ads-mcp-banner.tsx
index 34e68d18..baf2aa6d 100644
--- a/notfair-cmo/src/components/google-ads-mcp-banner.tsx
+++ b/notfair-cmo/src/components/google-ads-mcp-banner.tsx
@@ -3,7 +3,6 @@
import { useState } from "react";
import Link from "next/link";
import { Loader2, Plug, AlertTriangle } from "lucide-react";
-import { Button } from "@/components/ui/button";
import { toast } from "sonner";
import { startMcpConnect } from "@/server/actions/mcp";
import type { McpRuntimeStatus } from "@/server/mcp/state";
@@ -55,11 +54,11 @@ export function GoogleAdsMcpBanner({ status, projectSlug }: Props) {
return (
<div
- className="border-b bg-amber-50 px-6 py-3 dark:bg-amber-950/30"
+ className="border-b border-border/60 bg-[hsl(38_92%_97%)] px-6 py-3"
role="status"
>
<div className="mx-auto flex w-full max-w-3xl items-start gap-3">
- <div className="mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-md bg-amber-100 text-amber-900 dark:bg-amber-900/50 dark:text-amber-200">
+ <div className="mt-0.5 grid size-7 shrink-0 place-items-center rounded-[8px] bg-[hsl(38_92%_92%)] text-[hsl(28_76%_38%)]">
{isStale || isUnreachable ? (
<AlertTriangle className="size-4" />
) : (
@@ -67,25 +66,24 @@ export function GoogleAdsMcpBanner({ status, projectSlug }: Props) {
)}
</div>
<div className="min-w-0 flex-1">
- <div className="text-sm font-medium text-amber-900 dark:text-amber-100">
+ <div className="text-[13.5px] font-semibold tracking-tight text-[hsl(28_76%_28%)]">
{headline}
</div>
- <p className="mt-0.5 text-xs text-amber-900/80 dark:text-amber-100/80">
+ <p className="mt-0.5 text-[12px] text-[hsl(28_55%_36%)]">
{detail}{" "}
<Link
href={projectHref(projectSlug, "/connections")}
- className="underline underline-offset-2 hover:text-amber-900 dark:hover:text-amber-50"
+ className="underline underline-offset-2 hover:text-[hsl(28_76%_22%)]"
>
Manage connections
</Link>
</p>
</div>
- <Button
+ <button
type="button"
- size="sm"
onClick={onConnect}
disabled={busy}
- className="shrink-0"
+ className="ns-btn ns-btn-primary ns-btn-sm shrink-0"
>
{busy ? (
<Loader2 className="size-3.5 animate-spin" />
@@ -93,7 +91,7 @@ export function GoogleAdsMcpBanner({ status, projectSlug }: Props) {
<Plug className="size-3.5" />
)}
{action}
- </Button>
+ </button>
</div>
</div>
);
diff --git a/notfair-cmo/src/components/live-badge.tsx b/notfair-cmo/src/components/live-badge.tsx
index f55ed955..77e4f8cd 100644
--- a/notfair-cmo/src/components/live-badge.tsx
+++ b/notfair-cmo/src/components/live-badge.tsx
@@ -1,18 +1,21 @@
"use client";
-import { Badge } from "@/components/ui/badge";
import { useApprovalsBadge } from "./live-counts-context";
/**
* Live-updating approvals count badge. Reads from LiveCountsContext so
* the number refreshes without re-rendering the parent server component.
+ * Apple-styled: pill chip in brand-accent green, small and quiet.
*/
export function ApprovalsLiveBadge() {
const count = useApprovalsBadge();
if (count <= 0) return null;
return (
- <Badge variant="secondary" className="ml-auto h-5 px-1.5 text-[10px]">
+ <span
+ aria-label={`${count} pending approval${count === 1 ? "" : "s"}`}
+ className="ml-auto inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-[hsl(var(--notfair-accent))] px-1 text-[10px] font-semibold tabular-nums leading-none text-white"
+ >
{count}
- </Badge>
+ </span>
);
}
diff --git a/notfair-cmo/src/components/mcp-card.test.tsx b/notfair-cmo/src/components/mcp-card.test.tsx
index 12513fd1..ef9db103 100644
--- a/notfair-cmo/src/components/mcp-card.test.tsx
+++ b/notfair-cmo/src/components/mcp-card.test.tsx
@@ -88,10 +88,13 @@ describe("McpCard", () => {
expect(screen.getByText("notfair.co")).toBeInTheDocument();
});
- it("renders a 'connected' indicator with the verified time when connected", () => {
+ it("renders a 'connected' indicator and just the host when connected", () => {
render(<McpCard spec={spec} status={connected({ tools_count: null })} />);
expect(screen.getByText("connected")).toBeInTheDocument();
- expect(screen.getByText(/live · verified/)).toBeInTheDocument();
+ // The "connected" tag carries the live signal; the status line shows
+ // only the host so the row doesn't repeat itself.
+ expect(screen.getByText("notfair.co")).toBeInTheDocument();
+ expect(screen.queryByText(/verified/)).not.toBeInTheDocument();
});
it("shows a Disconnect button when connected and a Connect button otherwise", () => {
diff --git a/notfair-cmo/src/components/mcp-card.tsx b/notfair-cmo/src/components/mcp-card.tsx
index 05df61cc..6ed69e16 100644
--- a/notfair-cmo/src/components/mcp-card.tsx
+++ b/notfair-cmo/src/components/mcp-card.tsx
@@ -2,14 +2,7 @@
import { useState, useTransition } from "react";
import { useRouter } from "next/navigation";
-import {
- Plug,
- Loader2,
- Unplug,
- BookOpenText,
- Trash2,
-} from "lucide-react";
-import { Button } from "@/components/ui/button";
+import { Loader2, BookOpenText, Trash2, MoreHorizontal } from "lucide-react";
import { toast } from "sonner";
import {
startMcpConnect,
@@ -21,6 +14,12 @@ import type { McpSpec } from "@/server/mcp-catalog";
import type { McpRuntimeStatus } from "@/server/mcp/state";
import { McpToolsDialog } from "@/components/mcp-tools-dialog";
import { McpIcon } from "@/components/mcp-icon";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
type Props = {
spec: McpSpec;
@@ -28,10 +27,8 @@ type Props = {
};
/**
- * One row in the Connections list. Drops the outer Card border because
- * the parent `<ol>` provides a single shared container + dividers; this
- * keeps the visual rhythm of a refined editorial list rather than a
- * stack of disconnected boxes.
+ * One row in the Connections list — Apple-style settings row with
+ * brand glyph, name + status, and a primary connect/disconnect button.
*/
export function McpCard({ spec, status }: Props) {
const [pending, startTransition] = useTransition();
@@ -44,11 +41,6 @@ export function McpCard({ spec, status }: Props) {
async function onConnect() {
setBusy("connect");
try {
- // Carry the current connections-page URL through OAuth so the
- // callback lands the user back here. Without it, the callback
- // falls through to `/`, which bounces to the active project's
- // home — making it look like the connect flow "redirected to a
- // different project" when really it just lost the return target.
const return_to = window.location.pathname + window.location.search;
const result = await startMcpConnect({ mcp_key: spec.key, return_to });
if (!result.ok) {
@@ -56,8 +48,6 @@ export function McpCard({ spec, status }: Props) {
setBusy(null);
return;
}
- // Full-page navigation: the authorize URL is on a different origin
- // (the MCP issuer), so we can't push() into Next's router.
window.location.href = result.authorize_url;
} catch (err) {
toast.error(err instanceof Error ? err.message : String(err));
@@ -94,97 +84,87 @@ export function McpCard({ spec, status }: Props) {
}
const isBusy = busy !== null || pending;
- const canViewTools = status.state === "connected";
- // Every connector is removable now — presets get hidden per-project
- // via the hidden_mcp_preset_keys list; user rows get deleted. Either
- // way the card disappears from the connections list.
- const canRemove = true;
+ const isConnected = status.state === "connected";
return (
<>
- <article className="flex items-center gap-4 px-5 py-4 transition-colors hover:bg-muted/30">
+ <article className={`ns-row ${isConnected ? "is-connected" : ""}`}>
<McpIcon
resourceUrl={spec.resource_url}
alt={spec.display_name}
size="lg"
/>
- <div className="min-w-0 flex-1">
- <div className="flex items-center gap-2">
- <h3 className="truncate text-sm font-medium tracking-tight">
- {spec.display_name}
- </h3>
- <StatusDot status={status} />
+ <div className="ns-row-body">
+ <div className="ns-row-title-row">
+ <h3 className="ns-row-title">{spec.display_name}</h3>
+ <StatusLabel status={status} />
</div>
- <p className="mt-0.5 line-clamp-1 text-xs text-muted-foreground">
- {spec.description}
- </p>
+ <p className="ns-row-desc line-clamp-1">{spec.description}</p>
<StatusLine status={status} resourceUrl={spec.resource_url} />
</div>
- <div className="flex shrink-0 items-center gap-1.5">
- {canViewTools && (
- <Button
- type="button"
- variant="ghost"
- size="sm"
- className="h-8 px-2 text-xs text-muted-foreground hover:text-foreground"
- onClick={() => setToolsOpen(true)}
- >
- <BookOpenText className="size-3.5" />
- Tools
- </Button>
- )}
- {canRemove && (
- <Button
- type="button"
- variant="ghost"
- size="sm"
- className="h-8 px-2 text-xs text-muted-foreground hover:text-destructive"
- disabled={isBusy}
- onClick={onRemove}
- aria-label={`Remove ${spec.display_name}`}
- title="Remove server"
- >
- {busy === "remove" ? (
- <Loader2 className="size-3.5 animate-spin" />
- ) : (
- <Trash2 className="size-3.5" />
- )}
- </Button>
- )}
- {status.state === "connected" ? (
- <Button
+ <div className="ns-row-meta">
+ {isConnected ? (
+ <button
type="button"
- variant="outline"
- size="sm"
- className="h-8"
+ className="ns-btn ns-btn-outline ns-btn-sm"
disabled={isBusy}
onClick={onDisconnect}
>
{busy === "disconnect" ? (
<Loader2 className="size-3.5 animate-spin" />
- ) : (
- <Unplug className="size-3.5" />
- )}
+ ) : null}
Disconnect
- </Button>
+ </button>
) : (
- <Button
+ <button
type="button"
- size="sm"
- className="h-8"
+ className="ns-btn ns-btn-primary ns-btn-sm"
disabled={isBusy}
onClick={onConnect}
>
{busy === "connect" ? (
<Loader2 className="size-3.5 animate-spin" />
- ) : (
- <Plug className="size-3.5" />
- )}
+ ) : null}
{status.state === "stale_token" ? "Reconnect" : "Connect"}
- </Button>
+ </button>
)}
+
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <button
+ type="button"
+ className="grid size-7 place-items-center rounded-md text-[hsl(var(--notfair-ink-4))] transition-colors hover:bg-[hsl(var(--notfair-surface-2))] hover:text-[hsl(var(--notfair-ink-2))]"
+ aria-label={`More options for ${spec.display_name}`}
+ >
+ <MoreHorizontal className="size-4" />
+ </button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end" className="w-44 rounded-xl p-1">
+ {isConnected && (
+ <DropdownMenuItem
+ onSelect={() => setToolsOpen(true)}
+ className="gap-2 rounded-md px-2 py-1.5 text-[13px]"
+ >
+ <BookOpenText className="size-3.5 text-muted-foreground" />
+ View tools
+ </DropdownMenuItem>
+ )}
+ <DropdownMenuItem
+ onSelect={onRemove}
+ disabled={isBusy}
+ className="gap-2 rounded-md px-2 py-1.5 text-[13px] text-destructive focus:text-destructive"
+ >
+ {busy === "remove" ? (
+ <Loader2 className="size-3.5 animate-spin" />
+ ) : (
+ <Trash2 className="size-3.5" />
+ )}
+ Remove server
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
</div>
</article>
@@ -199,35 +179,34 @@ export function McpCard({ spec, status }: Props) {
);
}
-/**
- * Inline status indicator — a small filled dot next to the name. Color
- * carries the state, no background pill needed.
- */
-function StatusDot({ status }: { status: McpRuntimeStatus }) {
- const map: Record<McpRuntimeStatus["state"], { color: string; label: string }> =
- {
- connected: { color: "bg-emerald-500", label: "connected" },
- stale_token: { color: "bg-amber-500", label: "token expired" },
- unreachable: { color: "bg-destructive", label: "unreachable" },
- configured_no_token: { color: "bg-amber-500", label: "no token" },
- not_configured: { color: "bg-muted-foreground/40", label: "not connected" },
- };
- const { color, label } = map[status.state];
- return (
- <span
- className="inline-flex items-center gap-1.5 font-mono text-[10px] uppercase tracking-[0.14em] text-muted-foreground"
- role="status"
- >
- <span className={`size-1.5 rounded-full ${color}`} aria-hidden />
- {label}
- </span>
- );
+function StatusLabel({ status }: { status: McpRuntimeStatus }) {
+ // Labels are intentionally lowercase + terse — they read as a quiet
+ // status tag, not a sentence. Mirrors the tokens the tests assert on
+ // (`connected`, `no token`, `unreachable`, `token expired`).
+ if (status.state === "connected") {
+ return (
+ <span
+ className="inline-flex items-center gap-1.5 text-[12.5px] font-medium text-[hsl(var(--notfair-accent))]"
+ role="status"
+ >
+ <span aria-hidden className="ns-dot ns-dot-on" />
+ connected
+ </span>
+ );
+ }
+ const map: Record<
+ Exclude<McpRuntimeStatus["state"], "connected">,
+ { tone: string; label: string }
+ > = {
+ stale_token: { tone: "ns-tag-amber", label: "token expired" },
+ unreachable: { tone: "ns-tag-red", label: "unreachable" },
+ configured_no_token: { tone: "ns-tag-amber", label: "no token" },
+ not_configured: { tone: "ns-tag", label: "not connected" },
+ };
+ const { tone, label } = map[status.state];
+ return <span className={tone}>{label}</span>;
}
-/**
- * Bottom metadata line: brand host (mono small) plus connection-state
- * details (verified Xm ago, error blurb, etc.) separated by a thin dot.
- */
function StatusLine({
status,
resourceUrl,
@@ -244,11 +223,11 @@ function StatusLine({
})();
const detail = describeStatus(status);
return (
- <p className="mt-1 truncate font-mono text-[10.5px] text-muted-foreground/80">
+ <p className="mt-1 truncate font-mono text-[10.5px] text-[hsl(var(--notfair-ink-4))]">
<span>{host}</span>
{detail ? (
<>
- <span className="mx-1.5 text-muted-foreground/40">·</span>
+ <span className="mx-1.5 opacity-50">·</span>
<span>{detail}</span>
</>
) : null}
@@ -259,7 +238,10 @@ function StatusLine({
function describeStatus(status: McpRuntimeStatus): string | null {
switch (status.state) {
case "connected":
- return `live · verified ${timeAgo(status.last_checked_at)}`;
+ // The "connected" indicator next to the title already says
+ // everything the user needs at a glance. Show just the host on
+ // this line — no verified timestamp, no live label.
+ return null;
case "stale_token":
return `token rejected (HTTP ${status.http_status})`;
case "unreachable":
@@ -270,10 +252,3 @@ function describeStatus(status: McpRuntimeStatus): string | null {
return "one-click OAuth saves the token locally";
}
}
-
-function timeAgo(iso: string): string {
- const ms = Date.now() - new Date(iso).getTime();
- if (ms < 60_000) return "just now";
- if (ms < 3_600_000) return `${Math.floor(ms / 60_000)}m ago`;
- return `${Math.floor(ms / 3_600_000)}h ago`;
-}
diff --git a/notfair-cmo/src/components/new-chat-button.tsx b/notfair-cmo/src/components/new-chat-button.tsx
index 3dbcfd43..bb461cc8 100644
--- a/notfair-cmo/src/components/new-chat-button.tsx
+++ b/notfair-cmo/src/components/new-chat-button.tsx
@@ -3,7 +3,6 @@
import { useTransition } from "react";
import { useRouter } from "next/navigation";
import { Plus } from "lucide-react";
-import { Button } from "@/components/ui/button";
import { projectHref } from "@/lib/project-href";
type Props = {
@@ -12,10 +11,7 @@ type Props = {
};
/**
- * Discoverable "new chat" affordance next to the thread dropdown. Mints a
- * fresh UUID + routes to its chat URL — the dropdown's own "New thread"
- * item does the same, but having it as a top-level button surfaces the
- * action without an extra click into the menu.
+ * Discoverable "new chat" affordance next to the thread dropdown.
*/
export function NewChatButton({ projectSlug, agentSlug }: Props) {
const router = useRouter();
@@ -29,16 +25,16 @@ export function NewChatButton({ projectSlug, agentSlug }: Props) {
}
return (
- <Button
- variant="outline"
- size="sm"
+ <button
+ type="button"
onClick={newThread}
disabled={pending}
aria-label="New chat"
title="New chat"
+ className="ns-btn ns-btn-outline ns-btn-sm"
>
<Plus className="size-3.5" />
- <span className="ml-1">New chat</span>
- </Button>
+ <span>New chat</span>
+ </button>
);
}
diff --git a/notfair-cmo/src/components/project-rename-card.tsx b/notfair-cmo/src/components/project-rename-card.tsx
index 7df86324..b11e10b1 100644
--- a/notfair-cmo/src/components/project-rename-card.tsx
+++ b/notfair-cmo/src/components/project-rename-card.tsx
@@ -2,9 +2,8 @@
import { useEffect, useState, useTransition } from "react";
import { useRouter } from "next/navigation";
-import { Loader2, Pencil } from "lucide-react";
+import { Loader2 } from "lucide-react";
import { toast } from "sonner";
-import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import { cn } from "@/lib/utils";
import { slugify } from "@/lib/slug";
@@ -64,67 +63,81 @@ export function ProjectRenameCard({
!pending && !slugError && trimmed.length > 0 && (nameChanged || slugChanged);
return (
- <div className="space-y-3 rounded-lg border bg-card p-4">
- <div className="flex items-start gap-3">
- <Pencil className="mt-0.5 size-4 shrink-0 text-muted-foreground" />
- <div className="min-w-0 flex-1">
- <h3 className="text-sm font-semibold">Rename this workspace</h3>
- <p className="mt-0.5 text-xs text-muted-foreground">
- Changing the slug renames every agent in the workspace, rewrites all
- cron names, moves workspace dirs, relocates session JSONL files,
- and repoints DB rows.
+ <div className="ns-card">
+ <div className="space-y-3 p-[18px]">
+ <div>
+ <h3 className="text-[14.5px] font-semibold tracking-tight text-[hsl(var(--notfair-ink))]">
+ Rename this workspace
+ </h3>
+ <p className="mt-1 text-[12.5px] leading-snug text-[hsl(var(--notfair-ink-4))]">
+ Changing the slug renames every agent, rewrites cron names, moves
+ workspace dirs, and relocates session JSONL files.
</p>
</div>
- </div>
- <div className="space-y-2">
- <Label htmlFor="project-rename-name" className="text-xs">
- Display name
- </Label>
- <input
- id="project-rename-name"
- type="text"
- value={name}
- onChange={(e) => setName(e.target.value)}
- disabled={pending}
- className={cn(
- "h-9 w-full rounded-md border bg-background px-3 font-mono text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
- slugError && "border-destructive focus-visible:ring-destructive",
- pending && "opacity-50",
- )}
- aria-invalid={!!slugError}
- />
- {slugError ? (
- <p className="text-[11px] text-destructive">Invalid name: {slugError}</p>
- ) : slugChanged ? (
- <p className="text-[11px] text-muted-foreground">
- Slug changes from{" "}
- <code className="rounded bg-muted px-1 font-mono">{currentSlug}</code>{" "}
- to{" "}
- <code className="rounded bg-muted px-1 font-mono">{derivedSlug}</code>
- . Every agent will be cloned into the new workspace and the old one
- removed.
- </p>
- ) : (
- <p className="text-[11px] text-muted-foreground">
- Same slug — only the display name changes.
- </p>
- )}
- </div>
-
- <div className="flex justify-end">
- <Button type="button" size="sm" onClick={save} disabled={!canSave}>
- {pending ? (
- <>
- <Loader2 className="mr-1.5 size-3.5 animate-spin" />
- {slugChanged ? "Renaming…" : "Saving…"}
- </>
+ <div className="space-y-1.5">
+ <Label
+ htmlFor="project-rename-name"
+ className="text-[12px] font-medium text-[hsl(var(--notfair-ink-3))]"
+ >
+ Display name
+ </Label>
+ <input
+ id="project-rename-name"
+ type="text"
+ value={name}
+ onChange={(e) => setName(e.target.value)}
+ disabled={pending}
+ className={cn(
+ "h-9 w-full rounded-lg border bg-background px-3 text-[13.5px] tracking-tight shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--notfair-accent-border))]",
+ slugError && "border-destructive focus-visible:ring-destructive",
+ pending && "opacity-50",
+ )}
+ aria-invalid={!!slugError}
+ />
+ {slugError ? (
+ <p className="text-[11.5px] text-destructive">
+ Invalid name: {slugError}
+ </p>
) : slugChanged ? (
- "Rename workspace"
+ <p className="text-[11.5px] text-[hsl(var(--notfair-ink-4))]">
+ Slug changes from{" "}
+ <code className="rounded bg-[hsl(var(--notfair-surface-2))] px-1.5 py-px font-mono text-[11px]">
+ {currentSlug}
+ </code>{" "}
+ to{" "}
+ <code className="rounded bg-[hsl(var(--notfair-accent-soft))] px-1.5 py-px font-mono text-[11px] text-[hsl(var(--notfair-accent))]">
+ {derivedSlug}
+ </code>
+ . Every agent will be cloned to the new workspace and the old one
+ removed.
+ </p>
) : (
- "Save name"
+ <p className="text-[11.5px] text-[hsl(var(--notfair-ink-4))]">
+ Same slug — only the display name changes.
+ </p>
)}
- </Button>
+ </div>
+
+ <div className="flex justify-end pt-1">
+ <button
+ type="button"
+ onClick={save}
+ disabled={!canSave}
+ className="ns-btn ns-btn-primary ns-btn-sm"
+ >
+ {pending ? (
+ <>
+ <Loader2 className="size-3.5 animate-spin" />
+ {slugChanged ? "Renaming…" : "Saving…"}
+ </>
+ ) : slugChanged ? (
+ "Rename workspace"
+ ) : (
+ "Save name"
+ )}
+ </button>
+ </div>
</div>
</div>
);
diff --git a/notfair-cmo/src/components/project-switcher.tsx b/notfair-cmo/src/components/project-switcher.tsx
index 497a7c97..209dbef3 100644
--- a/notfair-cmo/src/components/project-switcher.tsx
+++ b/notfair-cmo/src/components/project-switcher.tsx
@@ -22,6 +22,14 @@ type Props = {
activeSlug: string | null;
};
+function initials(name: string): string {
+ // Apple-style 1-2 character app-icon letterform. Prefer first letters
+ // of two words; fall back to the first two characters.
+ const parts = name.trim().split(/\s+/).filter(Boolean);
+ if (parts.length >= 2) return (parts[0]![0]! + parts[1]![0]!).toUpperCase();
+ return name.slice(0, 2).toUpperCase();
+}
+
export function ProjectSwitcher({ projects, activeSlug }: Props) {
const router = useRouter();
const pathname = usePathname();
@@ -44,42 +52,69 @@ export function ProjectSwitcher({ projects, activeSlug }: Props) {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
- <SidebarMenuButton size="lg" className="data-[state=open]:bg-sidebar-accent">
- <div className="flex aspect-square size-8 items-center justify-center rounded-md bg-sidebar-primary text-sidebar-primary-foreground text-xs font-semibold">
- {(active?.display_name ?? "—").slice(0, 2).toUpperCase()}
- </div>
- <span className="flex-1 truncate text-left text-sm font-medium leading-tight">
+ <SidebarMenuButton
+ className="h-9 gap-2 px-1.5 data-[state=open]:bg-sidebar-accent"
+ >
+ <span
+ aria-hidden
+ className="grid size-6 shrink-0 place-items-center rounded-md bg-[hsl(var(--notfair-accent-soft))] text-[10px] font-semibold tracking-tight text-[hsl(var(--notfair-accent))]"
+ >
+ {active ? initials(active.display_name) : "—"}
+ </span>
+ <span className="min-w-0 flex-1 truncate text-left text-[13px] font-medium tracking-tight">
{active?.display_name ?? "No workspace"}
</span>
- <ChevronsUpDown className="ml-auto size-4" />
+ <ChevronsUpDown className="size-3.5 shrink-0 opacity-60" />
</SidebarMenuButton>
</DropdownMenuTrigger>
- <DropdownMenuContent align="start" className="w-64">
- <DropdownMenuLabel className="text-xs text-muted-foreground">
- Projects
+ <DropdownMenuContent align="start" sideOffset={6} className="w-64 rounded-xl p-1">
+ <DropdownMenuLabel className="px-2 pb-1 pt-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground">
+ Workspaces
</DropdownMenuLabel>
{projects.length === 0 && (
- <DropdownMenuItem disabled>No workspaces yet</DropdownMenuItem>
- )}
- {projects.map((p) => (
- <DropdownMenuItem
- key={p.slug}
- onSelect={() => pick(p.slug)}
- disabled={pending}
- className="gap-2"
- >
- <div className="flex aspect-square size-6 items-center justify-center rounded bg-muted text-[10px] font-semibold">
- {p.display_name.slice(0, 2).toUpperCase()}
- </div>
- <span className="flex-1 truncate">{p.display_name}</span>
- {p.slug === activeSlug && <Check className="size-4 text-muted-foreground" />}
+ <DropdownMenuItem disabled className="text-xs">
+ No workspaces yet
</DropdownMenuItem>
- ))}
+ )}
+ {projects.map((p) => {
+ const isActive = p.slug === activeSlug;
+ return (
+ <DropdownMenuItem
+ key={p.slug}
+ onSelect={() => pick(p.slug)}
+ disabled={pending}
+ className="gap-2 rounded-md px-2 py-1.5"
+ >
+ <span
+ aria-hidden
+ className={`grid size-6 shrink-0 place-items-center rounded-md text-[10px] font-semibold tracking-tight ${
+ isActive
+ ? "bg-[hsl(var(--notfair-accent-soft))] text-[hsl(var(--notfair-accent))]"
+ : "bg-[hsl(var(--notfair-surface-2))] text-[hsl(var(--notfair-ink-2))]"
+ }`}
+ >
+ {initials(p.display_name)}
+ </span>
+ <span className="min-w-0 flex-1 truncate text-[13px] font-medium">
+ {p.display_name}
+ </span>
+ {isActive && (
+ <Check
+ className="size-3.5 text-[hsl(var(--notfair-accent))]"
+ aria-hidden
+ />
+ )}
+ </DropdownMenuItem>
+ );
+ })}
<DropdownMenuSeparator />
- <DropdownMenuItem asChild>
- <a href="/onboarding" className="gap-2">
- <Plus className="size-4" />
- <span>New workspace</span>
+ <DropdownMenuItem asChild className="rounded-md px-2 py-1.5">
+ <a
+ href="/onboarding"
+ className="gap-2 text-[13px] font-medium text-[hsl(var(--notfair-accent))]"
+ >
+ <Plus className="size-3.5" />
+ New workspace
</a>
</DropdownMenuItem>
</DropdownMenuContent>
diff --git a/notfair-cmo/src/components/question-card.tsx b/notfair-cmo/src/components/question-card.tsx
index 095e1837..26af85f5 100644
--- a/notfair-cmo/src/components/question-card.tsx
+++ b/notfair-cmo/src/components/question-card.tsx
@@ -4,9 +4,6 @@ import { useState, useTransition } from "react";
import { MessageSquareQuote } from "lucide-react";
import { toast } from "sonner";
-import { Badge } from "@/components/ui/badge";
-import { Button } from "@/components/ui/button";
-import { Card, CardContent } from "@/components/ui/card";
import { cn } from "@/lib/utils";
import {
answerQuestionAction,
@@ -78,50 +75,40 @@ export function QuestionCard({ question, options }: QuestionCardProps) {
}
return (
- <Card
- className="overflow-hidden"
+ <article
+ className="ns-card"
role="region"
aria-label={question.prompt}
data-status={question.status}
>
- <CardContent className="space-y-3 py-4">
- <div className="flex flex-wrap items-start justify-between gap-3">
- <div className="min-w-0 flex-1 space-y-1.5">
- <div className="flex flex-wrap items-center gap-1.5">
- <Badge variant="outline" className="gap-1 text-[10px]">
- <MessageSquareQuote className="size-3" />
- Question
- </Badge>
- <Badge
- variant={actionable ? "default" : "outline"}
- className="text-[10px]"
- >
- {actionable
- ? "Needs answer"
- : question.status === "answered"
- ? "Answered"
- : "Dismissed"}
- </Badge>
- </div>
- <p className="text-sm font-medium leading-snug whitespace-pre-wrap">
- {question.prompt}
- </p>
- <p className="text-xs text-muted-foreground">
- Agent <span className="font-mono">{question.agent_id}</span> ·{" "}
- {timeAgo(question.created_at)}
- </p>
- </div>
+ <div className="space-y-3 p-[18px]">
+ <div className="flex flex-wrap items-center gap-1.5">
+ <span className="ns-tag inline-flex items-center gap-1">
+ <MessageSquareQuote className="size-3" />
+ Question
+ </span>
+ <span className={actionable ? "ns-tag-accent" : "ns-tag"}>
+ {actionable
+ ? "Needs answer"
+ : question.status === "answered"
+ ? "Answered"
+ : "Dismissed"}
+ </span>
</div>
+ <p className="m-0 whitespace-pre-wrap text-[14.5px] font-medium leading-snug text-[hsl(var(--notfair-ink))]">
+ {question.prompt}
+ </p>
+ <p className="m-0 text-[12px] text-[hsl(var(--notfair-ink-4))]">
+ Agent <span className="font-mono">{question.agent_id}</span> ·{" "}
+ {timeAgo(question.created_at)}
+ </p>
{!actionable && (
- <ResolvedAnswer
- question={question}
- options={options}
- />
+ <ResolvedAnswer question={question} options={options} />
)}
{actionable && (
- <div className="space-y-3">
+ <div className="space-y-3 pt-1">
{options.length > 0 && (
<div
className="grid gap-2"
@@ -141,10 +128,10 @@ export function QuestionCard({ question, options }: QuestionCardProps) {
}
disabled={pending}
className={cn(
- "w-full rounded-md border px-3 py-2 text-left text-sm transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
+ "w-full rounded-lg border px-3 py-2.5 text-left text-[13.5px] transition-colors outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--notfair-accent-border))] disabled:cursor-not-allowed disabled:opacity-50",
selected
- ? "border-sky-500/80 bg-sky-500/10 text-sky-950 dark:bg-sky-400/15 dark:text-sky-50"
- : "border-border/70 hover:border-sky-500/60 hover:bg-sky-500/5",
+ ? "border-[hsl(var(--notfair-accent-border))] bg-[hsl(var(--notfair-accent-soft))] text-[hsl(var(--notfair-ink))]"
+ : "border-border bg-card hover:border-[hsl(var(--notfair-accent-border))] hover:bg-[hsl(var(--notfair-accent-soft))]/40",
)}
>
{opt}
@@ -157,7 +144,7 @@ export function QuestionCard({ question, options }: QuestionCardProps) {
<div className="space-y-1.5">
<label
htmlFor={`q-${question.id}-text`}
- className="text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground"
+ className="text-[11px] font-semibold uppercase tracking-wide text-[hsl(var(--notfair-ink-4))]"
>
{options.length > 0 ? "Or add a comment" : "Your answer"}
</label>
@@ -172,27 +159,32 @@ export function QuestionCard({ question, options }: QuestionCardProps) {
: "Type your answer…"
}
disabled={pending}
- className="w-full resize-y rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50"
+ className="w-full resize-y rounded-lg border border-input bg-transparent px-3 py-2 text-[13.5px] shadow-sm outline-none placeholder:text-muted-foreground focus-visible:border-[hsl(var(--notfair-accent-border))] focus-visible:ring-2 focus-visible:ring-[hsl(var(--notfair-accent-border))] disabled:cursor-not-allowed disabled:opacity-50"
/>
</div>
<div className="flex flex-wrap gap-2">
- <Button size="sm" onClick={submit} disabled={pending || !canSubmit}>
+ <button
+ type="button"
+ onClick={submit}
+ disabled={pending || !canSubmit}
+ className="ns-btn ns-btn-primary ns-btn-sm"
+ >
Send answer
- </Button>
- <Button
- size="sm"
- variant="outline"
+ </button>
+ <button
+ type="button"
onClick={dismiss}
disabled={pending}
+ className="ns-btn ns-btn-outline ns-btn-sm"
>
Dismiss
- </Button>
+ </button>
</div>
</div>
)}
- </CardContent>
- </Card>
+ </div>
+ </article>
);
}
@@ -205,7 +197,7 @@ function ResolvedAnswer({
}) {
if (question.status === "cancelled") {
return (
- <p className="rounded-md border border-dashed border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground">
+ <p className="rounded-lg border border-dashed border-border bg-[hsl(var(--notfair-surface-2))]/60 px-3 py-2 text-[12.5px] text-[hsl(var(--notfair-ink-4))]">
Dismissed without answer.
</p>
);
@@ -216,25 +208,29 @@ function ResolvedAnswer({
: null;
const text = question.answer_text?.trim() || null;
return (
- <div className="rounded-md border border-dashed border-border bg-muted/30 p-3 text-xs">
- <div className="text-[10px] uppercase tracking-wide text-muted-foreground">
+ <div className="rounded-lg border border-dashed border-border bg-[hsl(var(--notfair-surface-2))]/60 p-3 text-[12.5px]">
+ <div className="text-[10.5px] font-semibold uppercase tracking-wide text-[hsl(var(--notfair-ink-4))]">
Answer
</div>
{chosen && (
- <p className="mt-1 font-medium leading-relaxed">{chosen}</p>
+ <p className="mt-1 font-medium leading-relaxed text-[hsl(var(--notfair-ink-2))]">
+ {chosen}
+ </p>
)}
{text && (
<p
className={cn(
"whitespace-pre-wrap leading-relaxed",
- chosen ? "mt-1 text-muted-foreground" : "mt-1",
+ chosen
+ ? "mt-1 text-[hsl(var(--notfair-ink-4))]"
+ : "mt-1 text-[hsl(var(--notfair-ink-2))]",
)}
>
{text}
</p>
)}
{!chosen && !text && (
- <p className="mt-1 italic text-muted-foreground">
+ <p className="mt-1 italic text-[hsl(var(--notfair-ink-4))]">
(empty answer)
</p>
)}
diff --git a/notfair-cmo/src/components/reprovision-button.tsx b/notfair-cmo/src/components/reprovision-button.tsx
index f0285564..e1fb203d 100644
--- a/notfair-cmo/src/components/reprovision-button.tsx
+++ b/notfair-cmo/src/components/reprovision-button.tsx
@@ -2,7 +2,6 @@
import { useTransition } from "react";
import { RotateCw } from "lucide-react";
-import { Button } from "@/components/ui/button";
import { toast } from "sonner";
type ReprovisionResult =
@@ -34,9 +33,14 @@ export function ReprovisionButton({ action }: Props) {
}
return (
- <Button variant="outline" size="sm" onClick={go} disabled={pending}>
- <RotateCw className={`mr-1.5 size-4 ${pending ? "animate-spin" : ""}`} />
- {pending ? "Provisioning..." : "Reprovision agents"}
- </Button>
+ <button
+ type="button"
+ onClick={go}
+ disabled={pending}
+ className="ns-btn ns-btn-outline ns-btn-sm"
+ >
+ <RotateCw className={`size-3.5 ${pending ? "animate-spin" : ""}`} />
+ {pending ? "Provisioning…" : "Reprovision agents"}
+ </button>
);
}
diff --git a/notfair-cmo/src/components/schedule-cron-dialog.tsx b/notfair-cmo/src/components/schedule-cron-dialog.tsx
index d87d6c65..4c166ddb 100644
--- a/notfair-cmo/src/components/schedule-cron-dialog.tsx
+++ b/notfair-cmo/src/components/schedule-cron-dialog.tsx
@@ -91,15 +91,18 @@ export function ScheduleCronDialog({ projectSlug, defaultSpecialist, variant = "
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>
{variant === "icon" ? (
- <Button size="sm" variant="outline">
+ <button
+ type="button"
+ className="ns-btn ns-btn-outline ns-btn-sm"
+ >
<Plus className="size-4" />
<span className="sr-only">Schedule recurring work</span>
- </Button>
+ </button>
) : (
- <Button size="sm">
- <Plus className="mr-1.5 size-4" />
+ <button type="button" className="ns-btn ns-btn-primary">
+ <Plus className="size-4" />
New cron
- </Button>
+ </button>
)}
</DialogTrigger>
<DialogContent className="max-w-lg">
diff --git a/notfair-cmo/src/components/sidebar-brand.tsx b/notfair-cmo/src/components/sidebar-brand.tsx
new file mode 100644
index 00000000..b1f37e0f
--- /dev/null
+++ b/notfair-cmo/src/components/sidebar-brand.tsx
@@ -0,0 +1,58 @@
+"use client";
+
+import Link from "next/link";
+import { PanelLeft } from "lucide-react";
+import { useSidebar } from "@/components/ui/sidebar";
+
+type Props = {
+ /** Where the brand link points when the sidebar is expanded. */
+ homeHref: string;
+};
+
+/**
+ * Brand mark in the sidebar header. Dual-purpose:
+ *
+ * - **Expanded:** a Link to the workspace home, anchoring the rail with
+ * Notfair identity. A separate SidebarTrigger collapses the rail.
+ * - **Collapsed:** becomes the expand toggle itself — clicking the mark
+ * re-opens the sidebar, and the small panel icon overlays on hover to
+ * signal the action. Saves a row of chrome in the icon rail.
+ */
+export function SidebarBrand({ homeHref }: Props) {
+ const { state, toggleSidebar } = useSidebar();
+ const collapsed = state === "collapsed";
+
+ if (collapsed) {
+ return (
+ <button
+ type="button"
+ onClick={toggleSidebar}
+ aria-label="Expand sidebar"
+ title="Expand sidebar"
+ className="group/brand relative flex h-8 w-full shrink-0 items-center justify-center rounded-md transition-colors hover:bg-[hsl(var(--notfair-surface-2))]"
+ >
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+ <img
+ src="/notfair-mark.svg"
+ alt="Notfair"
+ className="h-[18px] w-auto transition-opacity group-hover/brand:opacity-0"
+ />
+ <PanelLeft
+ aria-hidden
+ className="absolute size-4 text-[hsl(var(--notfair-ink-3))] opacity-0 transition-opacity group-hover/brand:opacity-100"
+ />
+ </button>
+ );
+ }
+
+ return (
+ <Link
+ href={homeHref}
+ aria-label="Notfair CMO home"
+ className="flex h-8 shrink-0 items-center px-2"
+ >
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+ <img src="/notfair-mark.svg" alt="Notfair" className="h-[18px] w-auto" />
+ </Link>
+ );
+}
diff --git a/notfair-cmo/src/components/skills-list.tsx b/notfair-cmo/src/components/skills-list.tsx
index c0914f91..72b2694b 100644
--- a/notfair-cmo/src/components/skills-list.tsx
+++ b/notfair-cmo/src/components/skills-list.tsx
@@ -1,4 +1,4 @@
-import { Badge } from "@/components/ui/badge";
+import { Sparkles } from "lucide-react";
import type { SkillEntry } from "@/server/agents/skills";
type Props = {
@@ -8,33 +8,38 @@ type Props = {
export function SkillsList({ skills }: Props) {
if (skills.length === 0) {
return (
- <div className="rounded-lg border bg-card py-10 text-center text-sm text-muted-foreground">
- No skills wired into this agent yet.
+ <div className="ns-empty">
+ <p className="ns-empty-title">No skills installed.</p>
+ <p className="ns-empty-sub">
+ Skills are reusable capabilities the agent picks up from this
+ workspace. Install one to extend what this agent can do.
+ </p>
</div>
);
}
return (
- <ul className="divide-y rounded-lg border bg-card">
+ <ol className="ns-group">
{skills.map((s) => (
- <li key={s.key} className="flex items-start gap-3 px-4 py-3">
- <div className="min-w-0 flex-1">
- <div className="flex flex-wrap items-center gap-2">
- <span className="font-mono text-sm">{s.name}</span>
- <Badge variant="secondary" className="h-4 px-1 text-[9px] uppercase tracking-wide">
- {s.scope}
- </Badge>
+ <li key={s.key} className="ns-row">
+ <span className="ns-glyph ns-glyph-sm" aria-hidden>
+ <Sparkles className="size-[14px] text-[hsl(var(--notfair-ink-2))]" />
+ </span>
+ <div className="ns-row-body">
+ <div className="ns-row-title-row">
+ <span className="ns-row-title font-mono">{s.name}</span>
+ <span className="ns-tag">{s.scope}</span>
</div>
{s.description && (
- <p className="mt-0.5 text-xs text-muted-foreground">{s.description}</p>
+ <p className="ns-row-desc">{s.description}</p>
)}
{s.source && (
- <p className="mt-1 truncate font-mono text-[10px] text-muted-foreground/70">
+ <p className="mt-1 truncate font-mono text-[10.5px] text-[hsl(var(--notfair-ink-4))]">
{s.source}
</p>
)}
</div>
</li>
))}
- </ul>
+ </ol>
);
}
diff --git a/notfair-cmo/src/components/start-all-tasks-button.tsx b/notfair-cmo/src/components/start-all-tasks-button.tsx
index 7d0835e6..063e3150 100644
--- a/notfair-cmo/src/components/start-all-tasks-button.tsx
+++ b/notfair-cmo/src/components/start-all-tasks-button.tsx
@@ -5,7 +5,6 @@ import { useRouter } from "next/navigation";
import { Loader2, Play } from "lucide-react";
import { toast } from "sonner";
-import { Button } from "@/components/ui/button";
import { startAllProposedTasksAction } from "@/server/actions/tasks";
/**
@@ -69,13 +68,18 @@ export function StartAllTasksButton({
: `Start all ${proposedCount} task${proposedCount === 1 ? "" : "s"}`;
return (
- <Button onClick={onClick} disabled={disabled} size="sm">
+ <button
+ type="button"
+ onClick={onClick}
+ disabled={disabled}
+ className="ns-btn ns-btn-primary ns-btn-sm"
+ >
{pending || polling ? (
- <Loader2 className="mr-1.5 size-3.5 animate-spin" />
+ <Loader2 className="size-3.5 animate-spin" />
) : (
- <Play className="mr-1.5 size-3.5" />
+ <Play className="size-3.5" />
)}
{label}
- </Button>
+ </button>
);
}
diff --git a/notfair-cmo/src/components/tasks-board.tsx b/notfair-cmo/src/components/tasks-board.tsx
index 35ac762d..625ac659 100644
--- a/notfair-cmo/src/components/tasks-board.tsx
+++ b/notfair-cmo/src/components/tasks-board.tsx
@@ -11,9 +11,6 @@ import {
X,
} from "lucide-react";
-import { Badge } from "@/components/ui/badge";
-import { Button } from "@/components/ui/button";
-import { Card, CardContent } from "@/components/ui/card";
import {
DropdownMenu,
DropdownMenuContent,
@@ -204,14 +201,13 @@ export function TasksBoard({ projectSlug, tasks, agents }: Props) {
return (
<div className="space-y-4">
{/* Toolbar */}
- <div className="flex flex-wrap items-center gap-2 border-b pb-3">
+ <div className="flex flex-wrap items-center gap-2 pb-3">
{/* Agent filter */}
<DropdownMenu>
<DropdownMenuTrigger asChild>
- <Button
- variant="outline"
- size="sm"
- className="h-8 gap-1.5 text-xs"
+ <button
+ type="button"
+ className="ns-btn ns-btn-outline ns-btn-sm"
>
<Users className="size-3.5" />
{prefs.agents.length === 0
@@ -219,7 +215,7 @@ export function TasksBoard({ projectSlug, tasks, agents }: Props) {
: prefs.agents.length === 1
? agentLabel(agentById, prefs.agents[0])
: `${prefs.agents.length} agents`}
- </Button>
+ </button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="w-56">
<DropdownMenuLabel className="text-[11px] font-normal text-muted-foreground uppercase tracking-wide">
@@ -275,14 +271,13 @@ export function TasksBoard({ projectSlug, tasks, agents }: Props) {
{/* Column visibility */}
<DropdownMenu>
<DropdownMenuTrigger asChild>
- <Button
- variant="outline"
- size="sm"
- className="h-8 gap-1.5 text-xs"
+ <button
+ type="button"
+ className="ns-btn ns-btn-outline ns-btn-sm"
>
<Columns3 className="size-3.5" />
{prefs.columns.length} columns
- </Button>
+ </button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="w-52">
<DropdownMenuLabel className="text-[11px] font-normal text-muted-foreground uppercase tracking-wide">
@@ -335,17 +330,20 @@ export function TasksBoard({ projectSlug, tasks, agents }: Props) {
</DropdownMenuContent>
</DropdownMenu>
- <div className="ml-auto inline-flex overflow-hidden rounded-md border">
+ <div
+ className="ml-auto inline-flex overflow-hidden rounded-full border border-border bg-card p-0.5"
+ style={{ boxShadow: "var(--notfair-shadow-sm)" }}
+ >
<button
type="button"
aria-label="Kanban view"
aria-pressed={prefs.view === "kanban"}
onClick={() => setView("kanban")}
className={cn(
- "flex h-8 w-8 items-center justify-center text-muted-foreground transition-colors",
+ "flex h-7 w-9 items-center justify-center rounded-full transition-colors",
prefs.view === "kanban"
- ? "bg-accent text-foreground"
- : "hover:bg-accent/50",
+ ? "bg-[hsl(var(--notfair-ink))] text-white"
+ : "text-[hsl(var(--notfair-ink-4))] hover:text-[hsl(var(--notfair-ink))]",
)}
>
<LayoutGrid className="size-3.5" />
@@ -356,10 +354,10 @@ export function TasksBoard({ projectSlug, tasks, agents }: Props) {
aria-pressed={prefs.view === "list"}
onClick={() => setView("list")}
className={cn(
- "flex h-8 w-8 items-center justify-center border-l text-muted-foreground transition-colors",
+ "flex h-7 w-9 items-center justify-center rounded-full transition-colors",
prefs.view === "list"
- ? "bg-accent text-foreground"
- : "hover:bg-accent/50",
+ ? "bg-[hsl(var(--notfair-ink))] text-white"
+ : "text-[hsl(var(--notfair-ink-4))] hover:text-[hsl(var(--notfair-ink))]",
)}
>
<ListIcon className="size-3.5" />
@@ -389,26 +387,23 @@ export function TasksBoard({ projectSlug, tasks, agents }: Props) {
{/* Body */}
{tasks.length === 0 ? (
- <Card>
- <CardContent className="py-12 text-center text-sm text-muted-foreground">
- No tasks yet. Ask your CMO to do something in chat to populate
- this board.
- </CardContent>
- </Card>
+ <div className="ns-empty">
+ <p className="ns-empty-title">No tasks yet.</p>
+ <p className="ns-empty-sub">
+ Ask your CMO to do something in chat to populate this board.
+ </p>
+ </div>
) : filteredTasks.length === 0 ? (
- <Card>
- <CardContent className="py-12 text-center text-sm text-muted-foreground">
- No tasks match the current filter.
- <Button
- variant="ghost"
- size="sm"
- className="ml-2 h-auto p-0 text-xs underline underline-offset-2"
- onClick={clearAgents}
- >
- Clear filter
- </Button>
- </CardContent>
- </Card>
+ <div className="ns-empty">
+ <p className="ns-empty-title">No tasks match the current filter.</p>
+ <button
+ type="button"
+ onClick={clearAgents}
+ className="ns-btn ns-btn-ghost ns-btn-sm mt-3"
+ >
+ Clear filter
+ </button>
+ </div>
) : prefs.view === "kanban" ? (
<KanbanView
projectSlug={projectSlug}
@@ -446,48 +441,42 @@ function KanbanView({
}) {
if (visibleColumns.length === 0) {
return (
- <Card>
- <CardContent className="py-12 text-center text-sm text-muted-foreground">
- No columns selected. Open the Columns menu and pick at least one
- status to display.
- </CardContent>
- </Card>
+ <div className="ns-empty">
+ <p className="ns-empty-title">No columns selected.</p>
+ <p className="ns-empty-sub">
+ Open the Columns menu and pick at least one status to display.
+ </p>
+ </div>
);
}
return (
- // Horizontal scroll when columns exceed viewport. Each column ~280px
- // so up to ~3 fit on a typical 16:9 inside the sidebar layout.
<div className="flex gap-3 overflow-x-auto pb-2">
{visibleColumns.map((status) => {
const items = tasks.filter((t) => t.status === status);
return (
<section
key={status}
- className="flex w-72 shrink-0 flex-col rounded-md border bg-muted/30"
+ className="flex w-72 shrink-0 flex-col rounded-[14px] bg-[hsl(var(--notfair-surface-2))]/60"
+ style={{ boxShadow: "inset 0 0 0 0.5px hsl(var(--border))" }}
aria-label={`${STATUS_LABEL[status]} column`}
>
- <header
- className={cn(
- "flex items-center justify-between border-b border-l-2 px-3 py-2",
- statusBorderTone(status),
- )}
- >
+ <header className="flex items-center justify-between border-b border-border/60 px-3 py-2.5">
<div className="flex items-center gap-2">
<span
aria-hidden
- className={cn("size-2 rounded-full", STATUS_TONE[status])}
+ className={cn("size-1.5 rounded-full", STATUS_TONE[status])}
/>
- <h2 className="text-xs font-medium tracking-tight">
+ <h2 className="text-[12px] font-semibold tracking-tight text-[hsl(var(--notfair-ink-2))]">
{STATUS_LABEL[status]}
</h2>
</div>
- <span className="font-mono text-[10px] text-muted-foreground tabular-nums">
+ <span className="font-mono text-[10.5px] tabular-nums text-[hsl(var(--notfair-ink-4))]">
{counts[status] ?? 0}
</span>
</header>
<div className="min-h-[120px] flex-1 space-y-2 p-2">
{items.length === 0 ? (
- <p className="px-2 py-6 text-center text-[11px] text-muted-foreground/70">
+ <p className="px-2 py-6 text-center text-[11px] text-[hsl(var(--notfair-ink-4))]/70">
No tasks.
</p>
) : (
@@ -520,31 +509,27 @@ function TaskCard({
return (
<Link
href={projectHref(projectSlug, `/tasks/${task.id}`)}
- className="block rounded-md border bg-card p-3 transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground/30"
+ className="block rounded-[10px] bg-card p-3 transition-colors hover:bg-[hsl(0_0%_99%)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--notfair-accent-border))]"
+ style={{ boxShadow: "var(--notfair-shadow-sm)" }}
>
<div className="flex items-center justify-between gap-2">
- <span className="font-mono text-[10px] text-muted-foreground tabular-nums">
+ <span className="font-mono text-[10px] tabular-nums text-[hsl(var(--notfair-ink-4))]">
{task.display_id.toUpperCase()}
</span>
- <span className="text-[10px] text-muted-foreground">
+ <span className="text-[10px] text-[hsl(var(--notfair-ink-4))]">
{relativeTime(task.updated_at)}
</span>
</div>
- <p className="mt-1.5 line-clamp-2 text-[13px] font-medium text-foreground">
+ <p className="mt-1.5 line-clamp-2 text-[13px] font-medium text-[hsl(var(--notfair-ink))]">
{task.title ?? task.brief}
</p>
{task.title && (
- <p className="mt-0.5 line-clamp-2 text-[11px] text-muted-foreground">
+ <p className="mt-0.5 line-clamp-2 text-[11.5px] text-[hsl(var(--notfair-ink-4))]">
{task.brief}
</p>
)}
<div className="mt-2 flex items-center justify-between gap-2">
- <Badge
- variant="outline"
- className="h-4 px-1.5 text-[10px] font-normal"
- >
- {assignee}
- </Badge>
+ <span className="ns-tag">{assignee}</span>
</div>
</Link>
);
@@ -582,31 +567,34 @@ function ListView({
if (rows.length === 0) {
return (
- <Card>
- <CardContent className="py-12 text-center text-sm text-muted-foreground">
- No tasks in the selected statuses. Open the Columns menu to
- include more.
- </CardContent>
- </Card>
+ <div className="ns-empty">
+ <p className="ns-empty-title">No tasks in the selected statuses.</p>
+ <p className="ns-empty-sub">
+ Open the Columns menu to include more.
+ </p>
+ </div>
);
}
return (
- <div className="overflow-hidden rounded-md border">
- <div className="grid grid-cols-[6rem_7rem_minmax(0,1fr)_9rem_6rem] gap-3 border-b bg-muted/40 px-3 py-2 text-[10px] font-medium uppercase tracking-wide text-muted-foreground">
+ <div
+ className="overflow-hidden rounded-[14px] bg-card"
+ style={{ boxShadow: "var(--notfair-shadow)" }}
+ >
+ <div className="grid grid-cols-[6rem_7rem_minmax(0,1fr)_9rem_6rem] gap-3 border-b border-border/60 bg-[hsl(var(--notfair-surface-2))]/40 px-4 py-2.5 text-[10.5px] font-semibold uppercase tracking-wide text-[hsl(var(--notfair-ink-4))]">
<span>ID</span>
<span>Status</span>
<span>Description</span>
<span>Assignee</span>
<span className="text-right">Updated</span>
</div>
- <ul className="divide-y">
+ <ul className="divide-y divide-border/60">
{rows.map((t) => (
<li key={t.id}>
<Link
href={projectHref(projectSlug, `/tasks/${t.id}`)}
- className="grid grid-cols-[6rem_7rem_minmax(0,1fr)_9rem_6rem] items-center gap-3 px-3 py-2 text-xs transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-foreground/30"
+ className="grid grid-cols-[6rem_7rem_minmax(0,1fr)_9rem_6rem] items-center gap-3 px-4 py-2.5 text-[12.5px] transition-colors hover:bg-[hsl(0_0%_99%)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[hsl(var(--notfair-accent-border))]"
>
- <span className="truncate font-mono text-[11px] text-muted-foreground tabular-nums">
+ <span className="truncate font-mono text-[11px] tabular-nums text-[hsl(var(--notfair-ink-4))]">
{t.display_id.toUpperCase()}
</span>
<span className="flex items-center gap-1.5">
@@ -617,22 +605,24 @@ function ListView({
STATUS_TONE[t.status],
)}
/>
- <span className="text-[11px]">{STATUS_LABEL[t.status]}</span>
+ <span className="text-[11.5px] text-[hsl(var(--notfair-ink-3))]">
+ {STATUS_LABEL[t.status]}
+ </span>
</span>
<span className="min-w-0">
- <span className="block truncate font-medium text-foreground">
+ <span className="block truncate font-medium text-[hsl(var(--notfair-ink))]">
{t.title ?? t.brief}
</span>
{t.title && (
- <span className="block truncate text-[11px] text-muted-foreground">
+ <span className="block truncate text-[11.5px] text-[hsl(var(--notfair-ink-4))]">
{t.brief}
</span>
)}
</span>
- <span className="truncate text-muted-foreground">
+ <span className="truncate text-[hsl(var(--notfair-ink-4))]">
{agentById.get(t.agent_id)?.name ?? t.agent_id}
</span>
- <span className="truncate text-right text-[11px] text-muted-foreground">
+ <span className="truncate text-right text-[11.5px] text-[hsl(var(--notfair-ink-4))]">
{relativeTime(t.updated_at)}
</span>
</Link>