mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-29 15:52:36 +01:00
feat(ui): single-source design tokens, visual regression suite, and theme retune (#9134)
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - Its UI is the operator's daily surface: task lists, boards, budgets, agent status — all built on shadcn components and Tailwind > - Visual values (colors, spacing, type sizes, radii) were hardcoded at ~1,600 call sites: the same "small gray label" was 9/10/11px depending on the file, charts disagreed with chips about status colors, two toggle-switch implementations coexisted in two greens, and there was no visual regression coverage > - This made the UI drift-prone and made any restyle a hundreds-of-files project, which discourages design iteration > - This pull request extracts visual values into a single token layer in `ui/src/index.css`, adds a Storybook visual regression suite backed by external immutable baseline archives, and then applies a deliberate retune reviewed change-by-change on screenshot diffs > - The benefit is that Paperclip's look becomes a config surface: retheming is a token edit reviewed as a snapshot diff, drift is blocked by a token gate, and future UI PRs can prove exactly what changed visually without committing hundreds of PNGs ## Linked Issues or Issue Description No existing public issue covers this work (searched "design tokens", "visual regression", "design system" across issues and PRs). Related in spirit: Refs #8982 (theming a hardcoded panel — a one-off instance of the same problem class this PR addresses systematically). **Problem (feature-request form):** UI visual values are hardcoded per call site with no source of truth and no regression coverage; consistency depends on reviewer memory, and restyling requires mass file edits. **Proposed solution (this PR):** a single token layer + enforcement gate + externally stored visual snapshot suite, then an intentional restyle on top of that foundation. ## What Changed - **Token extraction (zero visual change, machine-verified during development):** committed codemods (`scripts/codemod-*.mjs`) moved ~1,600 hardcoded color/type/spacing/radius/shadow/misc values into named tokens in a non-inline `:root` block of `ui/src/index.css`. - **Visual regression suite:** `pnpm test:storybook-visual` covers 255 stories × light/dark = 510 Playwright screenshots at `maxDiffPixels: 0`, plus new primitive-coverage stories and deterministic-render fixes. - **External visual baselines:** committed PNG snapshots were removed. `tests/storybook-visual/baseline-manifest.json` pins an immutable archive URL/hash/size/count, and `scripts/storybook-visual-baseline.mjs` handles `download`, `verify`, `pack`, and trusted maintainer `upload` flows. - **Opt-in visual CI artifacts:** added a `Storybook Visual` workflow that runs on manual dispatch or PRs labeled `storybook-visual`, downloads/verifies the baseline, runs Playwright, and uploads Playwright report/test-result artifacts for review. Normal PR runs do not mutate baseline objects. - **Token gate:** `pnpm check:token-gates` — zero hex literals, zero arbitrary bracket values, zero raw font-sizes in `ui/src/components/**` and `ui/src/pages/**`, with a documented inline allowlist for legitimate opt-outs. - **Theme retune (intentional, snapshot-reviewed):** new base theme values; radius ladder derived from a single `--radius` knob; micro-type cluster collapsed to a named ladder (`--text-nano/micro/compact` + Tailwind `text-xs`/`text-sm`); letter-spacing collapsed to named steps. - **One status-color vocabulary:** charts, quota/budget bar fills, RUNNING/live chips, and liveness indicators all use the canonical `--status-*` hues. Light-mode legibility fixes for red alert surfaces that used dark-tuned text classes. - **One switch:** `ToggleSwitch` restyled to the registry capsule form, second hand-rolled implementation removed, and all call sites unified. - **Docs:** `DESIGN.md` is the design contract; `doc/design/` holds audit reports, decision logs, and updated guidance for external baseline review/update workflows. - Dead code removed (`agentStatusBadge` duplicate map), byte-identical contrast constants consolidated, semantic renames (`--project-seed`/`--project-none`, `--liveness-blue`). ## Verification - `pnpm check:token-gates` — 3/3 gates CLEAN during the design-system run - `pnpm typecheck` && `pnpm --filter @paperclipai/ui build` — green during the design-system run - `node --test scripts/__tests__/storybook-visual-baseline.test.mjs` — pass after external-baseline rework - `pnpm exec tsc --noEmit --pretty false --module NodeNext --moduleResolution NodeNext --target ES2022 --types node,@playwright/test tests/storybook-visual/playwright.config.ts tests/storybook-visual/storybook-visual.spec.ts` — pass after external-baseline rework - `git diff --check origin/pr/9134..HEAD` — pass after external-baseline rework - `find tests/storybook-visual -type f -name '*.png' -print | wc -l` — `0` - `node scripts/storybook-visual-baseline.mjs verify` — intentionally fails closed until the first trusted maintainer publishes the baseline archive and updates `baseline-manifest.json` ## Risks - **Large but shallow:** the PR still touches many UI files due to mechanical token extraction and retune work, but committed PNG snapshot churn has been removed from the branch. - **Baseline publication required before the visual suite can pass in clean clones:** the manifest currently has placeholder archive metadata. A trusted maintainer must publish the first immutable archive, then update `baseline-manifest.json`. - **Rendering platform variance:** the external baseline should be captured in the documented Linux/Chromium environment. Future CI runs verify against the pinned archive and fail closed on checksum/count mismatch. - **Visual CI is opt-in while stabilizing:** add the `storybook-visual` label or dispatch the workflow manually to produce downloadable Playwright report/test-result artifacts. - **Scheduled follow-ups, deliberately out of scope:** Tailwind palette classes map to semantic tokens in a dedicated pass; card/pill component consolidation; ESLint ratchet. Tracked in `doc/design/DECISION-SHEET.md`. ## Model Used Claude Fable 5 (Anthropic, `claude-fable-5`, Mythos-class tier) with extended thinking, running in Claude Code with tool use; mechanical phases delegated to Claude Sonnet subagents. Follow-up external-baseline rework assisted by OpenAI Codex (`gpt-5` coding agent with repository, terminal, and GitHub tool use). All bulk rewrites executed via deterministic, idempotent scripts committed in `scripts/`; intentional visual changes were human-reviewed on screenshot contact sheets. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run targeted local verification and documented the intentional baseline-publication failure above - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green *(pending new CI run after this rework)* - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups *(pending review)* - [x] I will address all Greptile and reviewer comments before requesting merge 🤖 Generated with [Claude Code](https://claude.com/claude-code) and OpenAI Codex --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Dotta <bippadotta@protonmail.com> Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
270 files changed
+6946
-1538
No files matched your search
@@ -28,9 +28,9 @@ const SURFACES = [
|
||||
export function AccountingModelCard() {
|
||||
return (
|
||||
<Card className="relative overflow-hidden border-border/70">
|
||||
<div className="absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(244,114,182,0.08),transparent_35%),radial-gradient(circle_at_bottom_right,rgba(56,189,248,0.1),transparent_32%)]" />
|
||||
<div className="absolute inset-0 bg-(image:--gradient-extract-3)" />
|
||||
<CardHeader className="relative px-5 pt-5 pb-2">
|
||||
<CardTitle className="text-sm font-semibold uppercase tracking-[0.22em] text-muted-foreground">
|
||||
<CardTitle className="text-sm font-semibold uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Accounting model
|
||||
</CardTitle>
|
||||
<CardDescription className="max-w-2xl text-sm leading-6">
|
||||
|
||||
@@ -29,7 +29,7 @@ function RunCardRecoveryChip({ action }: { action: IssueRecoveryAction }) {
|
||||
aria-label={tone.label}
|
||||
title={`${tone.label} — open the source task to act.`}
|
||||
className={cn(
|
||||
"inline-flex shrink-0 items-center gap-0.5 rounded-full border px-1.5 py-0.5 text-[10px] font-medium",
|
||||
"inline-flex shrink-0 items-center gap-0.5 rounded-full border px-1.5 py-0.5 text-(length:--text-nano) font-medium",
|
||||
tone.className,
|
||||
)}
|
||||
>
|
||||
@@ -170,9 +170,9 @@ const AgentRunCard = memo(function AgentRunCard({
|
||||
}) {
|
||||
return (
|
||||
<div className={cn(
|
||||
"flex h-[320px] flex-col overflow-hidden rounded-xl border shadow-sm",
|
||||
"flex h-(--sz-320px) flex-col overflow-hidden rounded-xl border shadow-sm",
|
||||
isActive
|
||||
? "border-cyan-500/25 bg-cyan-500/[0.04] shadow-[0_16px_40px_rgba(6,182,212,0.08)]"
|
||||
? "border-blue-500/25 bg-blue-500/[0.04] shadow-(--shadow-extract-1)"
|
||||
: "border-border bg-background/70",
|
||||
className,
|
||||
)}>
|
||||
@@ -182,22 +182,22 @@ const AgentRunCard = memo(function AgentRunCard({
|
||||
<div className="flex items-center gap-2">
|
||||
{isActive ? (
|
||||
<span className="relative flex h-2.5 w-2.5 shrink-0">
|
||||
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-cyan-400 opacity-70" />
|
||||
<span className="relative inline-flex h-2.5 w-2.5 rounded-full bg-cyan-500" />
|
||||
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-blue-400 opacity-70" />
|
||||
<span className="relative inline-flex h-2.5 w-2.5 rounded-full bg-blue-500" />
|
||||
</span>
|
||||
) : (
|
||||
<span className="inline-flex h-2.5 w-2.5 rounded-full bg-muted-foreground/35" />
|
||||
)}
|
||||
<Identity name={run.agentName} size="sm" className="[&>span:last-child]:!text-[11px]" />
|
||||
<Identity name={run.agentName} size="sm" className="[&>span:last-child]:!text-(length:--text-micro)" />
|
||||
</div>
|
||||
<div className="mt-2 flex items-center gap-2 text-[11px] text-muted-foreground">
|
||||
<div className="mt-2 flex items-center gap-2 text-(length:--text-micro) text-muted-foreground">
|
||||
<span>{isActive ? "Live now" : run.finishedAt ? `Finished ${relativeTime(run.finishedAt)}` : `Started ${relativeTime(run.createdAt)}`}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Link
|
||||
to={`/agents/${run.agentId}/runs/${run.id}`}
|
||||
className="inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/70 px-2 py-1 text-[10px] text-muted-foreground transition-colors hover:text-foreground"
|
||||
className="inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/70 px-2 py-1 text-(length:--text-nano) text-muted-foreground transition-colors hover:text-foreground"
|
||||
>
|
||||
<ExternalLink className="h-2.5 w-2.5" />
|
||||
</Link>
|
||||
@@ -209,7 +209,7 @@ const AgentRunCard = memo(function AgentRunCard({
|
||||
to={`/issues/${issue?.identifier ?? run.issueId}`}
|
||||
className={cn(
|
||||
"line-clamp-2 hover:underline",
|
||||
isActive ? "text-cyan-700 dark:text-cyan-300" : "text-muted-foreground hover:text-foreground",
|
||||
isActive ? "text-blue-700 dark:text-blue-300" : "text-muted-foreground hover:text-foreground",
|
||||
)}
|
||||
title={issue?.title ? `${issue?.identifier ?? run.issueId.slice(0, 8)} - ${issue.title}` : issue?.identifier ?? run.issueId.slice(0, 8)}
|
||||
>
|
||||
|
||||
@@ -19,11 +19,11 @@ function formatDayLabel(dateStr: string): string {
|
||||
|
||||
function DateLabels({ days }: { days: string[] }) {
|
||||
return (
|
||||
<div className="flex gap-[3px] mt-1.5">
|
||||
<div className="flex gap-(--sz-3px) mt-1.5">
|
||||
{days.map((day, i) => (
|
||||
<div key={day} className="flex-1 text-center">
|
||||
{(i === 0 || i === 6 || i === 13) ? (
|
||||
<span className="text-[9px] text-muted-foreground tabular-nums">{formatDayLabel(day)}</span>
|
||||
<span className="text-(length:--text-nano) text-muted-foreground tabular-nums">{formatDayLabel(day)}</span>
|
||||
) : null}
|
||||
</div>
|
||||
))}
|
||||
@@ -35,7 +35,7 @@ function ChartLegend({ items }: { items: { color: string; label: string }[] }) {
|
||||
return (
|
||||
<div className="flex flex-wrap gap-x-2.5 gap-y-0.5 mt-2">
|
||||
{items.map(item => (
|
||||
<span key={item.label} className="flex items-center gap-1 text-[9px] text-muted-foreground">
|
||||
<span key={item.label} className="flex items-center gap-1 text-(length:--text-nano) text-muted-foreground">
|
||||
<span className="h-1.5 w-1.5 rounded-full shrink-0" style={{ backgroundColor: item.color }} />
|
||||
{item.label}
|
||||
</span>
|
||||
@@ -49,7 +49,7 @@ export function ChartCard({ title, subtitle, children }: { title: string; subtit
|
||||
<div className="border border-border rounded-lg p-4 space-y-3">
|
||||
<div>
|
||||
<h3 className="text-xs font-medium text-muted-foreground">{title}</h3>
|
||||
{subtitle && <span className="text-[10px] text-muted-foreground/60">{subtitle}</span>}
|
||||
{subtitle && <span className="text-(length:--text-nano) text-muted-foreground/60">{subtitle}</span>}
|
||||
</div>
|
||||
{children}
|
||||
</div>
|
||||
@@ -96,7 +96,7 @@ export function RunActivityChart(props: RunChartProps) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex items-end gap-[3px] h-20">
|
||||
<div className="flex items-end gap-(--sz-3px) h-20">
|
||||
{days.map(day => {
|
||||
const entry = grouped.get(day) ?? { date: day, succeeded: 0, failed: 0, other: 0, total: 0 };
|
||||
const total = entry.total;
|
||||
@@ -122,10 +122,10 @@ export function RunActivityChart(props: RunChartProps) {
|
||||
}
|
||||
|
||||
const priorityColors: Record<string, string> = {
|
||||
critical: "#ef4444",
|
||||
high: "#f97316",
|
||||
medium: "#eab308",
|
||||
low: "#6b7280",
|
||||
critical: "var(--hex-ef4444)",
|
||||
high: "var(--hex-f97316)",
|
||||
medium: "var(--hex-eab308)",
|
||||
low: "var(--hex-6b7280)",
|
||||
};
|
||||
|
||||
const priorityOrder = ["critical", "high", "medium", "low"] as const;
|
||||
@@ -148,7 +148,7 @@ export function PriorityChart({ issues }: { issues: { priority: string; createdA
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex items-end gap-[3px] h-20">
|
||||
<div className="flex items-end gap-(--sz-3px) h-20">
|
||||
{days.map(day => {
|
||||
const entry = grouped.get(day)!;
|
||||
const total = Object.values(entry).reduce((a, b) => a + b, 0);
|
||||
@@ -174,14 +174,21 @@ export function PriorityChart({ issues }: { issues: { priority: string; createdA
|
||||
);
|
||||
}
|
||||
|
||||
// DECISION-SHEET.md B5: chart status colors re-pointed at the canonical
|
||||
// --status-task-* system (DESIGN.md principle 5 — an operator learns one
|
||||
// status vocabulary; badge, row, chart, and log agree). Previously an
|
||||
// independent palette (todo blue, in_progress violet, etc.). `backlog`
|
||||
// deliberately keeps --project-none (pre-B5, per user ruling); the
|
||||
// priority series and success-rate tints below are not status hues and
|
||||
// are left alone.
|
||||
const statusColors: Record<string, string> = {
|
||||
todo: "#3b82f6",
|
||||
in_progress: "#8b5cf6",
|
||||
in_review: "#a855f7",
|
||||
done: "#10b981",
|
||||
blocked: "#ef4444",
|
||||
cancelled: "#6b7280",
|
||||
backlog: "#64748b",
|
||||
todo: "var(--status-task-todo)",
|
||||
in_progress: "var(--status-task-in_progress)",
|
||||
in_review: "var(--status-task-in_review)",
|
||||
done: "var(--status-task-done)",
|
||||
blocked: "var(--status-task-blocked)",
|
||||
cancelled: "var(--status-task-cancelled)",
|
||||
backlog: "var(--project-none)",
|
||||
};
|
||||
|
||||
const statusLabels: Record<string, string> = {
|
||||
@@ -215,7 +222,7 @@ export function IssueStatusChart({ issues }: { issues: { status: string; created
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex items-end gap-[3px] h-20">
|
||||
<div className="flex items-end gap-(--sz-3px) h-20">
|
||||
{days.map(day => {
|
||||
const entry = grouped.get(day)!;
|
||||
const total = Object.values(entry).reduce((a, b) => a + b, 0);
|
||||
@@ -225,7 +232,7 @@ export function IssueStatusChart({ issues }: { issues: { status: string; created
|
||||
{total > 0 ? (
|
||||
<div className="flex flex-col-reverse gap-px overflow-hidden" style={{ height: `${heightPct}%`, minHeight: 2 }}>
|
||||
{statusOrder.map(s => (entry[s] ?? 0) > 0 ? (
|
||||
<div key={s} style={{ flex: entry[s], backgroundColor: statusColors[s] ?? "#6b7280" }} />
|
||||
<div key={s} style={{ flex: entry[s], backgroundColor: statusColors[s] ?? "var(--hex-6b7280)" }} />
|
||||
) : null)}
|
||||
</div>
|
||||
) : (
|
||||
@@ -236,7 +243,7 @@ export function IssueStatusChart({ issues }: { issues: { status: string; created
|
||||
})}
|
||||
</div>
|
||||
<DateLabels days={days} />
|
||||
<ChartLegend items={statusOrder.map(s => ({ color: statusColors[s] ?? "#6b7280", label: statusLabels[s] ?? s }))} />
|
||||
<ChartLegend items={statusOrder.map(s => ({ color: statusColors[s] ?? "var(--hex-6b7280)", label: statusLabels[s] ?? s }))} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -251,11 +258,11 @@ export function SuccessRateChart(props: RunChartProps) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex items-end gap-[3px] h-20">
|
||||
<div className="flex items-end gap-(--sz-3px) h-20">
|
||||
{days.map(day => {
|
||||
const entry = grouped.get(day) ?? { date: day, succeeded: 0, failed: 0, other: 0, total: 0 };
|
||||
const rate = entry.total > 0 ? entry.succeeded / entry.total : 0;
|
||||
const color = entry.total === 0 ? undefined : rate >= 0.8 ? "#10b981" : rate >= 0.5 ? "#eab308" : "#ef4444";
|
||||
const color = entry.total === 0 ? undefined : rate >= 0.8 ? "var(--hex-10b981)" : rate >= 0.5 ? "var(--hex-eab308)" : "var(--hex-ef4444)";
|
||||
return (
|
||||
<div key={day} className="flex-1 h-full flex flex-col justify-end" title={`${day}: ${entry.total > 0 ? Math.round(rate * 100) : 0}% (${entry.succeeded}/${entry.total})`}>
|
||||
{entry.total > 0 ? (
|
||||
|
||||
@@ -268,7 +268,7 @@ function CollapsedFeedGroup({
|
||||
onClick={() => setExpanded((e) => !e)}
|
||||
data-fc="card"
|
||||
className={cn(
|
||||
"group ml-3 mr-3 md:ml-0 my-2 flex w-[calc(100%-1.5rem)] md:w-[calc(100%-0.75rem)] items-center gap-2 rounded-lg border bg-card p-[18px] text-left text-xs transition-[background-color,border-color] duration-150",
|
||||
"group ml-3 mr-3 md:ml-0 my-2 flex w-(--sz-calc-1) md:w-(--sz-calc-2) items-center gap-2 rounded-lg border bg-card p-(--sz-18px) text-left text-xs transition-(--tp-background-color-border-color) duration-150",
|
||||
"cursor-pointer hover:bg-accent hover:border-muted-foreground/30",
|
||||
)}
|
||||
>
|
||||
@@ -283,9 +283,9 @@ function CollapsedFeedGroup({
|
||||
: <Settings className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
||||
}
|
||||
<span className="flex-1 min-w-0 truncate">
|
||||
<span data-fc="actor" className="font-medium text-[#959596] group-hover:text-white">{actorName}</span>
|
||||
<span data-fc="verb" className="ml-1 text-[#959596]">made {group.events.length} updates to</span>
|
||||
<span data-fc="title" className="ml-1 text-[#959596] group-hover:text-white">{entityName ?? group.entityId}</span>
|
||||
<span data-fc="actor" className="font-medium text-(--hex-959596) group-hover:text-white">{actorName}</span>
|
||||
<span data-fc="verb" className="ml-1 text-(--hex-959596)">made {group.events.length} updates to</span>
|
||||
<span data-fc="title" className="ml-1 text-(--hex-959596) group-hover:text-white">{entityName ?? group.entityId}</span>
|
||||
</span>
|
||||
<span data-fc="time" className="text-muted-foreground shrink-0">
|
||||
{timeAgo(group.latestEvent.createdAt)}
|
||||
@@ -470,7 +470,7 @@ export function ActivityFeed({ className }: ActivityFeedProps) {
|
||||
separator = (
|
||||
<div className="flex items-center gap-2 px-4 py-1.5" key={`sep-${index}`}>
|
||||
<div className="h-px flex-1 bg-border" />
|
||||
<span className="text-[10px] font-medium text-muted-foreground uppercase tracking-wider">
|
||||
<span className="text-(length:--text-nano) font-medium text-muted-foreground uppercase tracking-wider">
|
||||
Earlier
|
||||
</span>
|
||||
<div className="h-px flex-1 bg-border" />
|
||||
@@ -680,7 +680,7 @@ export function ActivityFeed({ className }: ActivityFeedProps) {
|
||||
>
|
||||
{isEmpty ? (
|
||||
<div className="flex min-h-0 flex-1 items-center justify-center p-6 h-full">
|
||||
<div className="flex flex-col items-center gap-2 max-w-[16rem]">
|
||||
<div className="flex flex-col items-center gap-2 max-w-(--sz-16rem)">
|
||||
{emptyMessage?.showPulse && (
|
||||
<span className="relative flex h-2.5 w-2.5">
|
||||
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-primary/40" />
|
||||
|
||||
@@ -109,7 +109,7 @@ export function AgentBubbleActionRow({
|
||||
<TooltipTrigger asChild>
|
||||
<a
|
||||
href={anchorHref}
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground hover:underline"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground hover:underline"
|
||||
>
|
||||
{dateLabel}
|
||||
</a>
|
||||
|
||||
@@ -983,7 +983,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
||||
value={eff("identity", "capabilities", props.agent.capabilities ?? "") ?? ""}
|
||||
onChange={(v) => mark("identity", "capabilities", v || null)}
|
||||
placeholder="Describe what this agent can do..."
|
||||
contentClassName="min-h-[44px] text-sm font-mono"
|
||||
contentClassName="min-h-(--sz-44px) text-sm font-mono"
|
||||
imageUploadHandler={async (file) => {
|
||||
const asset = await uploadMarkdownImage.mutateAsync({
|
||||
file,
|
||||
@@ -1004,7 +1004,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
||||
)}
|
||||
onChange={(v) => mark("adapterConfig", "promptTemplate", v ?? "")}
|
||||
placeholder="You are agent {{ agent.name }}. Your role is {{ agent.role }}..."
|
||||
contentClassName="min-h-[88px] text-sm font-mono"
|
||||
contentClassName="min-h-(--sz-88px) text-sm font-mono"
|
||||
imageUploadHandler={async (file) => {
|
||||
const namespace = `agents/${props.agent.id}/prompt-template`;
|
||||
const asset = await uploadMarkdownImage.mutateAsync({ file, namespace });
|
||||
@@ -1012,7 +1012,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
||||
}}
|
||||
/>
|
||||
</Field>
|
||||
<div className="rounded-md border border-amber-500/25 bg-amber-500/10 px-3 py-2 text-xs text-amber-100">
|
||||
<div className="rounded-md border border-amber-500/25 bg-amber-500/10 px-3 py-2 text-xs text-amber-900 dark:text-amber-100">
|
||||
Prompt template is replayed on every heartbeat. Keep it compact and dynamic to avoid recurring token cost and cache churn.
|
||||
</div>
|
||||
</>
|
||||
@@ -1041,7 +1041,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
||||
{kubernetesEnvironment.name} · Kubernetes sandbox
|
||||
</div>
|
||||
) : (
|
||||
<div className="rounded-md border border-amber-500/25 bg-amber-500/10 px-3 py-2 text-xs text-amber-200">
|
||||
<div className="rounded-md border border-amber-500/25 bg-amber-500/10 px-3 py-2 text-xs text-amber-800 dark:text-amber-200">
|
||||
This instance requires the Kubernetes sandbox, but no managed Kubernetes
|
||||
environment is available for this company yet. Configure one before creating
|
||||
agents; execution will not fall back to local.
|
||||
@@ -1247,7 +1247,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
||||
</Field>
|
||||
|
||||
{supportsModelProfiles && (
|
||||
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">Primary model</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-wide text-muted-foreground">Primary model</div>
|
||||
)}
|
||||
<ModelDropdown
|
||||
models={models}
|
||||
@@ -1345,7 +1345,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
||||
mark("adapterConfig", "bootstrapPromptTemplate", v || undefined)
|
||||
}
|
||||
placeholder="Optional initial setup prompt for the first run"
|
||||
contentClassName="min-h-[44px] text-sm font-mono"
|
||||
contentClassName="min-h-(--sz-44px) text-sm font-mono"
|
||||
imageUploadHandler={async (file) => {
|
||||
const namespace = `agents/${props.agent.id}/bootstrap-prompt`;
|
||||
const asset = await uploadMarkdownImage.mutateAsync({ file, namespace });
|
||||
@@ -1353,7 +1353,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
||||
}}
|
||||
/>
|
||||
</Field>
|
||||
<div className="rounded-md border border-amber-500/25 bg-amber-500/10 px-3 py-2 text-xs text-amber-200">
|
||||
<div className="rounded-md border border-amber-500/25 bg-amber-500/10 px-3 py-2 text-xs text-amber-800 dark:text-amber-200">
|
||||
Bootstrap prompt is legacy and will be removed in a future release. Consider moving this content into the agent's prompt template or instructions file instead.
|
||||
</div>
|
||||
</>
|
||||
@@ -1578,13 +1578,13 @@ export function AdapterEnvironmentResult({ result }: { result: AdapterEnvironmen
|
||||
<div className={`rounded-md border px-3 py-2 text-xs ${statusClass}`}>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<span className="font-medium">{statusLabel}</span>
|
||||
<span className="text-[11px] opacity-80">
|
||||
<span className="text-(length:--text-micro) opacity-80">
|
||||
{new Date(result.testedAt).toLocaleTimeString()}
|
||||
</span>
|
||||
</div>
|
||||
<div className="mt-2 space-y-1.5">
|
||||
{result.checks.map((check, idx) => (
|
||||
<div key={`${check.code}-${idx}`} className="text-[11px] leading-relaxed break-words">
|
||||
<div key={`${check.code}-${idx}`} className="text-(length:--text-micro) leading-relaxed break-words">
|
||||
<span className="font-medium uppercase tracking-wide opacity-80">
|
||||
{check.level}
|
||||
</span>
|
||||
@@ -1632,7 +1632,7 @@ function AdapterTypeDropdown({
|
||||
<ChevronDown className="h-3 w-3 text-muted-foreground" />
|
||||
</button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-1" align="start">
|
||||
<PopoverContent className="w-(--radix-popover-trigger-width) p-1" align="start">
|
||||
{adapterList.map((item) => (
|
||||
<button
|
||||
key={item.value}
|
||||
@@ -1657,7 +1657,7 @@ function AdapterTypeDropdown({
|
||||
{item.experimental && <ExperimentalBadge />}
|
||||
</span>
|
||||
{item.comingSoon && (
|
||||
<span className="text-[10px] text-muted-foreground">Coming soon</span>
|
||||
<span className="text-(length:--text-nano) text-muted-foreground">Coming soon</span>
|
||||
)}
|
||||
</button>
|
||||
))}
|
||||
@@ -1668,7 +1668,7 @@ function AdapterTypeDropdown({
|
||||
|
||||
function ExperimentalBadge() {
|
||||
return (
|
||||
<span className="shrink-0 rounded border border-amber-500/30 bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium leading-none text-amber-700 dark:text-amber-200">
|
||||
<span className="shrink-0 rounded border border-amber-500/30 bg-amber-500/10 px-1.5 py-0.5 text-(length:--text-nano) font-medium leading-none text-amber-700 dark:text-amber-200">
|
||||
Experimental
|
||||
</span>
|
||||
);
|
||||
@@ -1802,7 +1802,7 @@ function ModelDropdown({
|
||||
<ChevronDown className="h-3 w-3 text-muted-foreground" />
|
||||
</button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-1" align="start">
|
||||
<PopoverContent className="w-(--radix-popover-trigger-width) p-1" align="start">
|
||||
<div className="relative mb-1">
|
||||
<input
|
||||
className="w-full px-2 py-1.5 pr-6 text-xs bg-transparent outline-none border-b border-border placeholder:text-muted-foreground/50"
|
||||
@@ -1871,7 +1871,7 @@ function ModelDropdown({
|
||||
<span className="block w-full text-left truncate font-mono text-xs" title={value}>
|
||||
{models.find((m) => m.id === value)?.label ?? value}
|
||||
</span>
|
||||
<span className="shrink-0 ml-auto text-[9px] font-medium px-1.5 py-0.5 rounded-full bg-green-500/15 text-green-400 border border-green-500/20">
|
||||
<span className="shrink-0 ml-auto text-(length:--text-nano) font-medium px-1.5 py-0.5 rounded-full bg-green-500/15 text-green-400 border border-green-500/20">
|
||||
current
|
||||
</span>
|
||||
</button>
|
||||
@@ -1890,7 +1890,7 @@ function ModelDropdown({
|
||||
<span className="block w-full text-left truncate font-mono text-xs" title={detectedModel}>
|
||||
{models.find((m) => m.id === detectedModel)?.label ?? detectedModel}
|
||||
</span>
|
||||
<span className="shrink-0 ml-auto text-[9px] font-medium px-1.5 py-0.5 rounded-full bg-blue-500/15 text-blue-400 border border-blue-500/20">
|
||||
<span className="shrink-0 ml-auto text-(length:--text-nano) font-medium px-1.5 py-0.5 rounded-full bg-blue-500/15 text-blue-400 border border-blue-500/20">
|
||||
detected
|
||||
</span>
|
||||
</button>
|
||||
@@ -1914,13 +1914,13 @@ function ModelDropdown({
|
||||
<span className="block w-full text-left truncate font-mono text-xs" title={candidate}>
|
||||
{entry?.label ?? candidate}
|
||||
</span>
|
||||
<span className="shrink-0 ml-auto text-[9px] font-medium px-1.5 py-0.5 rounded-full bg-sky-500/15 text-sky-400 border border-sky-500/20">
|
||||
<span className="shrink-0 ml-auto text-(length:--text-nano) font-medium px-1.5 py-0.5 rounded-full bg-sky-500/15 text-sky-400 border border-sky-500/20">
|
||||
config
|
||||
</span>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
<div className="max-h-[240px] overflow-y-auto">
|
||||
<div className="max-h-(--sz-240px) overflow-y-auto">
|
||||
{allowDefault && (
|
||||
<button
|
||||
type="button"
|
||||
@@ -1953,7 +1953,7 @@ function ModelDropdown({
|
||||
{groupedModels.map((group) => (
|
||||
<div key={group.provider} className="mb-1 last:mb-0">
|
||||
{groupByProvider && (
|
||||
<div className="px-2 py-1 text-[10px] uppercase tracking-wide text-muted-foreground">
|
||||
<div className="px-2 py-1 text-(length:--text-nano) uppercase tracking-wide text-muted-foreground">
|
||||
{group.provider} ({group.entries.length})
|
||||
</div>
|
||||
)}
|
||||
@@ -2021,7 +2021,7 @@ function CheapModelSection({
|
||||
<div className="rounded-md border border-border/70 bg-muted/20 p-3 space-y-3">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div className="min-w-0">
|
||||
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">Cheap model</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-wide text-muted-foreground">Cheap model</div>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Used when a run requests the cheap profile (e.g. routine summaries). The primary model stays unchanged.
|
||||
</p>
|
||||
@@ -2046,12 +2046,12 @@ function CheapModelSection({
|
||||
/>
|
||||
) : null}
|
||||
{enabled && !model && adapterDefaultModel ? (
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
<p className="text-(length:--text-micro) text-muted-foreground">
|
||||
No explicit cheap model selected — runtime falls back to <code>{adapterDefaultModel}</code>.
|
||||
</p>
|
||||
) : null}
|
||||
{enabled && !model && !adapterDefaultModel ? (
|
||||
<p className="text-[11px] text-amber-500">
|
||||
<p className="text-(length:--text-micro) text-amber-500">
|
||||
No cheap model selected and the adapter has no default. Cheap-lane runs will continue on the primary model with a fallback note.
|
||||
</p>
|
||||
) : null}
|
||||
@@ -2083,7 +2083,7 @@ function ThinkingEffortDropdown({
|
||||
<ChevronDown className="h-3 w-3 text-muted-foreground" />
|
||||
</button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-1" align="start">
|
||||
<PopoverContent className="w-(--radix-popover-trigger-width) p-1" align="start">
|
||||
{options.map((option) => (
|
||||
<button
|
||||
key={option.id || "auto"}
|
||||
|
||||
@@ -63,7 +63,7 @@ export function ApprovalCard({
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="border-border/70 bg-background/70 px-2 py-0.5 text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground"
|
||||
className="border-border/70 bg-background/70 px-2 py-0.5 text-(length:--text-micro) font-medium uppercase tracking-(--tracking-label) text-muted-foreground"
|
||||
>
|
||||
{kindLabel}
|
||||
</Badge>
|
||||
|
||||
@@ -70,7 +70,7 @@ function SkillList({ values }: { values: unknown }) {
|
||||
{items.map((item) => (
|
||||
<span
|
||||
key={item}
|
||||
className="rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground"
|
||||
className="rounded bg-muted px-1.5 py-0.5 font-mono text-(length:--text-micro) text-muted-foreground"
|
||||
>
|
||||
{item}
|
||||
</span>
|
||||
@@ -178,19 +178,19 @@ function BoardApprovalPayloadContent({ payload }: { payload: Record<string, unkn
|
||||
<div className="mt-4 space-y-3.5 text-sm">
|
||||
{title && (
|
||||
<div className="space-y-1">
|
||||
<p className="text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground">Title</p>
|
||||
<p className="text-(length:--text-micro) font-medium uppercase tracking-(--tracking-label) text-muted-foreground">Title</p>
|
||||
<p className="font-medium leading-6 text-foreground">{title}</p>
|
||||
</div>
|
||||
)}
|
||||
{summary && (
|
||||
<div className="space-y-1">
|
||||
<p className="text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground">Summary</p>
|
||||
<p className="text-(length:--text-micro) font-medium uppercase tracking-(--tracking-label) text-muted-foreground">Summary</p>
|
||||
<p className="leading-6 text-foreground/90">{summary}</p>
|
||||
</div>
|
||||
)}
|
||||
{recommendedAction && (
|
||||
<div className="rounded-lg border border-amber-500/20 bg-amber-500/10 px-3.5 py-3">
|
||||
<p className="text-[11px] font-medium uppercase tracking-[0.08em] text-amber-700 dark:text-amber-300">
|
||||
<p className="text-(length:--text-micro) font-medium uppercase tracking-(--tracking-label) text-amber-700 dark:text-amber-300">
|
||||
Recommended action
|
||||
</p>
|
||||
<p className="mt-1 leading-6 text-foreground">{recommendedAction}</p>
|
||||
@@ -198,13 +198,13 @@ function BoardApprovalPayloadContent({ payload }: { payload: Record<string, unkn
|
||||
)}
|
||||
{nextActionOnApproval && (
|
||||
<div className="rounded-lg border border-border/60 bg-background/60 px-3.5 py-3">
|
||||
<p className="text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground">On approval</p>
|
||||
<p className="text-(length:--text-micro) font-medium uppercase tracking-(--tracking-label) text-muted-foreground">On approval</p>
|
||||
<p className="mt-1 leading-6 text-foreground">{nextActionOnApproval}</p>
|
||||
</div>
|
||||
)}
|
||||
{risks.length > 0 && (
|
||||
<div className="space-y-1.5">
|
||||
<p className="text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground">Risks</p>
|
||||
<p className="text-(length:--text-micro) font-medium uppercase tracking-(--tracking-label) text-muted-foreground">Risks</p>
|
||||
<ul className="space-y-1 text-sm text-muted-foreground">
|
||||
{risks.map((risk) => (
|
||||
<li key={risk} className="flex items-start gap-2">
|
||||
@@ -217,7 +217,7 @@ function BoardApprovalPayloadContent({ payload }: { payload: Record<string, unkn
|
||||
)}
|
||||
{proposedComment && (
|
||||
<div className="space-y-1.5">
|
||||
<p className="text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground">
|
||||
<p className="text-(length:--text-micro) font-medium uppercase tracking-(--tracking-label) text-muted-foreground">
|
||||
Proposed comment
|
||||
</p>
|
||||
<pre className="max-h-48 overflow-auto rounded-lg border border-border/60 bg-muted/50 px-3.5 py-3 font-mono text-xs leading-5 text-muted-foreground whitespace-pre-wrap">
|
||||
|
||||
@@ -139,7 +139,7 @@ export function ArtifactsPanel({ taskId, isAgentWorking, openDocKey, openDocTitl
|
||||
<button
|
||||
key={f.value}
|
||||
className={cn(
|
||||
"rounded-full px-2.5 py-0.5 text-[11px] font-medium transition-colors",
|
||||
"rounded-full px-2.5 py-0.5 text-(length:--text-micro) font-medium transition-colors",
|
||||
filter === f.value
|
||||
? "bg-foreground text-background"
|
||||
: "text-muted-foreground hover:text-foreground hover:bg-accent/50",
|
||||
@@ -193,8 +193,8 @@ export function ArtifactsPanel({ taskId, isAgentWorking, openDocKey, openDocTitl
|
||||
{showGenerating ? (
|
||||
<div className="mt-0.5 shrink-0">
|
||||
<span className="relative flex h-4 w-4">
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-cyan-400 opacity-75" />
|
||||
<span className="relative inline-flex rounded-full h-4 w-4 bg-cyan-500" />
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" />
|
||||
<span className="relative inline-flex rounded-full h-4 w-4 bg-blue-500" />
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
@@ -208,22 +208,22 @@ export function ArtifactsPanel({ taskId, isAgentWorking, openDocKey, openDocTitl
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-2 mt-1">
|
||||
<span className="text-[10px] text-muted-foreground capitalize">
|
||||
<span className="text-(length:--text-nano) text-muted-foreground capitalize">
|
||||
{wp.type.replace(/_/g, " ")}
|
||||
</span>
|
||||
{showGenerating ? (
|
||||
<span className="inline-flex items-center gap-1 text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-cyan-500/10 text-cyan-600 dark:text-cyan-400">
|
||||
<span className="inline-flex items-center gap-1 text-(length:--text-nano) font-medium px-1.5 py-0.5 rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400">
|
||||
<Loader2 className="h-2.5 w-2.5 animate-spin" />
|
||||
Generating...
|
||||
</span>
|
||||
) : (
|
||||
<span className={cn("text-[10px] font-medium px-1.5 py-0.5 rounded-full", badge.className)}>
|
||||
<span className={cn("text-(length:--text-nano) font-medium px-1.5 py-0.5 rounded-full", badge.className)}>
|
||||
{badge.label}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{wp.summary && (
|
||||
<p className="text-[11px] text-muted-foreground mt-1 line-clamp-2">
|
||||
<p className="text-(length:--text-micro) text-muted-foreground mt-1 line-clamp-2">
|
||||
{wp.summary}
|
||||
</p>
|
||||
)}
|
||||
@@ -298,7 +298,7 @@ function DocumentViewer({
|
||||
{/* Sticky action footer */}
|
||||
{needsAction && (
|
||||
<div className="border-t border-border px-4 py-3 bg-background shrink-0">
|
||||
<p className="text-[11px] text-muted-foreground mb-2">This document needs your review.</p>
|
||||
<p className="text-(length:--text-micro) text-muted-foreground mb-2">This document needs your review.</p>
|
||||
<div className="flex items-center gap-3">
|
||||
<Button size="lg" className="h-11 px-8 text-base font-semibold flex-1 rounded-lg bg-green-700 hover:bg-green-800 text-white border-0" onClick={onApprove}>
|
||||
Approve
|
||||
@@ -316,7 +316,7 @@ function DocumentViewer({
|
||||
<div className="border-t border-green-500/30 bg-green-500/5 px-4 py-3 shrink-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<CheckCircle2 className="h-4 w-4 text-green-500" />
|
||||
<p className="text-[13px] font-medium text-green-700 dark:text-green-400">
|
||||
<p className="text-(length:--text-compact) font-medium text-green-700 dark:text-green-400">
|
||||
Approved — hire tasks created
|
||||
</p>
|
||||
</div>
|
||||
@@ -326,7 +326,7 @@ function DocumentViewer({
|
||||
<div className="border-t border-orange-500/30 bg-orange-500/5 px-4 py-3 shrink-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<XCircle className="h-4 w-4 text-orange-500" />
|
||||
<p className="text-[13px] font-medium text-orange-700 dark:text-orange-400">
|
||||
<p className="text-(length:--text-compact) font-medium text-orange-700 dark:text-orange-400">
|
||||
Changes requested — CEO is revising
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -341,7 +341,7 @@ export function AsciiArtAnimation() {
|
||||
<pre
|
||||
ref={preRef}
|
||||
className="w-full h-full m-0 p-0 overflow-hidden text-muted-foreground/60 select-none leading-none"
|
||||
style={{ fontSize: "11px", fontFamily: "monospace" }}
|
||||
style={{ fontSize: "var(--text-micro)", fontFamily: "monospace" }}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -309,7 +309,7 @@ function BlockedInboxRow({
|
||||
const desktopTrailing = (
|
||||
<span className="flex shrink-0 items-center gap-3 text-xs">
|
||||
<span
|
||||
className="hidden w-[10.5rem] shrink-0 justify-start sm:inline-flex"
|
||||
className="hidden w-(--sz-10_5rem) shrink-0 justify-start sm:inline-flex"
|
||||
data-testid="blocked-row-reason-column"
|
||||
>
|
||||
<BlockedReasonChip
|
||||
@@ -319,7 +319,7 @@ function BlockedInboxRow({
|
||||
/>
|
||||
</span>
|
||||
{ownerName ? (
|
||||
<span className="hidden w-[150px] min-w-0 items-center text-muted-foreground sm:inline-flex">
|
||||
<span className="hidden w-(--sz-150px) min-w-0 items-center text-muted-foreground sm:inline-flex">
|
||||
<Identity
|
||||
name={ownerName}
|
||||
size="xs"
|
||||
@@ -327,10 +327,10 @@ function BlockedInboxRow({
|
||||
/>
|
||||
</span>
|
||||
) : (
|
||||
<span className="hidden w-[150px] shrink-0 sm:inline-flex" aria-hidden="true" />
|
||||
<span className="hidden w-(--sz-150px) shrink-0 sm:inline-flex" aria-hidden="true" />
|
||||
)}
|
||||
{showUpdatedColumn ? (
|
||||
<span className="hidden w-[5.75rem] text-right text-muted-foreground sm:inline" data-testid="blocked-row-age">
|
||||
<span className="hidden w-(--sz-5_75rem) text-right text-muted-foreground sm:inline" data-testid="blocked-row-age">
|
||||
{stoppedAge}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -375,7 +375,7 @@ function BlockedInboxRow({
|
||||
<BlockedReasonChip
|
||||
reason={row.attention.reason}
|
||||
severity={row.attention.severity}
|
||||
className="ml-2 max-w-[12rem] align-middle sm:hidden"
|
||||
className="ml-2 max-w-(--sz-12rem) align-middle sm:hidden"
|
||||
/>
|
||||
}
|
||||
mobileMeta={mobileMeta}
|
||||
|
||||
@@ -64,7 +64,7 @@ export function BlockedReasonChip({
|
||||
data-severity={severity}
|
||||
aria-label={`Reason: ${label}, severity ${severity}`}
|
||||
className={cn(
|
||||
"inline-flex shrink-0 items-center gap-1 rounded-md border px-2 py-0.5 text-[10px] font-medium leading-tight sm:text-[11px]",
|
||||
"inline-flex shrink-0 items-center gap-1 rounded-md border px-2 py-0.5 text-(length:--text-nano) font-medium leading-tight sm:text-(length:--text-micro)",
|
||||
VARIANT_STYLES[variant],
|
||||
className,
|
||||
)}
|
||||
|
||||
@@ -43,30 +43,30 @@ export function BudgetIncidentCard({
|
||||
const stateLabel = incidentStateLabel(incident);
|
||||
|
||||
return (
|
||||
<Card className="overflow-hidden border-red-500/20 bg-[linear-gradient(180deg,rgba(255,70,70,0.10),rgba(255,255,255,0.02))]">
|
||||
<Card className="overflow-hidden border-red-500/20 bg-(image:--gradient-extract-4)">
|
||||
<CardHeader className="px-5 pt-5 pb-3">
|
||||
<div className="flex items-start justify-between gap-3">
|
||||
<div>
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<div className="text-[11px] uppercase tracking-[0.22em] text-red-200/80">
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-red-700/90 dark:text-red-200/80">
|
||||
{incident.scopeType} hard stop
|
||||
</div>
|
||||
<Badge variant={incident.status === "resolved" ? "outline" : "secondary"}>
|
||||
{stateLabel}
|
||||
</Badge>
|
||||
</div>
|
||||
<CardTitle className="mt-1 text-base text-red-50">{incident.scopeName}</CardTitle>
|
||||
<CardDescription className="mt-1 text-red-100/70">
|
||||
<CardTitle className="mt-1 text-base text-red-950 dark:text-red-50">{incident.scopeName}</CardTitle>
|
||||
<CardDescription className="mt-1 text-red-900/75 dark:text-red-100/70">
|
||||
Spending reached {formatCents(incident.amountObserved)} against a limit of {formatCents(incident.amountLimit)}.
|
||||
</CardDescription>
|
||||
</div>
|
||||
<div className="rounded-full border border-red-400/30 bg-red-500/10 p-2 text-red-200">
|
||||
<div className="rounded-full border border-red-400/30 bg-red-500/10 p-2 text-red-600 dark:text-red-200">
|
||||
<AlertOctagon className="h-4 w-4" />
|
||||
</div>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4 px-5 pb-5 pt-0">
|
||||
<div className="flex items-start gap-2 rounded-xl border border-red-400/20 bg-red-500/10 px-3 py-2 text-sm text-red-50/90">
|
||||
<div className="flex items-start gap-2 rounded-xl border border-red-400/20 bg-red-500/10 px-3 py-2 text-sm text-red-950/90 dark:text-red-50/90">
|
||||
<PauseCircle className="mt-0.5 h-4 w-4 shrink-0" />
|
||||
<div>
|
||||
{incident.scopeType === "project"
|
||||
@@ -76,7 +76,7 @@ export function BudgetIncidentCard({
|
||||
</div>
|
||||
|
||||
<div className="rounded-xl border border-border/60 bg-background/60 p-3">
|
||||
<label className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<label className="text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
New budget (USD)
|
||||
</label>
|
||||
<div className="mt-2 flex flex-col gap-3 sm:flex-row">
|
||||
@@ -98,7 +98,7 @@ export function BudgetIncidentCard({
|
||||
</Button>
|
||||
</div>
|
||||
{parsed !== null && parsed <= incident.amountObserved ? (
|
||||
<p className="mt-2 text-xs text-red-200/80">
|
||||
<p className="mt-2 text-xs text-red-700 dark:text-red-200/80">
|
||||
The new budget must exceed current observed spend.
|
||||
</p>
|
||||
) : null}
|
||||
|
||||
@@ -23,9 +23,9 @@ function windowLabel(windowKind: BudgetPolicySummary["windowKind"]) {
|
||||
}
|
||||
|
||||
function statusTone(status: BudgetPolicySummary["status"]) {
|
||||
if (status === "hard_stop") return "text-red-300 border-red-500/30 bg-red-500/10";
|
||||
if (status === "warning") return "text-amber-200 border-amber-500/30 bg-amber-500/10";
|
||||
return "text-emerald-200 border-emerald-500/30 bg-emerald-500/10";
|
||||
if (status === "hard_stop") return "text-red-700 dark:text-red-300 border-red-500/30 bg-red-500/10";
|
||||
if (status === "warning") return "text-amber-700 dark:text-amber-200 border-amber-500/30 bg-amber-500/10";
|
||||
return "text-emerald-700 dark:text-emerald-200 border-emerald-500/30 bg-emerald-500/10";
|
||||
}
|
||||
|
||||
export function BudgetPolicyCard({
|
||||
@@ -56,14 +56,14 @@ export function BudgetPolicyCard({
|
||||
const observedBudgetGrid = isPlain ? (
|
||||
<div className="grid gap-6 sm:grid-cols-2">
|
||||
<div>
|
||||
<div className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground">Observed</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-muted-foreground">Observed</div>
|
||||
<div className="mt-2 text-xl font-semibold tabular-nums">{formatCents(summary.observedAmount)}</div>
|
||||
<div className="mt-1 text-xs text-muted-foreground">
|
||||
{summary.amount > 0 ? `${summary.utilizationPercent}% of limit` : "No cap configured"}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground">Budget</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-muted-foreground">Budget</div>
|
||||
<div className="mt-2 text-xl font-semibold tabular-nums">
|
||||
{summary.amount > 0 ? formatCents(summary.amount) : "Disabled"}
|
||||
</div>
|
||||
@@ -75,14 +75,14 @@ export function BudgetPolicyCard({
|
||||
) : (
|
||||
<div className="grid gap-3 sm:grid-cols-2">
|
||||
<div className="rounded-xl border border-border/70 bg-black/[0.18] px-4 py-3">
|
||||
<div className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground">Observed</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-muted-foreground">Observed</div>
|
||||
<div className="mt-2 text-xl font-semibold tabular-nums">{formatCents(summary.observedAmount)}</div>
|
||||
<div className="mt-1 text-xs text-muted-foreground">
|
||||
{summary.amount > 0 ? `${summary.utilizationPercent}% of limit` : "No cap configured"}
|
||||
</div>
|
||||
</div>
|
||||
<div className="rounded-xl border border-border/70 bg-black/[0.18] px-4 py-3">
|
||||
<div className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground">Budget</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-muted-foreground">Budget</div>
|
||||
<div className="mt-2 text-xl font-semibold tabular-nums">
|
||||
{summary.amount > 0 ? formatCents(summary.amount) : "Disabled"}
|
||||
</div>
|
||||
@@ -102,12 +102,12 @@ export function BudgetPolicyCard({
|
||||
<div className={cn("h-2 overflow-hidden rounded-full", isPlain ? "bg-border/70" : "bg-muted/70")}>
|
||||
<div
|
||||
className={cn(
|
||||
"h-full rounded-full transition-[width,background-color] duration-200",
|
||||
"h-full rounded-full transition-(--tp-width-background-color) duration-200",
|
||||
summary.status === "hard_stop"
|
||||
? "bg-red-400"
|
||||
? "bg-(--status-task-blocked)"
|
||||
: summary.status === "warning"
|
||||
? "bg-amber-300"
|
||||
: "bg-emerald-300",
|
||||
? "bg-(--status-task-todo)"
|
||||
: "bg-(--status-task-done)",
|
||||
)}
|
||||
style={{ width: `${progress}%` }}
|
||||
/>
|
||||
@@ -116,7 +116,7 @@ export function BudgetPolicyCard({
|
||||
);
|
||||
|
||||
const pausedPane = summary.paused ? (
|
||||
<div className="flex items-start gap-2 rounded-xl border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-100">
|
||||
<div className="flex items-start gap-2 rounded-xl border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-900 dark:text-red-100">
|
||||
<PauseCircle className="mt-0.5 h-4 w-4 shrink-0" />
|
||||
<div>
|
||||
{summary.scopeType === "project"
|
||||
@@ -129,7 +129,7 @@ export function BudgetPolicyCard({
|
||||
const saveSection = onSave ? (
|
||||
<div className={cn("flex flex-col gap-3 sm:flex-row sm:items-end", isPlain ? "" : "rounded-xl border border-border/70 bg-background/50 p-3")}>
|
||||
<div className="min-w-0 flex-1">
|
||||
<label className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<label className="text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Budget (USD)
|
||||
</label>
|
||||
<Input
|
||||
@@ -156,7 +156,7 @@ export function BudgetPolicyCard({
|
||||
<div className="space-y-6">
|
||||
<div className="flex items-start justify-between gap-6">
|
||||
<div>
|
||||
<div className="text-[11px] uppercase tracking-[0.22em] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
{summary.scopeType}
|
||||
</div>
|
||||
<div className="mt-2 text-xl font-semibold">{summary.scopeName}</div>
|
||||
@@ -164,11 +164,11 @@ export function BudgetPolicyCard({
|
||||
</div>
|
||||
<div
|
||||
className={cn(
|
||||
"inline-flex items-center gap-2 text-[11px] uppercase tracking-[0.18em]",
|
||||
"inline-flex items-center gap-2 text-(length:--text-micro) uppercase tracking-(--tracking-caps)",
|
||||
summary.status === "hard_stop"
|
||||
? "text-red-300"
|
||||
? "text-red-700 dark:text-red-300"
|
||||
: summary.status === "warning"
|
||||
? "text-amber-200"
|
||||
? "text-amber-800 dark:text-amber-200"
|
||||
: "text-muted-foreground",
|
||||
)}
|
||||
>
|
||||
@@ -189,17 +189,17 @@ export function BudgetPolicyCard({
|
||||
}
|
||||
|
||||
return (
|
||||
<Card className={cn("overflow-hidden border-border/70 bg-card/80", compact ? "" : "shadow-[0_20px_80px_-40px_rgba(0,0,0,0.55)]")}>
|
||||
<Card className={cn("overflow-hidden border-border/70 bg-card/80", compact ? "" : "shadow-(--shadow-extract-2)")}>
|
||||
<CardHeader className={cn("gap-3", compact ? "px-4 pt-4 pb-2" : "px-5 pt-5 pb-3")}>
|
||||
<div className="flex items-start justify-between gap-3">
|
||||
<div>
|
||||
<div className="text-[11px] uppercase tracking-[0.22em] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
{summary.scopeType}
|
||||
</div>
|
||||
<CardTitle className="mt-1 text-base">{summary.scopeName}</CardTitle>
|
||||
<CardDescription className="mt-1">{windowLabel(summary.windowKind)}</CardDescription>
|
||||
</div>
|
||||
<div className={cn("inline-flex items-center gap-2 rounded-full border px-3 py-1 text-[11px] uppercase tracking-[0.18em]", statusTone(summary.status))}>
|
||||
<div className={cn("inline-flex items-center gap-2 rounded-full border px-3 py-1 text-(length:--text-micro) uppercase tracking-(--tracking-caps)", statusTone(summary.status))}>
|
||||
<StatusIcon className="h-3.5 w-3.5" />
|
||||
{summary.paused ? "Paused" : summary.status === "warning" ? "Warning" : summary.status === "hard_stop" ? "Hard stop" : "Healthy"}
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@ export function BudgetSidebarMarker({
|
||||
<span
|
||||
title={accessibleTitle}
|
||||
aria-label={accessibleTitle}
|
||||
className={`ml-auto inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full shadow-[0_0_0_1px_rgba(255,255,255,0.08)] ${levelClasses[level]}`}
|
||||
className={`ml-auto inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full shadow-(--shadow-extract-3) ${levelClasses[level]}`}
|
||||
>
|
||||
<DollarSign className="h-3 w-3" />
|
||||
</span>
|
||||
|
||||
@@ -160,7 +160,7 @@ describe("ChatComposer", () => {
|
||||
const el = input();
|
||||
expect(el.getAttribute("wrap")).toBe("soft");
|
||||
expect(el.className).toContain("overflow-y-auto");
|
||||
expect(el.className).toContain("max-h-[200px]");
|
||||
expect(el.className).toContain("max-h-(--sz-200px)");
|
||||
expect(el.className).not.toContain("whitespace-nowrap");
|
||||
expect(el.className).not.toContain("overflow-x-auto");
|
||||
act(() => root.unmount());
|
||||
@@ -174,7 +174,7 @@ describe("ChatComposer", () => {
|
||||
const el = input();
|
||||
expect(el.getAttribute("wrap")).toBe("off");
|
||||
expect(el.className).toContain("whitespace-nowrap");
|
||||
expect(el.className).toContain("max-h-[22px]");
|
||||
expect(el.className).toContain("max-h-(--sz-22px)");
|
||||
act(() => root.unmount());
|
||||
});
|
||||
|
||||
@@ -225,8 +225,8 @@ describe("ChatComposer", () => {
|
||||
expect(box.className).toContain("bg-background/95");
|
||||
expect(box.className).toContain("supports-[backdrop-filter]:bg-background/85");
|
||||
expect(box.className).toContain("backdrop-blur");
|
||||
expect(box.className).toContain("shadow-[0_-12px_28px_rgba(15,23,42,0.08)]");
|
||||
expect(box.className).toContain("dark:shadow-[0_-12px_28px_rgba(0,0,0,0.28)]");
|
||||
expect(box.className).toContain("shadow-(--shadow-extract-4)");
|
||||
expect(box.className).toContain("dark:shadow-(--shadow-extract-5)");
|
||||
expect(box.className).not.toContain("bg-card");
|
||||
// Shared chrome survives: rounded-xl corners + neutral focus darkening.
|
||||
expect(box.className).toContain("rounded-xl");
|
||||
|
||||
@@ -231,7 +231,7 @@ export const ChatComposer = forwardRef<ChatComposerHandle, ChatComposerProps>(fu
|
||||
"relative rounded-xl border px-3 pt-2.5 pb-2 transition-colors duration-150 focus-within:border-muted-foreground/40",
|
||||
// Surface: opaque card vs the task glass recipe (IssueChatThread.tsx shell).
|
||||
surface === "translucent"
|
||||
? "border-border/70 bg-background/95 shadow-[0_-12px_28px_rgba(15,23,42,0.08)] backdrop-blur supports-[backdrop-filter]:bg-background/85 dark:shadow-[0_-12px_28px_rgba(0,0,0,0.28)]"
|
||||
? "border-border/70 bg-background/95 shadow-(--shadow-extract-4) backdrop-blur supports-[backdrop-filter]:bg-background/85 dark:shadow-(--shadow-extract-5)"
|
||||
: "border-border bg-card",
|
||||
// No blue focus ring — neutral border darkening only.
|
||||
isAsk &&
|
||||
@@ -250,7 +250,7 @@ export const ChatComposer = forwardRef<ChatComposerHandle, ChatComposerProps>(fu
|
||||
{isDragOver && canAttach ? (
|
||||
<div
|
||||
data-testid="chat-composer-drop-overlay"
|
||||
className="pointer-events-none absolute inset-1.5 z-20 flex items-center justify-center rounded-lg border border-dashed border-muted-foreground/50 bg-background/80 text-xs text-muted-foreground backdrop-blur-[1px]"
|
||||
className="pointer-events-none absolute inset-1.5 z-20 flex items-center justify-center rounded-lg border border-dashed border-muted-foreground/50 bg-background/80 text-xs text-muted-foreground backdrop-blur-(--blur-1px)"
|
||||
>
|
||||
<span className="inline-flex items-center gap-2">
|
||||
<Paperclip className="h-3.5 w-3.5" />
|
||||
@@ -271,10 +271,10 @@ export const ChatComposer = forwardRef<ChatComposerHandle, ChatComposerProps>(fu
|
||||
rows={1}
|
||||
wrap={singleLine ? "off" : "soft"}
|
||||
className={cn(
|
||||
"block min-h-[22px] w-full resize-none border-0 bg-transparent p-0 text-sm leading-6 text-foreground outline-none placeholder:text-muted-foreground focus:outline-none focus:ring-0",
|
||||
"block min-h-(--sz-22px) w-full resize-none border-0 bg-transparent p-0 text-sm leading-6 text-foreground outline-none placeholder:text-muted-foreground focus:outline-none focus:ring-0",
|
||||
singleLine
|
||||
? "max-h-[22px] overflow-x-auto whitespace-nowrap"
|
||||
: "max-h-[200px] overflow-y-auto",
|
||||
? "max-h-(--sz-22px) overflow-x-auto whitespace-nowrap"
|
||||
: "max-h-(--sz-200px) overflow-y-auto",
|
||||
textareaClassName,
|
||||
)}
|
||||
/>
|
||||
@@ -323,7 +323,7 @@ export const ChatComposer = forwardRef<ChatComposerHandle, ChatComposerProps>(fu
|
||||
) : null}
|
||||
|
||||
{hint ? (
|
||||
<div className="mt-2 inline-flex items-center rounded-full border border-border/70 bg-muted/30 px-2 py-0.5 text-[11px] text-muted-foreground">
|
||||
<div className="mt-2 inline-flex items-center rounded-full border border-border/70 bg-muted/30 px-2 py-0.5 text-(length:--text-micro) text-muted-foreground">
|
||||
{hint}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
@@ -46,8 +46,8 @@ function orderedWindows(windows: QuotaWindow[]): QuotaWindow[] {
|
||||
|
||||
function fillClass(usedPercent: number | null): string {
|
||||
if (usedPercent == null) return "bg-zinc-700";
|
||||
if (usedPercent >= 90) return "bg-red-400";
|
||||
if (usedPercent >= 70) return "bg-amber-400";
|
||||
if (usedPercent >= 90) return "bg-(--status-task-blocked)";
|
||||
if (usedPercent >= 70) return "bg-(--status-task-todo)";
|
||||
return "bg-primary/70";
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export function ClaudeSubscriptionPanel({
|
||||
<div className="border border-border px-4 py-4">
|
||||
<div className="flex items-start justify-between gap-3 border-b border-border pb-3">
|
||||
<div className="min-w-0">
|
||||
<div className="text-[11px] font-semibold uppercase tracking-[0.2em] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Anthropic subscription
|
||||
</div>
|
||||
<div className="mt-1 text-sm text-muted-foreground">
|
||||
@@ -70,7 +70,7 @@ export function ClaudeSubscriptionPanel({
|
||||
</div>
|
||||
</div>
|
||||
{source ? (
|
||||
<span className="shrink-0 border border-border px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground">
|
||||
<span className="shrink-0 border border-border px-2.5 py-1 text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
{quotaSourceDisplayName(source)}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -127,7 +127,7 @@ export function ClaudeSubscriptionPanel({
|
||||
|
||||
<div className="mt-3 h-2 overflow-hidden bg-muted">
|
||||
<div
|
||||
className={cn("h-full transition-[width] duration-200", fillClass(window.usedPercent))}
|
||||
className={cn("h-full transition-(--tp-width) duration-200", fillClass(window.usedPercent))}
|
||||
style={{ width: `${width}%` }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -42,8 +42,8 @@ function detailText(window: QuotaWindow): string | null {
|
||||
|
||||
function fillClass(usedPercent: number | null): string {
|
||||
if (usedPercent == null) return "bg-zinc-700";
|
||||
if (usedPercent >= 90) return "bg-red-400";
|
||||
if (usedPercent >= 70) return "bg-amber-400";
|
||||
if (usedPercent >= 90) return "bg-(--status-task-blocked)";
|
||||
if (usedPercent >= 70) return "bg-(--status-task-todo)";
|
||||
return "bg-primary/70";
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export function CodexSubscriptionPanel({
|
||||
<div className="border border-border px-4 py-4">
|
||||
<div className="flex items-start justify-between gap-3 border-b border-border pb-3">
|
||||
<div className="min-w-0">
|
||||
<div className="text-[11px] font-semibold uppercase tracking-[0.2em] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Codex subscription
|
||||
</div>
|
||||
<div className="mt-1 text-sm text-muted-foreground">
|
||||
@@ -73,7 +73,7 @@ export function CodexSubscriptionPanel({
|
||||
</div>
|
||||
</div>
|
||||
{source ? (
|
||||
<span className="shrink-0 border border-border px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground">
|
||||
<span className="shrink-0 border border-border px-2.5 py-1 text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
{quotaSourceDisplayName(source)}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -87,7 +87,7 @@ export function CodexSubscriptionPanel({
|
||||
|
||||
<div className="mt-4 space-y-5">
|
||||
<div className="space-y-3">
|
||||
<div className="text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Account windows
|
||||
</div>
|
||||
<div className="space-y-3">
|
||||
@@ -99,7 +99,7 @@ export function CodexSubscriptionPanel({
|
||||
|
||||
{modelWindows.length > 0 ? (
|
||||
<div className="space-y-3">
|
||||
<div className="text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Model windows
|
||||
</div>
|
||||
<div className="space-y-3">
|
||||
@@ -148,7 +148,7 @@ function QuotaWindowRow({ window }: { window: QuotaWindow }) {
|
||||
|
||||
<div className="mt-3 h-2 overflow-hidden bg-muted">
|
||||
<div
|
||||
className={cn("h-full transition-[width] duration-200", fillClass(window.usedPercent))}
|
||||
className={cn("h-full transition-(--tp-width) duration-200", fillClass(window.usedPercent))}
|
||||
style={{ width: `${Math.max(0, Math.min(100, window.usedPercent))}%` }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -209,7 +209,7 @@ export function CommandPalette() {
|
||||
{showSearchAll ? (
|
||||
<span>
|
||||
No quick task matches. Press{" "}
|
||||
<kbd className="rounded border border-border bg-muted px-1 py-0.5 text-[10px]">↵</kbd>{" "}
|
||||
<kbd className="rounded border border-border bg-muted px-1 py-0.5 text-(length:--text-nano)">↵</kbd>{" "}
|
||||
to <span className="font-medium">search all</span> or keep typing to refine.
|
||||
</span>
|
||||
) : (
|
||||
@@ -231,7 +231,7 @@ export function CommandPalette() {
|
||||
</span>
|
||||
<span className="ml-auto inline-flex items-center gap-1 text-xs text-muted-foreground">
|
||||
<span>open full search</span>
|
||||
<kbd className="rounded border border-border bg-background px-1 py-0.5 text-[10px]">↵</kbd>
|
||||
<kbd className="rounded border border-border bg-background px-1 py-0.5 text-(length:--text-nano)">↵</kbd>
|
||||
</span>
|
||||
</CommandItem>
|
||||
</CommandGroup>
|
||||
|
||||
@@ -233,7 +233,7 @@ function runStatusClass(status: string) {
|
||||
case "timed_out":
|
||||
return "text-orange-700 dark:text-orange-300";
|
||||
case "running":
|
||||
return "text-cyan-700 dark:text-cyan-300";
|
||||
return "text-blue-700 dark:text-blue-300";
|
||||
case "queued":
|
||||
case "pending":
|
||||
return "text-amber-700 dark:text-amber-300";
|
||||
@@ -374,12 +374,12 @@ function CommentCard({
|
||||
)}
|
||||
<span className="flex items-center gap-1.5">
|
||||
{isQueued ? (
|
||||
<span className="inline-flex items-center rounded-full border border-amber-400/60 bg-amber-100/70 px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.14em] text-amber-800 dark:border-amber-400/40 dark:bg-amber-500/20 dark:text-amber-200">
|
||||
<span className="inline-flex items-center rounded-full border border-amber-400/60 bg-amber-100/70 px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:border-amber-400/40 dark:bg-amber-500/20 dark:text-amber-200">
|
||||
Queued
|
||||
</span>
|
||||
) : null}
|
||||
{followUpRequested ? (
|
||||
<Badge variant="outline" className="text-[10px] uppercase tracking-[0.14em]">
|
||||
<Badge variant="outline" className="text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow)">
|
||||
Follow-up
|
||||
</Badge>
|
||||
) : null}
|
||||
@@ -446,12 +446,12 @@ function CommentCard({
|
||||
comment.runAgentId ? (
|
||||
<Link
|
||||
to={`/agents/${comment.runAgentId}/runs/${comment.runId}`}
|
||||
className="inline-flex items-center rounded-md border border-border bg-accent/30 px-2 py-1 text-[10px] font-mono text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors"
|
||||
className="inline-flex items-center rounded-md border border-border bg-accent/30 px-2 py-1 text-(length:--text-nano) font-mono text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors"
|
||||
>
|
||||
run {comment.runId.slice(0, 8)}
|
||||
</Link>
|
||||
) : (
|
||||
<span className="inline-flex items-center rounded-md border border-border bg-accent/30 px-2 py-1 text-[10px] font-mono text-muted-foreground">
|
||||
<span className="inline-flex items-center rounded-md border border-border bg-accent/30 px-2 py-1 text-(length:--text-nano) font-mono text-muted-foreground">
|
||||
run {comment.runId.slice(0, 8)}
|
||||
</span>
|
||||
)
|
||||
@@ -463,12 +463,12 @@ function CommentCard({
|
||||
{comment.runAgentId ? (
|
||||
<Link
|
||||
to={`/agents/${comment.runAgentId}/runs/${comment.runId}`}
|
||||
className="inline-flex items-center rounded-md border border-border bg-accent/30 px-2 py-1 text-[10px] font-mono text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors"
|
||||
className="inline-flex items-center rounded-md border border-border bg-accent/30 px-2 py-1 text-(length:--text-nano) font-mono text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors"
|
||||
>
|
||||
run {comment.runId.slice(0, 8)}
|
||||
</Link>
|
||||
) : (
|
||||
<span className="inline-flex items-center rounded-md border border-border bg-accent/30 px-2 py-1 text-[10px] font-mono text-muted-foreground">
|
||||
<span className="inline-flex items-center rounded-md border border-border bg-accent/30 px-2 py-1 text-(length:--text-nano) font-mono text-muted-foreground">
|
||||
run {comment.runId.slice(0, 8)}
|
||||
</span>
|
||||
)}
|
||||
@@ -516,7 +516,7 @@ function TimelineEventCard({
|
||||
|
||||
{event.statusChange ? (
|
||||
<div className="flex flex-wrap items-center gap-2 text-sm">
|
||||
<span className="w-14 text-[10px] font-medium uppercase tracking-[0.14em] text-muted-foreground">
|
||||
<span className="w-14 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Status
|
||||
</span>
|
||||
<span className="text-muted-foreground">
|
||||
@@ -531,7 +531,7 @@ function TimelineEventCard({
|
||||
|
||||
{event.assigneeChange ? (
|
||||
<div className="flex flex-wrap items-center gap-2 text-sm">
|
||||
<span className="w-14 text-[10px] font-medium uppercase tracking-[0.14em] text-muted-foreground">
|
||||
<span className="w-14 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Assignee
|
||||
</span>
|
||||
<span className="text-muted-foreground">
|
||||
@@ -546,7 +546,7 @@ function TimelineEventCard({
|
||||
|
||||
{event.workspaceChange ? (
|
||||
<div className="flex flex-wrap items-center gap-2 text-sm">
|
||||
<span className="w-14 text-[10px] font-medium uppercase tracking-[0.14em] text-muted-foreground">
|
||||
<span className="w-14 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Workspace
|
||||
</span>
|
||||
<span className="text-muted-foreground">
|
||||
@@ -672,7 +672,7 @@ const TimelineList = memo(function TimelineList({
|
||||
</div>
|
||||
</div>
|
||||
{run.environment || run.environmentLease ? (
|
||||
<div className="mt-2 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground">
|
||||
<div className="mt-2 flex flex-wrap gap-x-3 gap-y-1 text-(length:--text-micro) text-muted-foreground">
|
||||
{run.environment ? (
|
||||
<span>
|
||||
Environment <span className="text-foreground">{run.environment.name}</span>
|
||||
@@ -989,7 +989,7 @@ export function CommentThread({
|
||||
{queuedComments.length > 0 && (
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<h4 className="text-xs font-semibold uppercase tracking-[0.14em] text-amber-700 dark:text-amber-300">
|
||||
<h4 className="text-xs font-semibold uppercase tracking-(--tracking-eyebrow) text-amber-700 dark:text-amber-300">
|
||||
Queued Comments ({queuedComments.length})
|
||||
</h4>
|
||||
{onInterruptQueued && queuedComments[0]?.queueTargetRunId ? (
|
||||
@@ -1035,7 +1035,7 @@ export function CommentThread({
|
||||
mentions={mentions}
|
||||
onSubmit={handleSubmit}
|
||||
imageUploadHandler={imageUploadHandler}
|
||||
contentClassName="min-h-[60px] text-sm"
|
||||
contentClassName="min-h-(--sz-60px) text-sm"
|
||||
/>
|
||||
<div className="flex items-center justify-end gap-3">
|
||||
{(imageUploadHandler || onAttachImage) && (
|
||||
|
||||
@@ -125,6 +125,7 @@ function makeCompanyPatternDataUrl(seed: string, brandColor?: string | null, log
|
||||
const diagonalPhase = rand() * Math.PI * 2;
|
||||
const antiDiagonalPhase = rand() * Math.PI * 2;
|
||||
|
||||
// token-extraction: allowlisted — canvas 2D fillStyle computed at runtime from numeric channel props; not a static literal.
|
||||
ctx.fillStyle = `rgb(${offR} ${offG} ${offB})`;
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
@@ -208,7 +209,7 @@ export function CompanyPatternIcon({
|
||||
<div className="absolute inset-0 bg-muted" />
|
||||
)}
|
||||
{!logo && (
|
||||
<span className="relative z-10 drop-shadow-[0_1px_2px_rgba(0,0,0,0.65)]">
|
||||
<span className="relative z-10 drop-shadow-(--drop-shadow-extract-1)">
|
||||
{initial}
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -100,7 +100,7 @@ export function CompanySettingsSidebar() {
|
||||
</div>
|
||||
|
||||
<nav className="flex-1 min-h-0 overflow-y-auto scrollbar-auto-hide px-3 py-2">
|
||||
<div className="px-3 pb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground">
|
||||
<div className="px-3 pb-1 text-(length:--text-micro) font-semibold uppercase tracking-wide text-muted-foreground">
|
||||
Company settings
|
||||
</div>
|
||||
<div className="flex flex-col gap-0.5">
|
||||
@@ -134,7 +134,7 @@ export function CompanySettingsSidebar() {
|
||||
<SidebarNavItem to="/company/settings/invites" label="Invites" icon={MailPlus} end />
|
||||
<SidebarNavItem to="/company/settings/secrets" label="Secrets" icon={KeyRound} end />
|
||||
</div>
|
||||
<div className="mt-5 px-3 pb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground">
|
||||
<div className="mt-5 px-3 pb-1 text-(length:--text-micro) font-semibold uppercase tracking-wide text-muted-foreground">
|
||||
Instance settings
|
||||
</div>
|
||||
<div className="flex flex-col gap-0.5">
|
||||
|
||||
@@ -55,7 +55,7 @@ export function CompanySwitcher({ open: controlledOpen, onOpenChange }: CompanyS
|
||||
<ChevronsUpDown className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="start" className="w-[220px]">
|
||||
<DropdownMenuContent align="start" className="w-(--sz-220px)">
|
||||
<DropdownMenuLabel>Companies</DropdownMenuLabel>
|
||||
<DropdownMenuSeparator />
|
||||
{sidebarCompanies.map((company) => (
|
||||
|
||||
@@ -68,11 +68,11 @@ export function DevRestartBanner({ devServer }: { devServer?: DevServerHealthSta
|
||||
<div className="border-b border-amber-300/60 bg-amber-50 text-amber-950 dark:border-amber-500/25 dark:bg-amber-500/10 dark:text-amber-100">
|
||||
<div className="flex flex-col gap-3 px-3 py-2.5 md:flex-row md:items-center md:justify-between">
|
||||
<div className="min-w-0">
|
||||
<div className="flex items-center gap-2 text-[12px] font-semibold uppercase tracking-[0.18em]">
|
||||
<div className="flex items-center gap-2 text-xs font-semibold uppercase tracking-(--tracking-caps)">
|
||||
<AlertTriangle className="h-3.5 w-3.5 shrink-0" />
|
||||
<span>Restart Required</span>
|
||||
{devServer.autoRestartEnabled ? (
|
||||
<span className="rounded-full bg-amber-900/10 px-2 py-0.5 text-[10px] tracking-[0.14em] dark:bg-amber-100/10">
|
||||
<span className="rounded-full bg-amber-900/10 px-2 py-0.5 text-(length:--text-nano) tracking-(--tracking-eyebrow) dark:bg-amber-100/10">
|
||||
Auto-Restart On
|
||||
</span>
|
||||
) : null}
|
||||
|
||||
@@ -473,7 +473,7 @@ export function DocumentAnnotationLayer({
|
||||
: isStale
|
||||
? "bg-yellow-200 outline outline-2 outline-dashed outline-offset-0 outline-yellow-700/65 dark:bg-yellow-600 dark:outline-yellow-200/70"
|
||||
: isFocused
|
||||
? "bg-yellow-300 outline outline-2 outline-offset-0 outline-yellow-700/85 shadow-[0_0_0_1px_var(--color-background)] dark:bg-yellow-500 dark:outline-yellow-200/85"
|
||||
? "bg-yellow-300 outline outline-2 outline-offset-0 outline-yellow-700/85 shadow-(--shadow-extract-6) dark:bg-yellow-500 dark:outline-yellow-200/85"
|
||||
: "bg-yellow-200 dark:bg-yellow-600",
|
||||
)}
|
||||
style={{
|
||||
@@ -489,7 +489,7 @@ export function DocumentAnnotationLayer({
|
||||
</div>
|
||||
) : null}
|
||||
<div
|
||||
className="paperclip-doc-annotation-layer pointer-events-none absolute inset-0 z-[2]"
|
||||
className="paperclip-doc-annotation-layer pointer-events-none absolute inset-0 z-(--z-2)"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div ref={overlayRef} className="relative h-full w-full">
|
||||
|
||||
@@ -71,7 +71,7 @@ export function DocumentAnnotationPanel(props: AnnotationPanelProps) {
|
||||
<SheetContent
|
||||
side="bottom"
|
||||
showCloseButton={false}
|
||||
className="paperclip-doc-annotation-sheet z-[60] flex max-h-[88vh] flex-col rounded-none border-t border-border bg-popover p-0 text-popover-foreground shadow-2xl"
|
||||
className="paperclip-doc-annotation-sheet z-(--z-60) flex max-h-(--sz-88vh) flex-col rounded-none border-t border-border bg-popover p-0 text-popover-foreground shadow-2xl"
|
||||
>
|
||||
<SheetTitle className="sr-only">
|
||||
Comments on {props.documentKey} revision {props.documentRevisionNumber}
|
||||
@@ -91,7 +91,7 @@ export function DocumentAnnotationPanel(props: AnnotationPanelProps) {
|
||||
aria-label={`Annotations for ${props.documentKey.toUpperCase()}, revision ${props.documentRevisionNumber}`}
|
||||
data-testid="document-annotation-panel"
|
||||
className={cn(
|
||||
"isolate flex h-full max-h-[80vh] w-[360px] shrink-0 flex-col overflow-hidden rounded-none border border-border bg-popover text-popover-foreground shadow-xl",
|
||||
"isolate flex h-full max-h-(--sz-80vh) w-(--sz-360px) shrink-0 flex-col overflow-hidden rounded-none border border-border bg-popover text-popover-foreground shadow-xl",
|
||||
props.className,
|
||||
)}
|
||||
style={props.desktopWidth ? { width: props.desktopWidth, maxWidth: props.desktopWidth } : undefined}
|
||||
@@ -328,7 +328,7 @@ function AnnotationPanelBody(props: AnnotationPanelProps) {
|
||||
data-testid={bodyTestId}
|
||||
className="flex items-center justify-end gap-1 border-b border-border bg-popover px-2 py-1.5"
|
||||
>
|
||||
<span className="text-[11px] tabular-nums text-muted-foreground">
|
||||
<span className="text-(length:--text-micro) tabular-nums text-muted-foreground">
|
||||
rev {props.documentRevisionNumber}
|
||||
</span>
|
||||
<Button
|
||||
@@ -348,7 +348,7 @@ function AnnotationPanelBody(props: AnnotationPanelProps) {
|
||||
{props.newCommentDisabled && props.newCommentDisabledReason ? (
|
||||
<p
|
||||
data-testid="document-annotation-disabled-reason"
|
||||
className="border-b border-border bg-muted px-3 py-1.5 text-[11px] text-muted-foreground"
|
||||
className="border-b border-border bg-muted px-3 py-1.5 text-(length:--text-micro) text-muted-foreground"
|
||||
>
|
||||
{props.newCommentDisabledReason}
|
||||
</p>
|
||||
@@ -356,7 +356,7 @@ function AnnotationPanelBody(props: AnnotationPanelProps) {
|
||||
{mutationError ? (
|
||||
<p
|
||||
data-testid="document-annotation-error"
|
||||
className="border-b border-border bg-destructive/10 px-3 py-1.5 text-[11px] text-destructive"
|
||||
className="border-b border-border bg-destructive/10 px-3 py-1.5 text-(length:--text-micro) text-destructive"
|
||||
>
|
||||
{mutationError}
|
||||
</p>
|
||||
@@ -408,7 +408,7 @@ function AnnotationPanelBody(props: AnnotationPanelProps) {
|
||||
{currentUser.image ? <AvatarImage src={currentUser.image} alt={currentUser.name} /> : null}
|
||||
<AvatarFallback>{deriveInitials(currentUser.name)}</AvatarFallback>
|
||||
</Avatar>
|
||||
<span className="truncate text-[11px] font-medium text-foreground">{currentUser.name}</span>
|
||||
<span className="truncate text-(length:--text-micro) font-medium text-foreground">{currentUser.name}</span>
|
||||
</div>
|
||||
<Textarea
|
||||
ref={composerRef}
|
||||
@@ -626,7 +626,7 @@ function CommentRow({
|
||||
focused && "ring-2 ring-primary/40",
|
||||
)}
|
||||
>
|
||||
<div className="mb-0.5 flex items-center justify-between gap-2 text-[11px]">
|
||||
<div className="mb-0.5 flex items-center justify-between gap-2 text-(length:--text-micro)">
|
||||
<span className="flex min-w-0 items-center gap-1.5">
|
||||
<Avatar size="xs" className="shrink-0">
|
||||
{author.role === "agent" ? (
|
||||
|
||||
@@ -73,8 +73,8 @@ export function DocumentDiffModal({
|
||||
|
||||
const lineClassesByKind: Record<DiffRow["kind"], string> = {
|
||||
context: "bg-transparent",
|
||||
removed: "bg-red-500/10 text-red-100",
|
||||
added: "bg-green-500/10 text-green-100",
|
||||
removed: "bg-red-500/10 text-red-900 dark:text-red-100",
|
||||
added: "bg-green-500/10 text-green-900 dark:text-green-100",
|
||||
};
|
||||
|
||||
const markerByKind: Record<DiffRow["kind"], string> = {
|
||||
@@ -85,7 +85,7 @@ export function DocumentDiffModal({
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="!max-w-[90%] w-full max-h-[85vh] overflow-hidden flex flex-col">
|
||||
<DialogContent className="!max-w-(--pct-90) w-full max-h-(--sz-85vh) overflow-hidden flex flex-col">
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<DialogHeader className="shrink-0">
|
||||
<DialogTitle>
|
||||
@@ -95,7 +95,7 @@ export function DocumentDiffModal({
|
||||
|
||||
<div className="flex items-center gap-4 shrink-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="rounded-full border border-red-500/30 bg-red-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-red-400">Old</span>
|
||||
<span className="rounded-full border border-red-500/30 bg-red-500/10 px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wider text-red-400">Old</span>
|
||||
<Select
|
||||
value={effectiveLeftId ?? ""}
|
||||
onValueChange={(value) => setLeftRevisionId(value)}
|
||||
@@ -113,7 +113,7 @@ export function DocumentDiffModal({
|
||||
</Select>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="rounded-full border border-green-500/30 bg-green-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-green-400">New</span>
|
||||
<span className="rounded-full border border-green-500/30 bg-green-500/10 px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wider text-green-400">New</span>
|
||||
<Select
|
||||
value={effectiveRightId ?? ""}
|
||||
onValueChange={(value) => setRightRevisionId(value)}
|
||||
@@ -141,8 +141,8 @@ export function DocumentDiffModal({
|
||||
) : leftRevision.id === rightRevision.id ? (
|
||||
<div className="p-6 text-center text-muted-foreground text-sm">Both sides are the same revision.</div>
|
||||
) : (
|
||||
<div className="font-mono text-[12px] leading-6">
|
||||
<div className="grid grid-cols-[56px_56px_24px_minmax(0,1fr)] border-b border-border/60 bg-muted/30 px-3 py-2 text-[11px] uppercase tracking-wide text-muted-foreground">
|
||||
<div className="font-mono text-xs leading-6">
|
||||
<div className="grid grid-cols-(--gtc-1) border-b border-border/60 bg-muted/30 px-3 py-2 text-(length:--text-micro) uppercase tracking-wide text-muted-foreground">
|
||||
<span>Old</span>
|
||||
<span>New</span>
|
||||
<span />
|
||||
@@ -151,7 +151,7 @@ export function DocumentDiffModal({
|
||||
{diffRows.map((row, index) => (
|
||||
<div
|
||||
key={`${row.kind}-${index}-${row.oldLineNumber ?? "x"}-${row.newLineNumber ?? "x"}`}
|
||||
className={`grid grid-cols-[56px_56px_24px_minmax(0,1fr)] gap-0 border-b border-border/30 px-3 ${lineClassesByKind[row.kind]}`}
|
||||
className={`grid grid-cols-(--gtc-1) gap-0 border-b border-border/30 px-3 ${lineClassesByKind[row.kind]}`}
|
||||
>
|
||||
<span className="select-none border-r border-border/30 pr-3 text-right text-muted-foreground">
|
||||
{row.oldLineNumber ?? ""}
|
||||
|
||||
@@ -74,12 +74,12 @@ export function DocumentFrameHeader({
|
||||
{documentLabel ? (
|
||||
<>
|
||||
<span className="truncate text-sm font-semibold text-foreground">{documentLabel}</span>
|
||||
<span className="shrink-0 rounded-full border border-border px-2 py-0.5 font-mono text-[10px] uppercase tracking-[0.16em] text-muted-foreground">
|
||||
<span className="shrink-0 rounded-full border border-border px-2 py-0.5 font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
{documentKey}
|
||||
</span>
|
||||
</>
|
||||
) : (
|
||||
<span className="shrink-0 rounded-full border border-border px-2 py-0.5 font-mono text-[10px] uppercase tracking-[0.16em] text-muted-foreground">
|
||||
<span className="shrink-0 rounded-full border border-border px-2 py-0.5 font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
{documentKey}
|
||||
</span>
|
||||
)}
|
||||
@@ -91,8 +91,8 @@ export function DocumentFrameHeader({
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className={cn(
|
||||
"h-auto px-1.5 py-0 text-[11px] font-normal text-muted-foreground hover:text-foreground",
|
||||
revisionMenu.historicalPreview && "text-amber-300 hover:text-amber-200",
|
||||
"h-auto px-1.5 py-0 text-(length:--text-micro) font-normal text-muted-foreground hover:text-foreground",
|
||||
revisionMenu.historicalPreview && "text-amber-700 hover:text-amber-800 dark:text-amber-300 dark:hover:text-amber-200",
|
||||
)}
|
||||
>
|
||||
rev {revisionMenu.displayedRevisionNumber}
|
||||
@@ -118,7 +118,7 @@ export function DocumentFrameHeader({
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="font-medium">rev {revision.revisionNumber}</span>
|
||||
{isCurrentRevision ? (
|
||||
<span className="rounded-full border border-border px-1.5 py-0.5 text-[10px] uppercase tracking-[0.12em] text-muted-foreground">
|
||||
<span className="rounded-full border border-border px-1.5 py-0.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Current
|
||||
</span>
|
||||
) : null}
|
||||
@@ -140,7 +140,7 @@ export function DocumentFrameHeader({
|
||||
{updatedAt ? (
|
||||
<a
|
||||
href={updatedHref ?? `#document-${encodeURIComponent(documentKey)}`}
|
||||
className="truncate text-[11px] text-muted-foreground transition-colors hover:text-foreground hover:underline"
|
||||
className="truncate text-(length:--text-micro) text-muted-foreground transition-colors hover:text-foreground hover:underline"
|
||||
>
|
||||
updated {relativeTime(updatedAt)}
|
||||
</a>
|
||||
|
||||
@@ -50,7 +50,7 @@ export function EntityRow({
|
||||
<div className={cn("min-w-0", !meta && "flex-1", titleClassName)}>
|
||||
<div className="flex items-center gap-2">
|
||||
{identifier && (
|
||||
<span className="text-xs text-muted-foreground font-mono shrink-0 relative top-[1px]">
|
||||
<span className="text-xs text-muted-foreground font-mono shrink-0 relative top-(--sz-1px)">
|
||||
{identifier}
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -97,7 +97,7 @@ export function ExecutionParticipantPicker({
|
||||
<PopoverTrigger asChild>
|
||||
<button
|
||||
className={cn(
|
||||
"inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-medium transition-colors cursor-pointer",
|
||||
"inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-(length:--text-nano) font-medium transition-colors cursor-pointer",
|
||||
values.length > 0
|
||||
? "border-border text-foreground hover:bg-accent/50"
|
||||
: "border-dashed border-border/60 text-muted-foreground hover:border-border hover:text-foreground",
|
||||
@@ -105,7 +105,7 @@ export function ExecutionParticipantPicker({
|
||||
>
|
||||
<Icon className="h-3 w-3" />
|
||||
{values.length > 0 ? (
|
||||
<span className="truncate max-w-[100px]">
|
||||
<span className="truncate max-w-(--sz-100px)">
|
||||
{values.map(participantLabel).join(", ")}
|
||||
</span>
|
||||
) : (
|
||||
|
||||
@@ -89,7 +89,7 @@ export function ExecutionWorkspaceCloseDialog({
|
||||
<Dialog open={open} onOpenChange={(nextOpen) => {
|
||||
if (!closeWorkspace.isPending) onOpenChange(nextOpen);
|
||||
}}>
|
||||
<DialogContent className="max-h-[85vh] overflow-y-auto sm:max-w-2xl">
|
||||
<DialogContent className="max-h-(--sz-85vh) overflow-y-auto sm:max-w-2xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>{actionLabel}</DialogTitle>
|
||||
<DialogDescription className="break-words">
|
||||
@@ -178,29 +178,29 @@ export function ExecutionWorkspaceCloseDialog({
|
||||
<div className="rounded-xl border border-border bg-background px-4 py-3 text-sm">
|
||||
<div className="grid gap-2 sm:grid-cols-2">
|
||||
<div>
|
||||
<div className="text-xs uppercase tracking-[0.16em] text-muted-foreground">Branch</div>
|
||||
<div className="text-xs uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Branch</div>
|
||||
<div className="font-mono text-xs">{readiness.git.branchName ?? "Unknown"}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-xs uppercase tracking-[0.16em] text-muted-foreground">Base ref</div>
|
||||
<div className="text-xs uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Base ref</div>
|
||||
<div className="font-mono text-xs">{readiness.git.baseRef ?? "Not set"}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-xs uppercase tracking-[0.16em] text-muted-foreground">Merged into base</div>
|
||||
<div className="text-xs uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Merged into base</div>
|
||||
<div>{readiness.git.isMergedIntoBase == null ? "Unknown" : readiness.git.isMergedIntoBase ? "Yes" : "No"}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-xs uppercase tracking-[0.16em] text-muted-foreground">Ahead / behind</div>
|
||||
<div className="text-xs uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Ahead / behind</div>
|
||||
<div>
|
||||
{(readiness.git.aheadCount ?? 0).toString()} / {(readiness.git.behindCount ?? 0).toString()}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-xs uppercase tracking-[0.16em] text-muted-foreground">Dirty tracked files</div>
|
||||
<div className="text-xs uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Dirty tracked files</div>
|
||||
<div>{readiness.git.dirtyEntryCount}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-xs uppercase tracking-[0.16em] text-muted-foreground">Untracked files</div>
|
||||
<div className="text-xs uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Untracked files</div>
|
||||
<div>{readiness.git.untrackedEntryCount}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -134,7 +134,7 @@ export function ExternalObjectPill({
|
||||
tone.split(" ").filter((c) => c.startsWith("text-")).join(" "),
|
||||
overlay,
|
||||
interactive
|
||||
&& "hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
|
||||
&& "hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-ring",
|
||||
className,
|
||||
);
|
||||
const titleAttr = sourceSummary
|
||||
@@ -149,11 +149,11 @@ export function ExternalObjectPill({
|
||||
sizeClassName="h-3 w-3"
|
||||
label={`${providerLabel}: ${statusLabel}`}
|
||||
/>
|
||||
<span className="max-w-[16rem] truncate font-medium">{valueLabel}</span>
|
||||
<span className="max-w-(--sz-16rem) truncate font-medium">{valueLabel}</span>
|
||||
</>
|
||||
);
|
||||
const countSuffix = typeof sourceCount === "number" && sourceCount > 1 ? (
|
||||
<span className="tabular-nums text-[10px] font-medium opacity-80">×{sourceCount}</span>
|
||||
<span className="tabular-nums text-(length:--text-nano) font-medium opacity-80">×{sourceCount}</span>
|
||||
) : null;
|
||||
const innerContent = (
|
||||
<>
|
||||
|
||||
@@ -64,7 +64,7 @@ export function ExternalObjectStatusIcon({
|
||||
// The clock overlay needs a positioned wrapper. Inline mode keeps the icon
|
||||
// tight to the surrounding text; pill mode expects to size by sizeClassName.
|
||||
const wrapperBase = inline
|
||||
? "relative mr-1 inline-flex shrink-0 align-[-0.125em]"
|
||||
? "relative mr-1 inline-flex shrink-0 align-(--va-0_125em)"
|
||||
: "relative inline-flex shrink-0";
|
||||
const iconSize = inline ? "h-3 w-3" : sizeClassName;
|
||||
const isSpinner = category === "running";
|
||||
|
||||
@@ -68,7 +68,7 @@ export function ExternalObjectStatusSummary({
|
||||
aria-label={title}
|
||||
title={title}
|
||||
className={cn(
|
||||
"inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-medium tabular-nums leading-none",
|
||||
"inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-(length:--text-nano) font-medium tabular-nums leading-none",
|
||||
badgeClass,
|
||||
compact && "px-1 py-0.5",
|
||||
className,
|
||||
|
||||
@@ -177,7 +177,7 @@ function getIconSpec(
|
||||
// Heartbeat — animated when active, static otherwise
|
||||
if (action.startsWith("heartbeat.")) {
|
||||
if (isActive && action === "heartbeat.invoked") {
|
||||
return { kind: "lucide", Icon: Loader2, color: "text-cyan-600 dark:text-cyan-400", spin: true };
|
||||
return { kind: "lucide", Icon: Loader2, color: "text-blue-600 dark:text-blue-400", spin: true };
|
||||
}
|
||||
return { kind: "lucide", Icon: Loader2, color: "text-muted-foreground" };
|
||||
}
|
||||
@@ -429,15 +429,15 @@ export function FeedCard({
|
||||
const verb = formatVerb(event.action, details, isPinned ? "pinned" : "chronological");
|
||||
const iconSpec = getIconSpec(event, details, isActive);
|
||||
|
||||
const mutedTextBase = isMuted ? "text-muted-foreground/70" : "text-[#959596]";
|
||||
const mutedTextBase = isMuted ? "text-muted-foreground/70" : "text-(--hex-959596)";
|
||||
const mutedTextHover = isMuted ? "" : "group-hover:text-white";
|
||||
|
||||
const card = (
|
||||
<div
|
||||
data-fc="card"
|
||||
className={cn(
|
||||
"group ml-3 mr-3 md:ml-0 my-2 flex items-center gap-2 rounded-lg border bg-card p-[18px] text-xs",
|
||||
"transition-[background-color,border-color] duration-150",
|
||||
"group ml-3 mr-3 md:ml-0 my-2 flex items-center gap-2 rounded-lg border bg-card p-(--sz-18px) text-xs",
|
||||
"transition-(--tp-background-color-border-color) duration-150",
|
||||
content.link && "cursor-pointer hover:bg-accent hover:border-muted-foreground/30",
|
||||
className,
|
||||
)}
|
||||
|
||||
@@ -417,8 +417,8 @@ export function FileTree({
|
||||
className={cn(
|
||||
node.kind === "dir"
|
||||
? showCheckboxes
|
||||
? "group grid w-full grid-cols-[auto_minmax(0,1fr)_2.25rem] items-center gap-x-1 pr-3 text-left text-sm text-muted-foreground hover:bg-accent/30 hover:text-foreground"
|
||||
: "group grid w-full grid-cols-[minmax(0,1fr)_2.25rem] items-center gap-x-1 pr-3 text-left text-sm text-muted-foreground hover:bg-accent/30 hover:text-foreground max-[480px]:grid-cols-[minmax(0,1fr)]"
|
||||
? "group grid w-full grid-cols-(--gtc-2) items-center gap-x-1 pr-3 text-left text-sm text-muted-foreground hover:bg-accent/30 hover:text-foreground"
|
||||
: "group grid w-full grid-cols-(--gtc-3) items-center gap-x-1 pr-3 text-left text-sm text-muted-foreground hover:bg-accent/30 hover:text-foreground max-[480px]:grid-cols-(--gtc-4)"
|
||||
: "group flex w-full items-center gap-1 pr-3 text-left text-sm text-muted-foreground hover:bg-accent/30 hover:text-foreground cursor-pointer",
|
||||
TREE_ROW_HEIGHT_CLASS,
|
||||
isSelected && "text-foreground bg-accent/20",
|
||||
@@ -466,7 +466,7 @@ export function FileTree({
|
||||
{badge && (
|
||||
<span
|
||||
className={cn(
|
||||
"ml-3 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide",
|
||||
"ml-3 shrink-0 rounded-full px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wide",
|
||||
statusBadge[badge.status] ?? statusBadgeDefault,
|
||||
)}
|
||||
title={badge.tooltip}
|
||||
@@ -478,7 +478,7 @@ export function FileTree({
|
||||
{node.kind === "dir" && (
|
||||
<button
|
||||
type="button"
|
||||
className="flex h-9 w-9 items-center justify-center self-center rounded-sm text-muted-foreground opacity-70 transition-[background-color,color,opacity] hover:bg-accent hover:text-foreground group-hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50 max-[480px]:hidden"
|
||||
className="flex h-9 w-9 items-center justify-center self-center rounded-sm text-muted-foreground opacity-70 transition-(--tp-background-color-color-opacity) hover:bg-accent hover:text-foreground group-hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50 max-[480px]:hidden"
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
onToggleDir(node.path);
|
||||
|
||||
@@ -164,7 +164,7 @@ describe("FileViewerMetadataRow", () => {
|
||||
|
||||
it("reserves metadata row height while file details load", () => {
|
||||
const markup = renderToStaticMarkup(<FileViewerMetadataRow state={state} />);
|
||||
expect(markup).toContain("min-h-[18px]");
|
||||
expect(markup).toContain("min-h-(--sz-18px)");
|
||||
expect(markup).toContain("Loading file details");
|
||||
});
|
||||
});
|
||||
@@ -223,7 +223,7 @@ export function FileViewerMetadataRow({
|
||||
state: FileViewerUrlState | null;
|
||||
}) {
|
||||
return (
|
||||
<div className="flex min-h-[18px] flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-muted-foreground">
|
||||
<div className="flex min-h-(--sz-18px) flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-muted-foreground">
|
||||
{resolvedResource ? (
|
||||
<>
|
||||
{resolvedResource.previewKind ? <span className="capitalize">{resolvedResource.previewKind}</span> : null}
|
||||
@@ -354,7 +354,7 @@ export function FileContentViewer({ content, highlightedLine, onLoaded }: FileCo
|
||||
role="region"
|
||||
aria-label={`${resource.title} source`}
|
||||
tabIndex={0}
|
||||
className="paperclip-file-viewer-code flex-1 overflow-auto bg-[var(--paperclip-code-bg,theme(colors.muted.DEFAULT))] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset"
|
||||
className="paperclip-file-viewer-code flex-1 overflow-auto bg-(--code-bg-resolved) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset"
|
||||
>
|
||||
<pre className="m-0 font-mono text-xs leading-5">
|
||||
{lines.map((lineText, index) => {
|
||||
@@ -366,17 +366,20 @@ export function FileContentViewer({ content, highlightedLine, onLoaded }: FileCo
|
||||
ref={isHighlighted ? highlightedLineRef : undefined}
|
||||
data-line-number={lineNumber}
|
||||
className={cn(
|
||||
"grid grid-cols-[auto_minmax(0,1fr)]",
|
||||
isHighlighted && "bg-[var(--paperclip-code-highlight-bg,rgba(250,204,21,0.12))]",
|
||||
"grid grid-cols-(--gtc-5)",
|
||||
// Batch 4 resolved the former half-migrated var(--x, fallback)
|
||||
// pattern here into --code-highlight-bg-resolved (see
|
||||
// ui/src/index.css MISC token block + TOKEN-AUDIT.md Batch 4 log).
|
||||
isHighlighted && "bg-(--code-highlight-bg-resolved)",
|
||||
)}
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className={cn(
|
||||
"sticky left-0 z-10 shrink-0 select-none pl-3 pr-4 text-right text-[var(--paperclip-code-gutter-fg,theme(colors.muted.foreground))] opacity-70",
|
||||
"bg-[var(--paperclip-code-bg,theme(colors.muted.DEFAULT))]",
|
||||
"sticky left-0 z-10 shrink-0 select-none pl-3 pr-4 text-right text-(--code-gutter-fg-resolved) opacity-70",
|
||||
"bg-(--code-bg-resolved)",
|
||||
isHighlighted &&
|
||||
"opacity-100 bg-[var(--paperclip-code-highlight-bg,rgba(250,204,21,0.12))] border-l-2 border-[var(--paperclip-code-highlight-border,rgb(234,179,8))]",
|
||||
"opacity-100 bg-(--code-highlight-bg-resolved) border-l-2 border-(--code-highlight-border-resolved)",
|
||||
)}
|
||||
style={{ width: gutterWidth, minWidth: gutterWidth }}
|
||||
>
|
||||
@@ -733,7 +736,7 @@ export function FileViewerSheet({
|
||||
return (
|
||||
<Dialog open={computedOpen} onOpenChange={handleOpenChange}>
|
||||
<DialogContent
|
||||
className="flex h-[min(840px,calc(100dvh-2rem))] w-[calc(100vw-2rem)] max-w-[min(1280px,calc(100vw-2rem))] flex-col gap-0 overflow-hidden p-0 sm:w-[94vw] sm:max-w-[1280px]"
|
||||
className="flex h-(--sz-calc-3) w-(--sz-calc-4) max-w-(--sz-calc-5) flex-col gap-0 overflow-hidden p-0 sm:w-(--sz-94vw) sm:max-w-(--sz-1280px)"
|
||||
aria-labelledby={FILE_VIEWER_LABELLED_BY_ID}
|
||||
aria-describedby={FILE_VIEWER_DESCRIBED_BY_ID}
|
||||
showCloseButton={false}
|
||||
@@ -746,7 +749,7 @@ export function FileViewerSheet({
|
||||
}}
|
||||
>
|
||||
<DialogHeader className="border-b border-border gap-1 p-3">
|
||||
<div className="grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-2">
|
||||
<div className="grid min-w-0 grid-cols-(--gtc-6) items-start gap-2">
|
||||
{browseMode ? (
|
||||
<FolderSearch aria-hidden="true" className="mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" />
|
||||
) : (
|
||||
|
||||
@@ -19,22 +19,22 @@ export function FinanceBillerCard({ row }: FinanceBillerCardProps) {
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<div className="text-lg font-semibold tabular-nums">{formatCents(row.netCents)}</div>
|
||||
<div className="text-[11px] uppercase tracking-[0.16em] text-muted-foreground">net</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">net</div>
|
||||
</div>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-3 px-4 pb-4 pt-3">
|
||||
<div className="grid gap-2 text-sm sm:grid-cols-3">
|
||||
<div className="border border-border p-3">
|
||||
<div className="text-[11px] uppercase tracking-[0.14em] text-muted-foreground">debits</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">debits</div>
|
||||
<div className="mt-1 font-medium tabular-nums">{formatCents(row.debitCents)}</div>
|
||||
</div>
|
||||
<div className="border border-border p-3">
|
||||
<div className="text-[11px] uppercase tracking-[0.14em] text-muted-foreground">credits</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">credits</div>
|
||||
<div className="mt-1 font-medium tabular-nums">{formatCents(row.creditCents)}</div>
|
||||
</div>
|
||||
<div className="border border-border p-3">
|
||||
<div className="text-[11px] uppercase tracking-[0.14em] text-muted-foreground">estimated</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">estimated</div>
|
||||
<div className="mt-1 font-medium tabular-nums">{formatCents(row.estimatedDebitCents)}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,7 @@ export function FinanceTimelineCard({
|
||||
<div className="text-right tabular-nums">
|
||||
<div className="text-sm font-semibold">{formatCents(row.amountCents)}</div>
|
||||
<div className="text-xs text-muted-foreground">{row.currency}</div>
|
||||
{row.estimated ? <div className="text-[11px] uppercase tracking-[0.12em] text-amber-600">estimated</div> : null}
|
||||
{row.estimated ? <div className="text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-amber-600">estimated</div> : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -102,7 +102,7 @@ export function FoldCurtain({
|
||||
ref={contentRef}
|
||||
className={cn(
|
||||
"fold-curtain__content relative overflow-hidden",
|
||||
allowTransition && "motion-safe:transition-[max-height] motion-reduce:transition-none",
|
||||
allowTransition && "motion-safe:transition-(--tp-max-height) motion-reduce:transition-none",
|
||||
contentClassName,
|
||||
)}
|
||||
style={{
|
||||
|
||||
@@ -7,7 +7,7 @@ interface FrontDoorProps {
|
||||
|
||||
export function FrontDoor({ onChoose }: FrontDoorProps) {
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center min-h-[60vh] px-8">
|
||||
<div className="flex flex-col items-center justify-center min-h-(--sz-60vh) px-8">
|
||||
<div className="text-center mb-10">
|
||||
<h2 className="text-2xl font-bold tracking-tight">
|
||||
Welcome to Paperclip
|
||||
|
||||
@@ -93,7 +93,7 @@ export function ImageGalleryModal({
|
||||
>
|
||||
{/* Top bar */}
|
||||
<div className="flex items-center justify-between px-5 py-3 text-white/80 text-sm shrink-0">
|
||||
<span className="truncate max-w-[50%] font-medium" title={filename}>
|
||||
<span className="truncate max-w-(--pct-50) font-medium" title={filename}>
|
||||
{filename}
|
||||
</span>
|
||||
<div className="flex items-center gap-4">
|
||||
|
||||
@@ -356,7 +356,7 @@ export function InlineEditor({
|
||||
<div className="flex min-h-4 items-center justify-end pr-1">
|
||||
<span
|
||||
className={cn(
|
||||
"text-[11px] transition-opacity duration-150",
|
||||
"text-(length:--text-micro) transition-opacity duration-150",
|
||||
autosaveState === "error" ? "text-destructive" : "text-muted-foreground",
|
||||
autosaveState === "idle" ? "opacity-0" : "opacity-100",
|
||||
)}
|
||||
|
||||
@@ -131,7 +131,7 @@ export const InlineEntitySelector = forwardRef<HTMLButtonElement, InlineEntitySe
|
||||
align="start"
|
||||
side="bottom"
|
||||
collisionPadding={16}
|
||||
className="w-[min(20rem,calc(100vw-2rem))] p-1"
|
||||
className="w-(--sz-calc-6) p-1"
|
||||
disablePortal={disablePortal}
|
||||
onOpenAutoFocus={(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -34,8 +34,8 @@ export function IssueAssignedBacklogNotice({
|
||||
<p className="leading-5">
|
||||
<span className="font-medium">Parked</span> —{" "}
|
||||
<span className="font-medium">{assigneeLabel}</span> will not be woken until status changes to{" "}
|
||||
<code className="rounded bg-amber-100 px-1 py-0.5 text-[12px] dark:bg-amber-400/15">todo</code> or{" "}
|
||||
<code className="rounded bg-amber-100 px-1 py-0.5 text-[12px] dark:bg-amber-400/15">in_progress</code>.
|
||||
<code className="rounded bg-amber-100 px-1 py-0.5 text-xs dark:bg-amber-400/15">todo</code> or{" "}
|
||||
<code className="rounded bg-amber-100 px-1 py-0.5 text-xs dark:bg-amber-400/15">in_progress</code>.
|
||||
</p>
|
||||
{assigneeAgent ? (
|
||||
<p className="text-xs leading-5 text-amber-800 dark:text-amber-200">
|
||||
|
||||
@@ -94,7 +94,7 @@ function AttachmentActions({
|
||||
|
||||
function AttachmentMeta({ attachment }: { attachment: IssueAttachment }) {
|
||||
return (
|
||||
<p className="mt-0.5 text-[11px] text-muted-foreground">
|
||||
<p className="mt-0.5 text-(length:--text-micro) text-muted-foreground">
|
||||
Attachment · {attachment.contentType} · {formatBytes(attachment.byteSize)}
|
||||
</p>
|
||||
);
|
||||
@@ -134,7 +134,7 @@ function MarkdownAttachmentCard({
|
||||
<p className="px-1 py-2 text-xs text-destructive">Could not load markdown preview.</p>
|
||||
) : (
|
||||
<FoldCurtain>
|
||||
<MarkdownBody className="paperclip-edit-in-place-content min-h-[220px] text-[15px] leading-7" softBreaks={false}>
|
||||
<MarkdownBody className="paperclip-edit-in-place-content min-h-(--sz-220px) text-sm leading-7" softBreaks={false}>
|
||||
{data ?? ""}
|
||||
</MarkdownBody>
|
||||
</FoldCurtain>
|
||||
@@ -198,7 +198,7 @@ function GenericAttachmentRow({
|
||||
>
|
||||
{filename}
|
||||
</a>
|
||||
<p className="truncate text-[11px] text-muted-foreground">
|
||||
<p className="truncate text-(length:--text-micro) text-muted-foreground">
|
||||
Attachment · {attachment.contentType} · {formatBytes(attachment.byteSize)}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@ function BlockerRecoveryIndicator({ action }: { action: IssueRecoveryAction }) {
|
||||
role="status"
|
||||
aria-label={label}
|
||||
title={`${label} — open the source task to act.`}
|
||||
className={`inline-flex shrink-0 items-center gap-0.5 rounded-full border px-1.5 py-0.5 text-[10px] font-medium ${tone.className}`}
|
||||
className={`inline-flex shrink-0 items-center gap-0.5 rounded-full border px-1.5 py-0.5 text-(length:--text-nano) font-medium ${tone.className}`}
|
||||
>
|
||||
<Icon className="h-2.5 w-2.5" aria-hidden />
|
||||
{label}
|
||||
@@ -189,7 +189,7 @@ export function IssueBlockedNotice({
|
||||
className="inline-flex max-w-full items-center gap-1 rounded-md border border-amber-300/70 bg-background/80 px-2 py-1 font-mono text-xs text-amber-950 transition-colors hover:border-amber-500 hover:bg-amber-100 hover:underline dark:border-amber-500/40 dark:bg-background/40 dark:text-amber-100 dark:hover:bg-amber-500/15"
|
||||
>
|
||||
<span>{blocker.identifier ?? blocker.id.slice(0, 8)}</span>
|
||||
<span className="max-w-[18rem] truncate font-sans text-[11px] text-amber-800 dark:text-amber-200">
|
||||
<span className="max-w-(--sz-18rem) truncate font-sans text-(length:--text-micro) text-amber-800 dark:text-amber-200">
|
||||
{blocker.title}
|
||||
</span>
|
||||
{recoveryAction ? <BlockerRecoveryIndicator action={recoveryAction} /> : null}
|
||||
@@ -211,7 +211,7 @@ export function IssueBlockedNotice({
|
||||
<p className="font-medium leading-5">This task still needs a next step.</p>
|
||||
<p className="leading-5">
|
||||
A run finished successfully, but this task is still open in{" "}
|
||||
<code className="rounded bg-amber-100 px-1 py-0.5 text-[12px] dark:bg-amber-400/15">
|
||||
<code className="rounded bg-amber-100 px-1 py-0.5 text-xs dark:bg-amber-400/15">
|
||||
in_progress
|
||||
</code>{" "}
|
||||
with no clear owner for the next action.
|
||||
|
||||
@@ -347,7 +347,7 @@ describe("IssueChatThread", () => {
|
||||
const viewport = container.querySelector('[data-testid="thread-viewport"]') as HTMLDivElement | null;
|
||||
expect(viewport).not.toBeNull();
|
||||
expect(viewport?.className).not.toContain("overflow-y-auto");
|
||||
expect(viewport?.className).not.toContain("max-h-[70vh]");
|
||||
expect(viewport?.className).not.toContain("max-h-(--sz-70vh)");
|
||||
|
||||
act(() => {
|
||||
root.unmount();
|
||||
@@ -1754,10 +1754,10 @@ describe("IssueChatThread", () => {
|
||||
);
|
||||
expect(bubble).toBeDefined();
|
||||
expect(bubble?.textContent).toContain("Here is my agent reply.");
|
||||
expect(bubble?.className).toContain("max-w-[calc(100%-0.5rem)]");
|
||||
expect(bubble?.className).toContain("sm:max-w-[85%]");
|
||||
// Neutral, not the human liveness-blue bubble.
|
||||
expect(bubble?.className).not.toContain("bg-[#2563EB]");
|
||||
expect(bubble?.className).toContain("max-w-(--sz-calc-7)");
|
||||
expect(bubble?.className).toContain("sm:max-w-(--pct-85)");
|
||||
// Neutral, not the human liveness-blue bubble (--liveness-blue, DECISION-SHEET.md A6).
|
||||
expect(bubble?.className).not.toContain("bg-(--liveness-blue)");
|
||||
|
||||
act(() => {
|
||||
root.unmount();
|
||||
@@ -2647,19 +2647,19 @@ describe("IssueChatThread", () => {
|
||||
const dock = container.querySelector('[data-testid="issue-chat-composer-dock"]') as HTMLDivElement | null;
|
||||
expect(dock).not.toBeNull();
|
||||
expect(dock?.className).toContain("sticky");
|
||||
expect(dock?.className).toContain("bottom-[calc(env(safe-area-inset-bottom)+20px)]");
|
||||
expect(dock?.className).toContain("bottom-(--sz-calc-8)");
|
||||
expect(dock?.className).toContain("z-20");
|
||||
|
||||
const composer = container.querySelector('[data-testid="issue-chat-composer"]') as HTMLDivElement | null;
|
||||
expect(composer).not.toBeNull();
|
||||
expect(composer?.className).toContain("rounded-md");
|
||||
expect(composer?.className).not.toContain("rounded-lg");
|
||||
expect(composer?.className).toContain("p-[15px]");
|
||||
expect(composer?.className).toContain("p-(--sz-15px)");
|
||||
|
||||
const editor = container.querySelector('textarea[aria-label="Issue chat editor"]') as HTMLTextAreaElement | null;
|
||||
expect(editor?.dataset.contentClassName).toContain("max-h-[28dvh]");
|
||||
expect(editor?.dataset.contentClassName).toContain("max-h-(--sz-28dvh)");
|
||||
expect(editor?.dataset.contentClassName).toContain("overflow-y-auto");
|
||||
expect(editor?.dataset.contentClassName).not.toContain("min-h-[72px]");
|
||||
expect(editor?.dataset.contentClassName).not.toContain("min-h-(--sz-72px)");
|
||||
expect(editor?.dataset.fileDropTarget).toBe("parent");
|
||||
|
||||
act(() => {
|
||||
|
||||
@@ -162,6 +162,7 @@ import {
|
||||
} from "../lib/transcriptPresentation";
|
||||
import { buildAgentMentionHref } from "@paperclipai/shared";
|
||||
import { cn, formatDateTime, formatShortDate } from "../lib/utils";
|
||||
import { brandChipBadge } from "../lib/status-colors";
|
||||
import { nextWorkMode, titleForPendingWorkMode, workModeMetaFor, workModeMetaList } from "../lib/work-mode-meta";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
||||
@@ -232,7 +233,7 @@ const IssueChatCtx = createContext<IssueChatMessageContext>({
|
||||
successfulRunHandoff: null,
|
||||
});
|
||||
|
||||
const AGENT_COMMENT_BUBBLE_WIDTH_CLASS = "max-w-[calc(100%-0.5rem)] sm:max-w-[85%]";
|
||||
const AGENT_COMMENT_BUBBLE_WIDTH_CLASS = "max-w-(--sz-calc-7) sm:max-w-(--pct-85)";
|
||||
|
||||
export type IssueChatRunFinalizationAction = {
|
||||
id: "cancel" | "done";
|
||||
@@ -659,7 +660,7 @@ function IssueChatFallbackThread({
|
||||
<div className="mb-2 flex items-center gap-2 text-sm">
|
||||
<span className="font-medium text-foreground">{fallbackAuthorLabel(message)}</span>
|
||||
{message.createdAt ? (
|
||||
<span className="text-[11px] text-muted-foreground">
|
||||
<span className="text-(length:--text-micro) text-muted-foreground">
|
||||
{commentDateLabel(message.createdAt)}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -1055,7 +1056,7 @@ function IssueChatReasoningPart({ text }: { text: string }) {
|
||||
{ticker.exiting !== null && (
|
||||
<span
|
||||
key={`out-${ticker.key}`}
|
||||
className="cot-line-exit absolute inset-x-0 truncate text-[13px] italic leading-5 text-muted-foreground/70"
|
||||
className="cot-line-exit absolute inset-x-0 truncate text-(length:--text-compact) italic leading-5 text-muted-foreground/70"
|
||||
onAnimationEnd={() => setTicker((t) => ({ ...t, exiting: null }))}
|
||||
>
|
||||
{ticker.exiting}
|
||||
@@ -1064,7 +1065,7 @@ function IssueChatReasoningPart({ text }: { text: string }) {
|
||||
<span
|
||||
key={`in-${ticker.key}`}
|
||||
className={cn(
|
||||
"absolute inset-x-0 truncate text-[13px] italic leading-5 text-muted-foreground/70",
|
||||
"absolute inset-x-0 truncate text-(length:--text-compact) italic leading-5 text-muted-foreground/70",
|
||||
ticker.key > 0 && "cot-line-enter",
|
||||
)}
|
||||
>
|
||||
@@ -1112,7 +1113,7 @@ function IssueChatRollingToolPart({ toolParts }: { toolParts: ToolCallMessagePar
|
||||
{ticker.exiting !== null && (
|
||||
<span
|
||||
key={`out-${ticker.key}`}
|
||||
className="cot-line-exit absolute inset-x-0 truncate text-[13px] leading-5 text-muted-foreground/70"
|
||||
className="cot-line-exit absolute inset-x-0 truncate text-(length:--text-compact) leading-5 text-muted-foreground/70"
|
||||
onAnimationEnd={() => setTicker((t) => ({ ...t, exiting: null }))}
|
||||
>
|
||||
{ticker.exiting}
|
||||
@@ -1121,7 +1122,7 @@ function IssueChatRollingToolPart({ toolParts }: { toolParts: ToolCallMessagePar
|
||||
<span
|
||||
key={`in-${ticker.key}`}
|
||||
className={cn(
|
||||
"absolute inset-x-0 truncate text-[13px] leading-5 text-muted-foreground/70",
|
||||
"absolute inset-x-0 truncate text-(length:--text-compact) leading-5 text-muted-foreground/70",
|
||||
ticker.key > 0 && "cot-line-enter",
|
||||
)}
|
||||
>
|
||||
@@ -1222,7 +1223,7 @@ function IssueChatToolPart({
|
||||
className="flex w-full items-center gap-2 rounded-md py-0.5 text-left transition-colors hover:bg-accent/5"
|
||||
onClick={() => setOpen((current) => !current)}
|
||||
>
|
||||
<span className="min-w-0 flex-1 truncate text-[13px] text-muted-foreground/80">
|
||||
<span className="min-w-0 flex-1 truncate text-(length:--text-compact) text-muted-foreground/80">
|
||||
{title}
|
||||
{!intentDetail && summary ? <span className="ml-1.5 text-muted-foreground/50">{summary}</span> : null}
|
||||
</span>
|
||||
@@ -1236,16 +1237,16 @@ function IssueChatToolPart({
|
||||
<div className="mt-1 space-y-2 pb-1">
|
||||
{nonIntentDetails.length > 0 ? (
|
||||
<div>
|
||||
<div className="mb-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-muted-foreground/60">
|
||||
<div className="mb-1 text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground/60">
|
||||
Input
|
||||
</div>
|
||||
<dl className="space-y-1.5">
|
||||
{nonIntentDetails.map((detail) => (
|
||||
<div key={`${detail.label}:${detail.value}`}>
|
||||
<dt className="text-[10px] font-medium text-muted-foreground/60">
|
||||
<dt className="text-(length:--text-nano) font-medium text-muted-foreground/60">
|
||||
{detail.label}
|
||||
</dt>
|
||||
<dd className={cn("text-xs leading-5 text-foreground/70", detail.tone === "code" && "font-mono text-[11px]")}>
|
||||
<dd className={cn("text-xs leading-5 text-foreground/70", detail.tone === "code" && "font-mono text-(length:--text-micro)")}>
|
||||
{detail.value}
|
||||
</dd>
|
||||
</div>
|
||||
@@ -1254,18 +1255,18 @@ function IssueChatToolPart({
|
||||
</div>
|
||||
) : rawArgsText ? (
|
||||
<div>
|
||||
<div className="mb-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-muted-foreground/60">
|
||||
<div className="mb-1 text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground/60">
|
||||
Input
|
||||
</div>
|
||||
<CopyablePreBlock className="overflow-x-auto rounded-md bg-accent/30 p-2 text-[11px] leading-4 text-foreground/70">{rawArgsText}</CopyablePreBlock>
|
||||
<CopyablePreBlock className="overflow-x-auto rounded-md bg-accent/30 p-2 text-(length:--text-micro) leading-4 text-foreground/70">{rawArgsText}</CopyablePreBlock>
|
||||
</div>
|
||||
) : null}
|
||||
{result !== undefined ? (
|
||||
<div>
|
||||
<div className="mb-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-muted-foreground/60">
|
||||
<div className="mb-1 text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground/60">
|
||||
Result
|
||||
</div>
|
||||
<CopyablePreBlock className="overflow-x-auto rounded-md bg-accent/30 p-2 text-[11px] leading-4 text-foreground/70">{resultText}</CopyablePreBlock>
|
||||
<CopyablePreBlock className="overflow-x-auto rounded-md bg-accent/30 p-2 text-(length:--text-micro) leading-4 text-foreground/70">{resultText}</CopyablePreBlock>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
@@ -1432,12 +1433,12 @@ function IssueChatUserMessage({
|
||||
void onDeleteComment?.(commentId);
|
||||
};
|
||||
const messageBody = (
|
||||
<div className={cn("flex min-w-0 max-w-[85%] flex-col", isCurrentUser && "items-end")}>
|
||||
<div className={cn("flex min-w-0 max-w-(--pct-85) flex-col", isCurrentUser && "items-end")}>
|
||||
<div className={cn("mb-1 flex items-center gap-2 px-1", isCurrentUser ? "justify-end" : "justify-start")}>
|
||||
<span className="text-sm font-medium text-foreground">{resolvedAuthorName}</span>
|
||||
<SourceTrustBadge sourceTrust={sourceTrust} artifactLabel="comment" />
|
||||
{followUpRequested ? (
|
||||
<Badge variant="outline" className="text-[10px] uppercase tracking-[0.14em]">
|
||||
<Badge variant="outline" className="text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow)">
|
||||
Follow-up
|
||||
</Badge>
|
||||
) : null}
|
||||
@@ -1447,28 +1448,29 @@ function IssueChatUserMessage({
|
||||
"min-w-0 max-w-full overflow-hidden break-all rounded-2xl px-4 py-2.5",
|
||||
// Tail-hugging corner: flatten the bottom corner nearest the avatar so
|
||||
// the bubble points at it (bottom-right for the right-aligned human).
|
||||
isCurrentUser ? "rounded-br-[4px]" : "rounded-bl-[4px]",
|
||||
isCurrentUser ? "rounded-br-(--rad-4)" : "rounded-bl-(--rad-4)",
|
||||
queued
|
||||
? "bg-amber-50/80 dark:bg-amber-500/10"
|
||||
: deleted
|
||||
? "bg-muted/50 text-muted-foreground"
|
||||
: isCurrentUser
|
||||
// Liveness blue (#2563EB) for the human's own messages (PAP-95 rev 5).
|
||||
? "bg-[#2563EB] text-white"
|
||||
// Liveness blue (--liveness-blue, decoupled from --status-task-in_progress
|
||||
// in DECISION-SHEET.md A6) for the human's own messages (PAP-95 rev 5).
|
||||
? "bg-(--liveness-blue) text-white"
|
||||
: "bg-muted",
|
||||
pending && "opacity-80",
|
||||
)}
|
||||
>
|
||||
{queued ? (
|
||||
<div className="mb-1.5 flex items-center gap-2">
|
||||
<span className="inline-flex items-center rounded-full border border-amber-400/60 bg-amber-100/70 px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.14em] text-amber-800 dark:border-amber-400/40 dark:bg-amber-500/20 dark:text-amber-200">
|
||||
<span className="inline-flex items-center rounded-full border border-amber-400/60 bg-amber-100/70 px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:border-amber-400/40 dark:bg-amber-500/20 dark:text-amber-200">
|
||||
{queueBadgeLabel}
|
||||
</span>
|
||||
{queueTargetRunId && onInterruptQueued ? (
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className="h-6 border-red-300 px-2 text-[11px] text-red-700 hover:bg-red-50 hover:text-red-800 dark:border-red-500/40 dark:text-red-300 dark:hover:bg-red-500/10"
|
||||
className="h-6 border-red-300 px-2 text-(length:--text-micro) text-red-700 hover:bg-red-50 hover:text-red-800 dark:border-red-500/40 dark:text-red-300 dark:hover:bg-red-500/10"
|
||||
disabled={isInterruptingQueuedRun}
|
||||
onClick={() => void onInterruptQueued(queueTargetRunId)}
|
||||
>
|
||||
@@ -1479,7 +1481,7 @@ function IssueChatUserMessage({
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className="h-6 border-amber-300 px-2 text-[11px] text-amber-900 hover:bg-amber-100/80 hover:text-amber-950 dark:border-amber-500/40 dark:text-amber-100 dark:hover:bg-amber-500/10"
|
||||
className="h-6 border-amber-300 px-2 text-(length:--text-micro) text-amber-900 hover:bg-amber-100/80 hover:text-amber-950 dark:border-amber-500/40 dark:text-amber-100 dark:hover:bg-amber-500/10"
|
||||
onClick={() => onCancelQueued(commentId)}
|
||||
>
|
||||
Cancel
|
||||
@@ -1497,7 +1499,7 @@ function IssueChatUserMessage({
|
||||
</div>
|
||||
|
||||
{pending ? (
|
||||
<div className={cn("mt-1 flex px-1 text-[11px] text-muted-foreground", isCurrentUser ? "justify-end" : "justify-start")}>
|
||||
<div className={cn("mt-1 flex px-1 text-(length:--text-micro) text-muted-foreground", isCurrentUser ? "justify-end" : "justify-start")}>
|
||||
Sending...
|
||||
</div>
|
||||
) : (
|
||||
@@ -1511,7 +1513,7 @@ function IssueChatUserMessage({
|
||||
<TooltipTrigger asChild>
|
||||
<a
|
||||
href={anchorId ? `#${anchorId}` : undefined}
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground hover:underline"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground hover:underline"
|
||||
>
|
||||
{message.createdAt ? commentDateLabel(message.createdAt) : ""}
|
||||
</a>
|
||||
@@ -1737,7 +1739,7 @@ function IssueChatAssistantMessage({
|
||||
<TooltipTrigger asChild>
|
||||
<a
|
||||
href={anchorId ? `#${anchorId}` : undefined}
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground hover:underline"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground hover:underline"
|
||||
>
|
||||
{message.createdAt ? commentDateLabel(message.createdAt) : ""}
|
||||
</a>
|
||||
@@ -1819,14 +1821,14 @@ function IssueChatAssistantMessage({
|
||||
<AgentIcon icon={agentIcon} className="h-4 w-4" />
|
||||
) : (
|
||||
<Avatar size="sm" className="size-5">
|
||||
<AvatarFallback className="text-[10px]">{initialsForName(authorName)}</AvatarFallback>
|
||||
<AvatarFallback className="text-(length:--text-nano)">{initialsForName(authorName)}</AvatarFallback>
|
||||
</Avatar>
|
||||
)}
|
||||
</span>
|
||||
<span className="text-sm font-medium text-foreground">{authorName}</span>
|
||||
<SourceTrustBadge sourceTrust={sourceTrust} artifactLabel="comment" />
|
||||
{followUpRequested ? (
|
||||
<Badge variant="outline" className="text-[10px] uppercase tracking-[0.14em]">
|
||||
<Badge variant="outline" className="text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow)">
|
||||
Follow-up
|
||||
</Badge>
|
||||
) : null}
|
||||
@@ -1884,7 +1886,7 @@ function IssueChatAssistantMessage({
|
||||
<span className="text-xs text-muted-foreground/60">{chainOfThoughtLabel?.toLowerCase()}</span>
|
||||
<span className="ml-auto flex items-center gap-1.5">
|
||||
{message.createdAt ? (
|
||||
<span className="text-[11px] text-muted-foreground/50">
|
||||
<span className="text-(length:--text-micro) text-muted-foreground/50">
|
||||
{commentDateLabel(message.createdAt)}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -1896,12 +1898,19 @@ function IssueChatAssistantMessage({
|
||||
<span className="text-sm font-medium text-foreground">{authorName}</span>
|
||||
<SourceTrustBadge sourceTrust={sourceTrust} artifactLabel="comment" />
|
||||
{followUpRequested ? (
|
||||
<Badge variant="outline" className="text-[10px] uppercase tracking-[0.14em]">
|
||||
<Badge variant="outline" className="text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow)">
|
||||
Follow-up
|
||||
</Badge>
|
||||
) : null}
|
||||
{isRunning ? (
|
||||
<span className="inline-flex items-center gap-1 rounded-full border border-cyan-400/40 bg-cyan-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.14em] text-cyan-700 dark:text-cyan-200">
|
||||
// Gallery feedback r1: running chip uses the canonical brand blue
|
||||
// (brandChipBadge.blue), not cyan; layout/size classes unchanged.
|
||||
<span
|
||||
className={cn(
|
||||
"inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow)",
|
||||
brandChipBadge.blue,
|
||||
)}
|
||||
>
|
||||
<Loader2 className="h-3 w-3 animate-spin" />
|
||||
Running
|
||||
</span>
|
||||
@@ -2227,7 +2236,7 @@ function ExpiredRequestConfirmationActivity({
|
||||
</a>
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex items-center gap-1 rounded-md border border-border/70 bg-background/70 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground transition-colors hover:border-border hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
||||
className="inline-flex items-center gap-1 rounded-md border border-border/70 bg-background/70 px-1.5 py-0.5 text-(length:--text-micro) font-medium text-muted-foreground transition-colors hover:border-border hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
||||
aria-expanded={expanded}
|
||||
aria-controls={detailsId}
|
||||
onClick={() => setExpanded((current) => !current)}
|
||||
@@ -2344,7 +2353,7 @@ function isStaleSuccessfulRunHandoffNotice(input: {
|
||||
|
||||
function StaleDispositionWarningMetadataRow({ row }: { row: SystemNoticeMetadataRow }) {
|
||||
const label = (
|
||||
<span className="text-[10px] font-semibold uppercase tracking-[0.14em] text-muted-foreground">
|
||||
<span className="text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
{row.label}
|
||||
</span>
|
||||
);
|
||||
@@ -2354,7 +2363,7 @@ function StaleDispositionWarningMetadataRow({ row }: { row: SystemNoticeMetadata
|
||||
return <span>{row.value}</span>;
|
||||
case "code":
|
||||
return (
|
||||
<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground/80">
|
||||
<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-(length:--text-micro) text-foreground/80">
|
||||
{row.value}
|
||||
</code>
|
||||
);
|
||||
@@ -2385,7 +2394,7 @@ function StaleDispositionWarningMetadataRow({ row }: { row: SystemNoticeMetadata
|
||||
const runShort = row.runId.length > 12 ? `${row.runId.slice(0, 8)}...` : row.runId;
|
||||
const content = (
|
||||
<>
|
||||
<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground/80">
|
||||
<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-(length:--text-micro) text-foreground/80">
|
||||
{runShort}
|
||||
</code>
|
||||
{row.status ? <span>{row.status}</span> : null}
|
||||
@@ -2403,7 +2412,7 @@ function StaleDispositionWarningMetadataRow({ row }: { row: SystemNoticeMetadata
|
||||
})();
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-[7.5rem_minmax(0,1fr)] gap-2 text-xs leading-5">
|
||||
<div className="grid grid-cols-(--gtc-7) gap-2 text-xs leading-5">
|
||||
{label}
|
||||
<div className="min-w-0 break-words text-foreground/80">{value}</div>
|
||||
</div>
|
||||
@@ -2460,7 +2469,7 @@ function StaleDispositionWarningDetails({
|
||||
{sections.map((section) => (
|
||||
<div key={metadataSectionKey(section)} className="space-y-1.5">
|
||||
{section.title ? (
|
||||
<div className="text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground">
|
||||
<div className="text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
{section.title}
|
||||
</div>
|
||||
) : null}
|
||||
@@ -2507,7 +2516,7 @@ function StaleDispositionWarningRow({
|
||||
</span>
|
||||
<span className="ml-auto flex items-center gap-1.5">
|
||||
{message.createdAt ? (
|
||||
<span data-testid="stale-disposition-warning-time" className="text-[11px] text-muted-foreground/50">
|
||||
<span data-testid="stale-disposition-warning-time" className="text-(length:--text-micro) text-muted-foreground/50">
|
||||
{commentDateLabel(message.createdAt)}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -2628,7 +2637,7 @@ function SystemNoticeCommentRow({
|
||||
<TooltipTrigger asChild>
|
||||
<a
|
||||
href={anchorId ? `#${anchorId}` : undefined}
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground hover:underline"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground hover:underline"
|
||||
>
|
||||
{message.createdAt ? commentDateLabel(message.createdAt) : ""}
|
||||
</a>
|
||||
@@ -2682,7 +2691,7 @@ function IssueChatMetadataRow({
|
||||
return (
|
||||
<div id={anchorId} data-testid={testid}>
|
||||
<div className="ml-3 flex items-start gap-2.5 border-l-2 border-border/50 py-0.5 pl-3">
|
||||
<span className="mt-px flex size-[18px] shrink-0 items-center justify-center rounded-full border border-border/70 bg-muted/30 text-muted-foreground/60">
|
||||
<span className="mt-px flex size-(--sz-18px) shrink-0 items-center justify-center rounded-full border border-border/70 bg-muted/30 text-muted-foreground/60">
|
||||
{icon}
|
||||
</span>
|
||||
<div className="min-w-0 flex-1 space-y-1">{children}</div>
|
||||
@@ -2796,7 +2805,7 @@ function IssueChatSystemMessage({ message }: { message: ThreadMessage }) {
|
||||
|
||||
{statusChange ? (
|
||||
<div className="flex flex-wrap items-center gap-1.5 text-xs">
|
||||
<span className="text-[10px] font-medium uppercase tracking-wider text-muted-foreground/70">
|
||||
<span className="text-(length:--text-nano) font-medium uppercase tracking-wider text-muted-foreground/70">
|
||||
Status
|
||||
</span>
|
||||
<span className="text-muted-foreground">{humanizeValue(statusChange.from)}</span>
|
||||
@@ -2808,7 +2817,7 @@ function IssueChatSystemMessage({ message }: { message: ThreadMessage }) {
|
||||
{assigneeChange ? (
|
||||
<div className="space-y-1">
|
||||
<div className={cn("flex flex-wrap items-center gap-1.5 text-xs", isCurrentUser && "justify-end")}>
|
||||
<span className="text-[10px] font-medium uppercase tracking-wider text-muted-foreground/70">
|
||||
<span className="text-(length:--text-nano) font-medium uppercase tracking-wider text-muted-foreground/70">
|
||||
Assignee
|
||||
</span>
|
||||
<AssigneeChip assignee={assigneeChange.from} resolvers={handoffResolvers} />
|
||||
@@ -2827,7 +2836,7 @@ function IssueChatSystemMessage({ message }: { message: ThreadMessage }) {
|
||||
|
||||
{workspaceChange ? (
|
||||
<div className="flex flex-wrap items-center gap-1.5 text-xs">
|
||||
<span className="text-[10px] font-medium uppercase tracking-wider text-muted-foreground/70">
|
||||
<span className="text-(length:--text-nano) font-medium uppercase tracking-wider text-muted-foreground/70">
|
||||
Workspace
|
||||
</span>
|
||||
<span className="text-muted-foreground">
|
||||
@@ -2859,7 +2868,7 @@ function IssueChatSystemMessage({ message }: { message: ThreadMessage }) {
|
||||
<span className="text-muted-foreground">run</span>
|
||||
<Link
|
||||
to={`/agents/${runAgentId}/runs/${runId}`}
|
||||
className="inline-flex items-center rounded-md border border-border bg-accent/40 px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground"
|
||||
className="inline-flex items-center rounded-md border border-border bg-accent/40 px-1.5 py-0.5 font-mono text-(length:--text-nano) text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground"
|
||||
>
|
||||
{runId.slice(0, 8)}
|
||||
</Link>
|
||||
@@ -3858,9 +3867,9 @@ const IssueChatComposer = forwardRef<IssueChatComposerHandle, IssueChatComposerP
|
||||
data-testid="issue-chat-composer"
|
||||
data-pending-work-mode={pendingWorkMode}
|
||||
className={cn(
|
||||
"relative rounded-md border border-border/70 bg-background/95 p-[15px] shadow-[0_-12px_28px_rgba(15,23,42,0.08)] backdrop-blur transition-[border-color,background-color,box-shadow] duration-150 supports-[backdrop-filter]:bg-background/85 dark:shadow-[0_-12px_28px_rgba(0,0,0,0.28)]",
|
||||
"relative rounded-md border border-border/70 bg-background/95 p-(--sz-15px) shadow-(--shadow-extract-4) backdrop-blur transition-(--tp-border-color-background-color-box-shadow) duration-150 supports-[backdrop-filter]:bg-background/85 dark:shadow-(--shadow-extract-5)",
|
||||
pendingWorkModeMeta.classes.container,
|
||||
isDragOver && "border-primary/45 bg-background shadow-[0_-12px_28px_rgba(15,23,42,0.08),0_0_0_1px_hsl(var(--primary)/0.16)]",
|
||||
isDragOver && "border-primary/45 bg-background shadow-(--shadow-extract-7)",
|
||||
)}
|
||||
onKeyDownCapture={handleComposerKeyDown}
|
||||
onDragEnterCapture={handleFileDragEnter}
|
||||
@@ -3871,7 +3880,7 @@ const IssueChatComposer = forwardRef<IssueChatComposerHandle, IssueChatComposerP
|
||||
{isDragOver && canAcceptFiles ? (
|
||||
<div
|
||||
data-testid="issue-chat-composer-drop-overlay"
|
||||
className="pointer-events-none absolute inset-2 z-30 flex items-center justify-center rounded-sm border border-dashed border-primary/55 bg-background/75 px-4 py-3 text-center shadow-sm backdrop-blur-[2px] dark:bg-background/65"
|
||||
className="pointer-events-none absolute inset-2 z-30 flex items-center justify-center rounded-sm border border-dashed border-primary/55 bg-background/75 px-4 py-3 text-center shadow-sm backdrop-blur-(--blur-2px) dark:bg-background/65"
|
||||
>
|
||||
<div className="flex max-w-md items-center gap-3 rounded-md bg-background/80 px-3 py-2 text-left shadow-sm ring-1 ring-border/60">
|
||||
<span className="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary">
|
||||
@@ -3897,7 +3906,7 @@ const IssueChatComposer = forwardRef<IssueChatComposerHandle, IssueChatComposerP
|
||||
imageUploadHandler={onImageUpload}
|
||||
fileDropTarget="parent"
|
||||
bordered={false}
|
||||
contentClassName="max-h-[28dvh] overflow-y-auto pr-1 pb-2 text-sm scrollbar-auto-hide"
|
||||
contentClassName="max-h-(--sz-28dvh) overflow-y-auto pr-1 pb-2 text-sm scrollbar-auto-hide"
|
||||
/>
|
||||
|
||||
{coachVisible && plainNameCandidate ? (
|
||||
@@ -3912,7 +3921,7 @@ const IssueChatComposer = forwardRef<IssueChatComposerHandle, IssueChatComposerP
|
||||
) : null}
|
||||
|
||||
{composerHint ? (
|
||||
<div className="inline-flex items-center rounded-full border border-border/70 bg-muted/30 px-2 py-1 text-[11px] text-muted-foreground">
|
||||
<div className="inline-flex items-center rounded-full border border-border/70 bg-muted/30 px-2 py-1 text-(length:--text-micro) text-muted-foreground">
|
||||
{composerHint}
|
||||
</div>
|
||||
) : null}
|
||||
@@ -4004,7 +4013,7 @@ const IssueChatComposer = forwardRef<IssueChatComposerHandle, IssueChatComposerP
|
||||
aria-keyshortcuts="Meta+Period Control+Period"
|
||||
title={titleForPendingWorkMode(pendingWorkMode)}
|
||||
className={cn(
|
||||
"inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[11px] font-semibold transition-colors",
|
||||
"inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-(length:--text-micro) font-semibold transition-colors",
|
||||
pendingWorkModeMeta.classes.chip,
|
||||
)}
|
||||
>
|
||||
@@ -4043,7 +4052,7 @@ const IssueChatComposer = forwardRef<IssueChatComposerHandle, IssueChatComposerP
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
<div className="mt-1 border-t px-2 py-1.5 text-[10px] text-muted-foreground">
|
||||
<div className="mt-1 border-t px-2 py-1.5 text-(length:--text-nano) text-muted-foreground">
|
||||
Cmd/Ctrl+. cycles modes
|
||||
</div>
|
||||
</PopoverContent>
|
||||
@@ -4938,7 +4947,7 @@ export function IssueChatThread({
|
||||
<div
|
||||
ref={composerViewportAnchorRef}
|
||||
data-testid="issue-chat-composer-dock"
|
||||
className="sticky bottom-[calc(env(safe-area-inset-bottom)+20px)] z-20 space-y-2 bg-gradient-to-t from-background via-background/95 to-background/0 pt-6"
|
||||
className="sticky bottom-(--sz-calc-8) z-20 space-y-2 bg-gradient-to-t from-background via-background/95 to-background/0 pt-6"
|
||||
>
|
||||
<IssueChatComposer
|
||||
ref={composerRef}
|
||||
|
||||
@@ -93,10 +93,10 @@ export function IssueColumnPicker({
|
||||
{!iconOnly && "Columns"}
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end" className="w-[300px] rounded-xl border-border/70 p-1.5 shadow-xl shadow-black/10">
|
||||
<DropdownMenuContent align="end" className="w-(--sz-300px) rounded-xl border-border/70 p-1.5 shadow-xl shadow-black/10">
|
||||
<DropdownMenuLabel className="px-2 pb-1 pt-1.5">
|
||||
<div className="space-y-1">
|
||||
<div className="text-[10px] font-semibold uppercase tracking-[0.22em] text-muted-foreground">
|
||||
<div className="text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Desktop task rows
|
||||
</div>
|
||||
<div className="text-sm font-medium text-foreground">
|
||||
@@ -190,7 +190,7 @@ export function InboxIssueMetaLeading({
|
||||
</span>
|
||||
<span
|
||||
className={cn(
|
||||
"hidden text-[11px] font-medium sm:inline",
|
||||
"hidden text-(length:--text-micro) font-medium sm:inline",
|
||||
"text-blue-600 dark:text-blue-400",
|
||||
)}
|
||||
>
|
||||
@@ -213,7 +213,7 @@ export function InboxIssueMetaLeading({
|
||||
)}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<span className="hidden text-[11px] font-medium text-muted-foreground sm:inline">
|
||||
<span className="hidden text-(length:--text-micro) font-medium text-muted-foreground sm:inline">
|
||||
{subtreeLiveCount} live below
|
||||
</span>
|
||||
</span>
|
||||
@@ -359,6 +359,7 @@ export function InboxIssueTrailingColumns({
|
||||
|
||||
if (column === "project") {
|
||||
if (projectName) {
|
||||
// token-extraction: allowlisted — accentColor also feeds pickTextColorForPillBg() contrast math; a var() string can't be parsed as a hex color there.
|
||||
const accentColor = projectColor ?? "#64748b";
|
||||
return (
|
||||
<span
|
||||
@@ -389,7 +390,7 @@ export function InboxIssueTrailingColumns({
|
||||
{(issue.labels ?? []).slice(0, 2).map((label) => (
|
||||
<span
|
||||
key={label.id}
|
||||
className="inline-flex min-w-0 max-w-full shrink-0 items-center rounded-full border px-1.5 py-0 text-[10px] font-medium"
|
||||
className="inline-flex min-w-0 max-w-full shrink-0 items-center rounded-full border px-1.5 py-0 text-(length:--text-nano) font-medium"
|
||||
style={{
|
||||
borderColor: label.color,
|
||||
color: pickTextColorForPillBg(label.color, 0.12),
|
||||
@@ -400,7 +401,7 @@ export function InboxIssueTrailingColumns({
|
||||
</span>
|
||||
))}
|
||||
{(issue.labels ?? []).length > 2 ? (
|
||||
<span className="shrink-0 text-[10px] font-medium text-muted-foreground">
|
||||
<span className="shrink-0 text-(length:--text-nano) font-medium text-muted-foreground">
|
||||
+{(issue.labels ?? []).length - 2}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -462,7 +463,7 @@ export function InboxIssueTrailingColumns({
|
||||
|
||||
if (column === "updated") {
|
||||
return (
|
||||
<span key={column} className="min-w-0 truncate text-right text-[11px] font-medium text-muted-foreground">
|
||||
<span key={column} className="min-w-0 truncate text-right text-(length:--text-micro) font-medium text-muted-foreground">
|
||||
{activityText}
|
||||
</span>
|
||||
);
|
||||
|
||||
@@ -77,11 +77,11 @@ export function IssueContinuationHandoff({
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<span className="text-sm font-medium text-foreground">{title}</span>
|
||||
<span className="rounded-full border border-border px-2 py-0.5 font-mono text-[10px] uppercase text-muted-foreground">
|
||||
<span className="rounded-full border border-border px-2 py-0.5 font-mono text-(length:--text-nano) uppercase text-muted-foreground">
|
||||
handoff
|
||||
</span>
|
||||
</div>
|
||||
<div className="text-[11px] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) text-muted-foreground">
|
||||
Updated {relativeTime(document.updatedAt)}
|
||||
{document.latestRevisionNumber > 0 ? ` - revision ${document.latestRevisionNumber}` : ""}
|
||||
</div>
|
||||
|
||||
@@ -306,7 +306,7 @@ describe("IssueDocumentAnnotations", () => {
|
||||
const anchor = container.querySelector('[data-testid="document-annotation-panel-anchor"]');
|
||||
expect(anchor).not.toBeNull();
|
||||
expect(anchor?.className).toContain("fixed");
|
||||
expect(anchor?.className).toContain("z-[60]");
|
||||
expect(anchor?.className).toContain("z-(--z-60)");
|
||||
});
|
||||
|
||||
it("keeps the desktop annotation panel inside the issue content area when properties are visible", async () => {
|
||||
@@ -982,7 +982,7 @@ describe("IssueDocumentAnnotations", () => {
|
||||
expect(sheet).not.toBeNull();
|
||||
expect(sheet?.getAttribute("data-side")).toBe("bottom");
|
||||
expect(sheet?.className).toContain("paperclip-doc-annotation-sheet");
|
||||
expect(sheet?.className).toContain("z-[60]");
|
||||
expect(sheet?.className).toContain("z-(--z-60)");
|
||||
expect(sheet?.className).toContain("bg-popover");
|
||||
} finally {
|
||||
Object.defineProperty(window, "matchMedia", {
|
||||
|
||||
@@ -344,7 +344,7 @@ export function IssueDocumentAnnotations({
|
||||
className="relative min-w-0"
|
||||
data-testid={`document-annotation-body-${doc.key}`}
|
||||
>
|
||||
<div className="relative z-[1]">
|
||||
<div className="relative z-(--z-1)">
|
||||
{children}
|
||||
</div>
|
||||
{!historicalPreview && doc.latestRevisionId ? (
|
||||
@@ -368,7 +368,7 @@ export function IssueDocumentAnnotations({
|
||||
{panelOpen && !isMobile && renderedDesktopPanelFrame ? (
|
||||
<div
|
||||
data-testid="document-annotation-panel-anchor"
|
||||
className="pointer-events-auto fixed z-[60] hidden lg:block"
|
||||
className="pointer-events-auto fixed z-(--z-60) hidden lg:block"
|
||||
style={{
|
||||
left: renderedDesktopPanelFrame.left,
|
||||
maxHeight: renderedDesktopPanelFrame.maxHeight,
|
||||
@@ -425,7 +425,7 @@ export function DocumentAnnotationsCountChip({
|
||||
variant="ghost"
|
||||
data-state={panelOpen ? "open" : "closed"}
|
||||
className={cn(
|
||||
"h-auto gap-1 rounded-md px-1.5 py-0 text-[11px] font-normal text-muted-foreground hover:text-foreground",
|
||||
"h-auto gap-1 rounded-md px-1.5 py-0 text-(length:--text-micro) font-normal text-muted-foreground hover:text-foreground",
|
||||
panelOpen && "bg-muted text-foreground",
|
||||
openCount > 0 && "text-foreground",
|
||||
)}
|
||||
|
||||
@@ -762,7 +762,7 @@ export function IssueDocumentsSection({
|
||||
|
||||
const documentBodyShellClassName = "mt-3";
|
||||
const documentBodyPaddingClassName = "";
|
||||
const documentBodyContentClassName = "paperclip-edit-in-place-content min-h-[220px] text-[15px] leading-7";
|
||||
const documentBodyContentClassName = "paperclip-edit-in-place-content min-h-(--sz-220px) text-sm leading-7";
|
||||
const toggleFoldedDocument = (key: string) => {
|
||||
setFoldedDocumentKeys((current) =>
|
||||
current.includes(key)
|
||||
@@ -850,7 +850,7 @@ export function IssueDocumentsSection({
|
||||
placeholder="Markdown body"
|
||||
bordered={false}
|
||||
className="bg-transparent"
|
||||
contentClassName="min-h-[220px] text-[15px] leading-7"
|
||||
contentClassName="min-h-(--sz-220px) text-sm leading-7"
|
||||
mentions={mentions}
|
||||
imageUploadHandler={imageUploadHandler}
|
||||
onSubmit={() => void commitDraft(draft, { clearAfterSave: false, trackAutosave: false })}
|
||||
@@ -881,7 +881,7 @@ export function IssueDocumentsSection({
|
||||
>
|
||||
<div className="mb-2 flex items-center gap-2">
|
||||
<FileText className="h-4 w-4 text-amber-600" />
|
||||
<span className="rounded-full border border-amber-500/30 px-2 py-0.5 font-mono text-[10px] uppercase tracking-[0.16em] text-amber-700 dark:text-amber-300">
|
||||
<span className="rounded-full border border-amber-500/30 px-2 py-0.5 font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-700 dark:text-amber-300">
|
||||
PLAN
|
||||
</span>
|
||||
</div>
|
||||
@@ -964,7 +964,7 @@ export function IssueDocumentsSection({
|
||||
size="icon-xs"
|
||||
className={cn(
|
||||
"text-muted-foreground transition-colors",
|
||||
isLocked && "text-amber-300 hover:text-amber-200",
|
||||
isLocked && "text-amber-700 hover:text-amber-800 dark:text-amber-300 dark:hover:text-amber-200",
|
||||
)}
|
||||
title={isLocked ? "Unlock document" : "Lock document"}
|
||||
aria-label={isLocked ? `Unlock ${doc.key} document` : `Lock ${doc.key} document`}
|
||||
@@ -974,7 +974,7 @@ export function IssueDocumentsSection({
|
||||
{isLocked ? <Lock className="h-3.5 w-3.5" /> : <Unlock className="h-3.5 w-3.5" />}
|
||||
</Button>
|
||||
) : isLocked ? (
|
||||
<span title="Locked document" aria-label="Locked document" className="inline-flex h-6 w-6 items-center justify-center text-amber-300">
|
||||
<span title="Locked document" aria-label="Locked document" className="inline-flex h-6 w-6 items-center justify-center text-amber-700 dark:text-amber-300">
|
||||
<Lock className="h-3.5 w-3.5" />
|
||||
</span>
|
||||
) : null}
|
||||
@@ -1063,7 +1063,7 @@ export function IssueDocumentsSection({
|
||||
<div className="rounded-md border border-amber-500/30 bg-amber-500/5 px-3 py-3">
|
||||
<div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div className="space-y-1">
|
||||
<p className="text-sm font-medium text-amber-200">
|
||||
<p className="text-sm font-medium text-amber-800 dark:text-amber-200">
|
||||
Viewing revision {selectedHistoricalRevision.revisionNumber}
|
||||
</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
@@ -1100,7 +1100,7 @@ export function IssueDocumentsSection({
|
||||
<div className="rounded-md border border-amber-500/30 bg-amber-500/5 px-3 py-3">
|
||||
<div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div className="space-y-1">
|
||||
<p className="text-sm font-medium text-amber-200">Out of date</p>
|
||||
<p className="text-sm font-medium text-amber-800 dark:text-amber-200">Out of date</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
This document changed while you were editing. Your local draft is preserved and autosave is paused.
|
||||
</p>
|
||||
@@ -1144,7 +1144,7 @@ export function IssueDocumentsSection({
|
||||
</div>
|
||||
{activeConflict.showRemote && (
|
||||
<div className="mt-3 rounded-md border border-border/70 bg-background/60 p-3">
|
||||
<div className="mb-2 flex items-center gap-2 text-[11px] text-muted-foreground">
|
||||
<div className="mb-2 flex items-center gap-2 text-(length:--text-micro) text-muted-foreground">
|
||||
<span>Remote revision {activeConflict.serverDocument.latestRevisionNumber}</span>
|
||||
<span>•</span>
|
||||
<span>updated {relativeTime(activeConflict.serverDocument.updatedAt)}</span>
|
||||
@@ -1152,7 +1152,7 @@ export function IssueDocumentsSection({
|
||||
{!isPlanKey(doc.key) && activeConflict.serverDocument.title ? (
|
||||
<p className="mb-2 text-sm font-medium">{activeConflict.serverDocument.title}</p>
|
||||
) : null}
|
||||
{renderFoldableBody(activeConflict.serverDocument.body, "text-[14px] leading-7", externalReferences)}
|
||||
{renderFoldableBody(activeConflict.serverDocument.body, "text-sm leading-7", externalReferences)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -1218,11 +1218,11 @@ export function IssueDocumentsSection({
|
||||
</div>
|
||||
<div className="flex min-h-4 items-center justify-end px-1">
|
||||
<span
|
||||
className={`text-[11px] transition-opacity duration-150 ${
|
||||
className={`text-(length:--text-micro) transition-opacity duration-150 ${
|
||||
isHistoricalPreview
|
||||
? "text-amber-300"
|
||||
? "text-amber-700 dark:text-amber-300"
|
||||
: activeConflict
|
||||
? "text-amber-300"
|
||||
? "text-amber-700 dark:text-amber-300"
|
||||
: autosaveState === "error"
|
||||
? "text-destructive"
|
||||
: "text-muted-foreground"
|
||||
|
||||
@@ -73,7 +73,7 @@ describe("IssueFiltersPopover", () => {
|
||||
const popoverContent = container.querySelector("[data-testid='popover-content']");
|
||||
expect(popoverContent).not.toBeNull();
|
||||
expect(popoverContent?.className).toContain("overflow-y-auto");
|
||||
expect(popoverContent?.className).toContain("max-h-[min(80vh,42rem)]");
|
||||
expect(popoverContent?.className).toContain("max-h-(--sz-calc-9)");
|
||||
|
||||
const layoutGrid = Array.from(popoverContent?.querySelectorAll("div") ?? []).find((element) =>
|
||||
element.className.includes("md:grid-cols-3"),
|
||||
|
||||
@@ -117,8 +117,8 @@ export function IssueFiltersPopover({
|
||||
<Button variant={buttonVariant} size={iconOnly ? "icon" : "sm"} className={`text-xs ${iconOnly ? "relative h-8 w-8 shrink-0" : ""} ${activeFilterCount > 0 ? "text-blue-600 dark:text-blue-400" : ""}`} title={iconOnly ? (activeFilterCount > 0 ? `Filters: ${activeFilterCount}` : "Filter") : undefined}>
|
||||
<Filter className={iconOnly ? "h-3.5 w-3.5" : "h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"} />
|
||||
{!iconOnly && <span className="hidden sm:inline">{activeFilterCount > 0 ? `Filters: ${activeFilterCount}` : "Filter"}</span>}
|
||||
{!iconOnly && activeFilterCount > 0 ? <span className="ml-0.5 text-[10px] font-medium sm:hidden">{activeFilterCount}</span> : null}
|
||||
{iconOnly && activeFilterCount > 0 ? <span className="absolute -right-1 -top-1 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-600 text-[9px] font-bold text-white">{activeFilterCount}</span> : null}
|
||||
{!iconOnly && activeFilterCount > 0 ? <span className="ml-0.5 text-(length:--text-nano) font-medium sm:hidden">{activeFilterCount}</span> : null}
|
||||
{iconOnly && activeFilterCount > 0 ? <span className="absolute -right-1 -top-1 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-600 text-(length:--text-nano) font-bold text-white">{activeFilterCount}</span> : null}
|
||||
{!iconOnly && activeFilterCount > 0 ? (
|
||||
<X
|
||||
className="ml-1 hidden h-3 w-3 sm:block"
|
||||
@@ -132,7 +132,7 @@ export function IssueFiltersPopover({
|
||||
</PopoverTrigger>
|
||||
<PopoverContent
|
||||
align="end"
|
||||
className="w-[min(780px,calc(100vw-2rem))] max-h-[min(80vh,42rem)] overflow-y-auto overscroll-contain p-0"
|
||||
className="w-(--sz-calc-10) max-h-(--sz-calc-9) overflow-y-auto overscroll-contain p-0"
|
||||
>
|
||||
<div className="space-y-3 p-3">
|
||||
<div className="flex items-center justify-between">
|
||||
|
||||
@@ -16,14 +16,14 @@ interface IssuePlanDecompositionsSectionProps {
|
||||
function StatusBadge({ status }: { status: AcceptedPlanDecompositionSummary["status"] }) {
|
||||
if (status === "completed") {
|
||||
return (
|
||||
<span className="inline-flex items-center gap-1 rounded-sm border border-emerald-500/50 bg-emerald-500/10 px-2 py-0.5 text-[11px] font-medium text-emerald-900 dark:text-emerald-100">
|
||||
<span className="inline-flex items-center gap-1 rounded-sm border border-emerald-500/50 bg-emerald-500/10 px-2 py-0.5 text-(length:--text-micro) font-medium text-emerald-900 dark:text-emerald-100">
|
||||
<CheckCircle2 className="h-3 w-3" />
|
||||
Completed
|
||||
</span>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<span className="inline-flex items-center gap-1 rounded-sm border border-amber-500/50 bg-amber-500/10 px-2 py-0.5 text-[11px] font-medium text-amber-900 dark:text-amber-100">
|
||||
<span className="inline-flex items-center gap-1 rounded-sm border border-amber-500/50 bg-amber-500/10 px-2 py-0.5 text-(length:--text-micro) font-medium text-amber-900 dark:text-amber-100">
|
||||
<Loader2 className="h-3 w-3 animate-spin" />
|
||||
In flight
|
||||
</span>
|
||||
@@ -47,7 +47,7 @@ export function IssuePlanDecompositionsSection({
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<h3 className="text-sm font-medium text-muted-foreground">Plan decomposition</h3>
|
||||
<span className="text-[11px] text-muted-foreground/80">
|
||||
<span className="text-(length:--text-micro) text-muted-foreground/80">
|
||||
{items.length === 1 ? "1 accepted plan revision" : `${items.length} accepted plan revisions`}
|
||||
</span>
|
||||
</div>
|
||||
@@ -99,7 +99,7 @@ export function IssuePlanDecompositionsSection({
|
||||
</span>
|
||||
{record.status === "completed" && requested > 0 ? (
|
||||
<span
|
||||
className="inline-flex items-center gap-1 rounded-sm border border-sky-500/40 bg-sky-500/10 px-1.5 py-0.5 text-[10px] font-medium text-sky-900 dark:text-sky-100"
|
||||
className="inline-flex items-center gap-1 rounded-sm border border-sky-500/40 bg-sky-500/10 px-1.5 py-0.5 text-(length:--text-nano) font-medium text-sky-900 dark:text-sky-100"
|
||||
title="Repeat attempts with this fingerprint reuse this record instead of creating new children"
|
||||
>
|
||||
<Repeat className="h-3 w-3" />
|
||||
@@ -108,7 +108,7 @@ export function IssuePlanDecompositionsSection({
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
<div className="mt-1 flex flex-wrap gap-x-3 gap-y-0.5 text-[11px] text-muted-foreground">
|
||||
<div className="mt-1 flex flex-wrap gap-x-3 gap-y-0.5 text-(length:--text-micro) text-muted-foreground">
|
||||
{ownerName ? <span>Owner: {ownerName}</span> : null}
|
||||
{startedAt ? (
|
||||
<span title={formatDateTime(startedAt)}>Started {relativeTime(startedAt)}</span>
|
||||
@@ -135,14 +135,14 @@ export function IssuePlanDecompositionsSection({
|
||||
<Link
|
||||
to={`/issues/${child.identifier ?? child.id}`}
|
||||
className={cn(
|
||||
"inline-flex max-w-full items-center gap-1 rounded-sm border border-border bg-background px-2 py-0.5 text-[11px] text-foreground transition-colors hover:bg-accent/40",
|
||||
"inline-flex max-w-full items-center gap-1 rounded-sm border border-border bg-background px-2 py-0.5 text-(length:--text-micro) text-foreground transition-colors hover:bg-accent/40",
|
||||
)}
|
||||
title={child.title}
|
||||
>
|
||||
<span className="font-medium">
|
||||
{child.identifier ?? child.id.slice(0, 8)}
|
||||
</span>
|
||||
<span className="truncate max-w-[24ch] text-muted-foreground">
|
||||
<span className="truncate max-w-(--sz-24ch) text-muted-foreground">
|
||||
{child.title}
|
||||
</span>
|
||||
<ChevronRight className="h-3 w-3 text-muted-foreground" />
|
||||
|
||||
@@ -293,18 +293,18 @@ function BranchFacet({
|
||||
const shortSha = formatShortSha(sha);
|
||||
return (
|
||||
<div className="min-w-0 rounded-md border border-border/70 bg-background/60 px-2.5 py-2">
|
||||
<div className="text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground">
|
||||
<div className="text-(length:--text-nano) font-medium uppercase tracking-(--tracking-label) text-muted-foreground">
|
||||
{label}
|
||||
</div>
|
||||
<div className="mt-1 flex items-center gap-1.5">
|
||||
<GitBranch className="h-3.5 w-3.5 shrink-0 text-muted-foreground" aria-hidden />
|
||||
{branch ? (
|
||||
<code className="truncate font-mono text-[12px] text-foreground/90">{branch}</code>
|
||||
<code className="truncate font-mono text-xs text-foreground/90">{branch}</code>
|
||||
) : (
|
||||
<span className="text-[12px] italic text-muted-foreground">detached / unknown</span>
|
||||
<span className="text-xs italic text-muted-foreground">detached / unknown</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="mt-0.5 pl-5 font-mono text-[11px] text-muted-foreground">
|
||||
<div className="mt-0.5 pl-5 font-mono text-(length:--text-micro) text-muted-foreground">
|
||||
{shortSha ? `@ ${shortSha}` : "@ —"}
|
||||
</div>
|
||||
</div>
|
||||
@@ -328,13 +328,13 @@ function DivergenceDiagnosis({
|
||||
)}
|
||||
>
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<span className="text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground">
|
||||
<span className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Divergence diagnosis
|
||||
</span>
|
||||
<span
|
||||
data-testid="recovery-ancestry-verdict"
|
||||
className={cn(
|
||||
"inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.08em]",
|
||||
"inline-flex items-center rounded-full border px-2 py-0.5 text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-label)",
|
||||
badge.className,
|
||||
)}
|
||||
>
|
||||
@@ -354,7 +354,7 @@ function DivergenceDiagnosis({
|
||||
/>
|
||||
</div>
|
||||
{divergence.plainLanguageReason ? (
|
||||
<p className="text-[12px] leading-5 text-foreground/80">{divergence.plainLanguageReason}</p>
|
||||
<p className="text-xs leading-5 text-foreground/80">{divergence.plainLanguageReason}</p>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
@@ -412,8 +412,8 @@ function MetadataRow({
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<div className="grid grid-cols-[7.5rem_1fr] gap-x-3 gap-y-0 px-3 py-1.5 text-xs sm:px-4">
|
||||
<dt className="truncate text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground">
|
||||
<div className="grid grid-cols-(--gtc-8) gap-x-3 gap-y-0 px-3 py-1.5 text-xs sm:px-4">
|
||||
<dt className="truncate text-(length:--text-micro) font-medium uppercase tracking-(--tracking-label) text-muted-foreground">
|
||||
{label}
|
||||
</dt>
|
||||
<dd className="min-w-0 break-words text-foreground/90">{children}</dd>
|
||||
@@ -465,11 +465,11 @@ function RunChip({
|
||||
const short = shortenRunId(runId);
|
||||
const inner = (
|
||||
<>
|
||||
<code className="rounded bg-background/80 px-1.5 py-0.5 font-mono text-[11px] text-foreground/80">
|
||||
<code className="rounded bg-background/80 px-1.5 py-0.5 font-mono text-(length:--text-micro) text-foreground/80">
|
||||
run {short}
|
||||
</code>
|
||||
{status ? (
|
||||
<span className="font-sans text-[11px] text-muted-foreground">{status}</span>
|
||||
<span className="font-sans text-(length:--text-micro) text-muted-foreground">{status}</span>
|
||||
) : null}
|
||||
</>
|
||||
);
|
||||
@@ -594,7 +594,7 @@ export function IssueRecoveryActionCard({
|
||||
data-recovery-state={cardState}
|
||||
data-recovery-kind={action.kind}
|
||||
className={cn(
|
||||
"relative w-full overflow-hidden rounded-lg border text-sm shadow-[0_1px_0_rgba(15,23,42,0.02)]",
|
||||
"relative w-full overflow-hidden rounded-lg border text-sm shadow-(--shadow-extract-8)",
|
||||
tone.containerClass,
|
||||
className,
|
||||
)}
|
||||
@@ -610,10 +610,10 @@ export function IssueRecoveryActionCard({
|
||||
<ToneIcon className={cn("h-4 w-4", tone.iconClass)} />
|
||||
</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[11px] font-semibold uppercase tracking-[0.14em]">
|
||||
<div className="flex flex-wrap items-center gap-x-2 gap-y-0.5 text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow)">
|
||||
<span className={tone.labelClass}>{tone.label}</span>
|
||||
<span className="text-muted-foreground/60" aria-hidden>·</span>
|
||||
<code className="rounded bg-background/70 px-1.5 py-0.5 font-mono text-[11px] tracking-normal text-muted-foreground">
|
||||
<code className="rounded bg-background/70 px-1.5 py-0.5 font-mono text-(length:--text-micro) tracking-normal text-muted-foreground">
|
||||
{KIND_LABEL[action.kind] ?? action.kind}
|
||||
</code>
|
||||
{updatedAtLabel ? (
|
||||
@@ -625,7 +625,7 @@ export function IssueRecoveryActionCard({
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
<p className="mt-1 text-[14px] leading-6">{headline}</p>
|
||||
<p className="mt-1 text-sm leading-6">{headline}</p>
|
||||
</div>
|
||||
</header>
|
||||
<dl className={cn("border-t bg-background/40 dark:bg-background/20", tone.divider)}>
|
||||
@@ -663,7 +663,7 @@ export function IssueRecoveryActionCard({
|
||||
) : null}
|
||||
<MetadataRow label="Evidence">
|
||||
{evidenceSummary ? (
|
||||
<span className="break-words font-mono text-[11px] text-foreground/80">{evidenceSummary}</span>
|
||||
<span className="break-words font-mono text-(length:--text-micro) text-foreground/80">{evidenceSummary}</span>
|
||||
) : (
|
||||
<MissingValue />
|
||||
)}
|
||||
@@ -675,12 +675,12 @@ export function IssueRecoveryActionCard({
|
||||
<span className="inline-flex flex-wrap items-center gap-1.5">
|
||||
{wakeSummary ? <span>{wakeSummary}</span> : <MissingValue />}
|
||||
{showAttempt ? (
|
||||
<span className="rounded-md border border-border/50 bg-background/60 px-1.5 py-0.5 text-[11px] text-muted-foreground">
|
||||
<span className="rounded-md border border-border/50 bg-background/60 px-1.5 py-0.5 text-(length:--text-micro) text-muted-foreground">
|
||||
attempt {action.attemptCount} of {action.maxAttempts}
|
||||
</span>
|
||||
) : null}
|
||||
{showTimeoutInline ? (
|
||||
<span className="rounded-md border border-border/50 bg-background/60 px-1.5 py-0.5 text-[11px] text-muted-foreground">
|
||||
<span className="rounded-md border border-border/50 bg-background/60 px-1.5 py-0.5 text-(length:--text-micro) text-muted-foreground">
|
||||
Times out {formatTimeShort(action.timeoutAt) ?? "soon"}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -716,7 +716,7 @@ export function IssueRecoveryActionCard({
|
||||
sideOffset={6}
|
||||
className="w-72 p-1.5"
|
||||
>
|
||||
<div className="px-2 py-1 text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground">
|
||||
<div className="px-2 py-1 text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Resolve recovery
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
@@ -732,7 +732,7 @@ export function IssueRecoveryActionCard({
|
||||
)}
|
||||
>
|
||||
<span className="font-medium leading-5">{option.label}</span>
|
||||
<span className="text-[11px] leading-4 text-muted-foreground">{option.description}</span>
|
||||
<span className="text-(length:--text-micro) leading-4 text-muted-foreground">{option.description}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
@@ -759,15 +759,15 @@ export function IssueRecoveryActionCard({
|
||||
</PopoverTrigger>
|
||||
<PopoverContent align="start" sideOffset={6} className="w-80 space-y-3 p-3">
|
||||
<div className="space-y-1">
|
||||
<div className="text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Re-issue on isolated workspace
|
||||
</div>
|
||||
<p className="text-[12px] leading-5 text-muted-foreground">
|
||||
<p className="text-xs leading-5 text-muted-foreground">
|
||||
Creates a fresh copy of this task on an isolated git worktree based on the live
|
||||
branch. Your current workspace and its commits are left untouched.
|
||||
</p>
|
||||
</div>
|
||||
<dl className="space-y-1 rounded-md border border-border/70 bg-muted/30 px-2.5 py-2 text-[11px]">
|
||||
<dl className="space-y-1 rounded-md border border-border/70 bg-muted/30 px-2.5 py-2 text-(length:--text-micro)">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<dt className="text-muted-foreground">Base ref</dt>
|
||||
<dd className="min-w-0 truncate font-mono text-foreground/90">{reissueBaseRef}</dd>
|
||||
@@ -807,11 +807,11 @@ export function IssueRecoveryActionCard({
|
||||
) : null}
|
||||
{showResolveActions ? (
|
||||
cardState === "observe_only" ? (
|
||||
<span className="text-[11px] text-muted-foreground">
|
||||
<span className="text-(length:--text-micro) text-muted-foreground">
|
||||
Recovery is observing without interrupting the live run.
|
||||
</span>
|
||||
) : (
|
||||
<span className="text-[11px] text-muted-foreground">
|
||||
<span className="text-(length:--text-micro) text-muted-foreground">
|
||||
The card stays open until an explicit decision is recorded.
|
||||
</span>
|
||||
)
|
||||
|
||||
@@ -20,7 +20,7 @@ export function IssueReferencePill({
|
||||
const classNames = cn(
|
||||
"paperclip-mention-chip paperclip-mention-chip--issue",
|
||||
"inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 text-xs no-underline",
|
||||
issue.identifier && "hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
|
||||
issue.identifier && "hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-ring",
|
||||
strikethrough && "opacity-60 line-through decoration-muted-foreground",
|
||||
className,
|
||||
);
|
||||
|
||||
@@ -72,7 +72,7 @@ function Section({
|
||||
>
|
||||
<span>{group.label}</span>
|
||||
{group.count > 1 ? (
|
||||
<span className="tabular-nums text-[10px] font-medium opacity-80">×{group.count}</span>
|
||||
<span className="tabular-nums text-(length:--text-nano) font-medium opacity-80">×{group.count}</span>
|
||||
) : null}
|
||||
</span>
|
||||
))}
|
||||
|
||||
@@ -101,7 +101,7 @@ export function IssueRow({
|
||||
const parkedBlockerIndicator = hasAssignedBacklogBlocker(issue.blockedBy) ? (
|
||||
<span
|
||||
data-testid="issue-row-parked-blocker"
|
||||
className="ml-1.5 inline-flex shrink-0 items-center gap-0.5 rounded-full border border-amber-500/60 bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-700 dark:text-amber-300"
|
||||
className="ml-1.5 inline-flex shrink-0 items-center gap-0.5 rounded-full border border-amber-500/60 bg-amber-500/15 px-2 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:text-amber-300"
|
||||
title="Blocked by parked work — at least one assigned blocker is in backlog and will not wake its assignee."
|
||||
>
|
||||
<Flag className="h-2.5 w-2.5" aria-hidden />
|
||||
@@ -122,7 +122,7 @@ export function IssueRow({
|
||||
className={cn(
|
||||
"group flex items-start gap-2 border-b border-border py-2.5 pl-2 pr-3 text-sm no-underline text-inherit transition-colors last:border-b-0 sm:items-center sm:py-2 sm:pl-1",
|
||||
selected ? "hover:bg-transparent" : "hover:bg-accent/50",
|
||||
checklistCurrentStep ? "border-l-2 border-l-primary bg-primary/5 pl-[calc(theme(spacing.2)-2px)] sm:pl-[calc(theme(spacing.1)-2px)]" : null,
|
||||
checklistCurrentStep ? "border-l-2 border-l-primary bg-primary/5 pl-(--sz-calc-11) sm:pl-(--sz-calc-12)" : null,
|
||||
className,
|
||||
)}
|
||||
>
|
||||
@@ -137,7 +137,7 @@ export function IssueRow({
|
||||
{issue.title}{titleSuffix}
|
||||
</span>
|
||||
{checklistDependencyChips ? (
|
||||
<span className="flex flex-wrap gap-1 sm:order-3 sm:ml-[calc(theme(spacing.3)+theme(spacing.2))]">
|
||||
<span className="flex flex-wrap gap-1 sm:order-3 sm:ml-(--sz-calc-13)">
|
||||
{checklistDependencyChips}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -256,7 +256,7 @@ function renderRecoveryChip(action: IssueRecoveryAction, selected: boolean): Rea
|
||||
role="status"
|
||||
aria-label={label}
|
||||
className={cn(
|
||||
"ml-1.5 inline-flex shrink-0 items-center gap-0.5 rounded-full border px-2 py-0.5 text-[10px] font-medium",
|
||||
"ml-1.5 inline-flex shrink-0 items-center gap-0.5 rounded-full border px-2 py-0.5 text-(length:--text-nano) font-medium",
|
||||
tone.className,
|
||||
selected ? "!border-muted-foreground !text-muted-foreground" : null,
|
||||
)}
|
||||
|
||||
@@ -121,7 +121,7 @@ const PENDING_LIVENESS_COPY: LivenessCopy = {
|
||||
|
||||
const RETRY_PENDING_LIVENESS_COPY: LivenessCopy = {
|
||||
label: "Retry pending",
|
||||
tone: "border-cyan-500/30 bg-cyan-500/10 text-cyan-700 dark:text-cyan-300",
|
||||
tone: "border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300",
|
||||
description: "Paperclip queued an automatic retry that has not started yet.",
|
||||
};
|
||||
|
||||
@@ -580,7 +580,7 @@ export function IssueRunLedgerContent({
|
||||
<Link
|
||||
key={child.id}
|
||||
to={`/issues/${child.identifier ?? child.id}`}
|
||||
className="inline-flex min-w-0 max-w-full items-center gap-1 rounded-md border border-border bg-background px-2 py-1 text-[11px] hover:bg-accent/40"
|
||||
className="inline-flex min-w-0 max-w-full items-center gap-1 rounded-md border border-border bg-background px-2 py-1 text-(length:--text-micro) hover:bg-accent/40"
|
||||
>
|
||||
<span className="shrink-0 font-mono text-muted-foreground">{child.identifier ?? child.id.slice(0, 8)}</span>
|
||||
<span className="truncate">{child.title}</span>
|
||||
@@ -588,7 +588,7 @@ export function IssueRunLedgerContent({
|
||||
</Link>
|
||||
))}
|
||||
{children.active.length > 4 ? (
|
||||
<span className="rounded-md border border-border px-2 py-1 text-[11px] text-muted-foreground">
|
||||
<span className="rounded-md border border-border px-2 py-1 text-(length:--text-micro) text-muted-foreground">
|
||||
+{children.active.length - 4} more
|
||||
</span>
|
||||
) : null}
|
||||
@@ -632,7 +632,7 @@ export function IssueRunLedgerContent({
|
||||
<div className="mt-2 flex flex-wrap gap-1.5">
|
||||
<button
|
||||
type="button"
|
||||
className="rounded-md border border-border bg-background/80 px-2 py-1 text-[11px] text-foreground hover:bg-background"
|
||||
className="rounded-md border border-border bg-background/80 px-2 py-1 text-(length:--text-micro) text-foreground hover:bg-background"
|
||||
onClick={() =>
|
||||
onWatchdogDecision({
|
||||
runId: latestSilentRun.runId,
|
||||
@@ -645,7 +645,7 @@ export function IssueRunLedgerContent({
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="rounded-md border border-border bg-background/80 px-2 py-1 text-[11px] text-foreground hover:bg-background"
|
||||
className="rounded-md border border-border bg-background/80 px-2 py-1 text-(length:--text-micro) text-foreground hover:bg-background"
|
||||
onClick={() =>
|
||||
onWatchdogDecision({
|
||||
runId: latestSilentRun.runId,
|
||||
@@ -660,7 +660,7 @@ export function IssueRunLedgerContent({
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="rounded-md border border-border bg-background/80 px-2 py-1 text-[11px] text-foreground hover:bg-background"
|
||||
className="rounded-md border border-border bg-background/80 px-2 py-1 text-(length:--text-micro) text-foreground hover:bg-background"
|
||||
onClick={() =>
|
||||
onWatchdogDecision({
|
||||
runId: latestSilentRun.runId,
|
||||
@@ -675,7 +675,7 @@ export function IssueRunLedgerContent({
|
||||
</div>
|
||||
) : null}
|
||||
{watchdogDecisionError ? (
|
||||
<p className="mt-2 rounded-md border border-red-500/30 bg-red-500/10 px-2 py-1 text-[11px] text-red-900 dark:text-red-200">
|
||||
<p className="mt-2 rounded-md border border-red-500/30 bg-red-500/10 px-2 py-1 text-(length:--text-micro) text-red-900 dark:text-red-200">
|
||||
{watchdogDecisionError}
|
||||
</p>
|
||||
) : null}
|
||||
@@ -730,18 +730,18 @@ export function IssueRunLedgerContent({
|
||||
on behalf of <span className="text-foreground">{onBehalfOfLabel}</span>
|
||||
</span>
|
||||
) : null}
|
||||
<span className="rounded-md border border-border px-1.5 py-0.5 text-[11px] capitalize text-muted-foreground">
|
||||
<span className="rounded-md border border-border px-1.5 py-0.5 text-(length:--text-micro) capitalize text-muted-foreground">
|
||||
{statusLabel(run.status)}
|
||||
</span>
|
||||
{run.isLive ? (
|
||||
<span className="inline-flex items-center gap-1 rounded-md border border-cyan-500/30 bg-cyan-500/10 px-1.5 py-0.5 text-[11px] text-cyan-700 dark:text-cyan-300">
|
||||
<span className="h-1.5 w-1.5 rounded-full bg-cyan-400" />
|
||||
<span className="inline-flex items-center gap-1 rounded-md border border-blue-500/30 bg-blue-500/10 px-1.5 py-0.5 text-(length:--text-micro) text-blue-700 dark:text-blue-300">
|
||||
<span className="h-1.5 w-1.5 rounded-full bg-blue-500" />
|
||||
live
|
||||
</span>
|
||||
) : null}
|
||||
<span
|
||||
className={cn(
|
||||
"rounded-md border px-1.5 py-0.5 text-[11px] font-medium",
|
||||
"rounded-md border px-1.5 py-0.5 text-(length:--text-micro) font-medium",
|
||||
liveness.tone,
|
||||
)}
|
||||
title={liveness.description}
|
||||
@@ -749,17 +749,17 @@ export function IssueRunLedgerContent({
|
||||
{liveness.label}
|
||||
</span>
|
||||
{exhausted ? (
|
||||
<span className="rounded-md border border-red-500/30 bg-red-500/10 px-1.5 py-0.5 text-[11px] font-medium text-red-700 dark:text-red-300">
|
||||
<span className="rounded-md border border-red-500/30 bg-red-500/10 px-1.5 py-0.5 text-(length:--text-micro) font-medium text-red-700 dark:text-red-300">
|
||||
Exhausted
|
||||
</span>
|
||||
) : null}
|
||||
{continuation ? (
|
||||
<span className="text-[11px] text-muted-foreground">{continuation}</span>
|
||||
<span className="text-(length:--text-micro) text-muted-foreground">{continuation}</span>
|
||||
) : null}
|
||||
{retryState ? (
|
||||
<span
|
||||
className={cn(
|
||||
"rounded-md border px-1.5 py-0.5 text-[11px] font-medium",
|
||||
"rounded-md border px-1.5 py-0.5 text-(length:--text-micro) font-medium",
|
||||
retryState.tone,
|
||||
)}
|
||||
>
|
||||
@@ -769,7 +769,7 @@ export function IssueRunLedgerContent({
|
||||
{run.outputSilence && RUN_OUTPUT_SILENCE_COPY[run.outputSilence.level] ? (
|
||||
<span
|
||||
className={cn(
|
||||
"rounded-md border px-1.5 py-0.5 text-[11px] font-medium",
|
||||
"rounded-md border px-1.5 py-0.5 text-(length:--text-micro) font-medium",
|
||||
RUN_OUTPUT_SILENCE_COPY[run.outputSilence.level]?.tone,
|
||||
)}
|
||||
>
|
||||
@@ -787,7 +787,7 @@ export function IssueRunLedgerContent({
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"rounded-md border px-1.5 py-0.5 text-[11px] font-medium",
|
||||
"rounded-md border px-1.5 py-0.5 text-(length:--text-micro) font-medium",
|
||||
modelProfileBadgeTone(profile),
|
||||
)}
|
||||
title={modelProfileTitle(profile)}
|
||||
@@ -837,7 +837,7 @@ export function IssueRunLedgerContent({
|
||||
const profile = modelProfileForRun(run);
|
||||
if (!profile?.fallbackReason || profile.applied === profile.requested) return null;
|
||||
return (
|
||||
<p className="min-w-0 break-words text-[11px] leading-5 text-amber-700 dark:text-amber-300">
|
||||
<p className="min-w-0 break-words text-(length:--text-micro) leading-5 text-amber-700 dark:text-amber-300">
|
||||
{profile.requested === "cheap"
|
||||
? "Cheap profile fell back to primary"
|
||||
: `${profile.requested} profile unavailable`}
|
||||
|
||||
@@ -69,12 +69,12 @@ export function IssueScheduledRetryCard({
|
||||
return (
|
||||
<div
|
||||
data-testid="issue-scheduled-retry-card"
|
||||
className="mb-3 rounded-lg border border-cyan-500/30 bg-cyan-500/5 px-3 py-3"
|
||||
className="mb-3 rounded-lg border border-blue-500/30 bg-blue-500/5 px-3 py-3"
|
||||
>
|
||||
<div className="flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex flex-wrap items-center gap-2 text-xs">
|
||||
<span className="inline-flex items-center gap-1 rounded-full border border-cyan-500/30 bg-cyan-500/10 px-2 py-0.5 font-medium text-cyan-700 dark:text-cyan-300">
|
||||
<span className="inline-flex items-center gap-1 rounded-full border border-blue-500/30 bg-blue-500/10 px-2 py-0.5 font-medium text-blue-700 dark:text-blue-300">
|
||||
<Clock className="h-3 w-3" aria-hidden="true" />
|
||||
{badgeLabel}
|
||||
</span>
|
||||
@@ -145,7 +145,7 @@ export function IssueScheduledRetryCard({
|
||||
</span>
|
||||
)}
|
||||
</Button>
|
||||
<span className="text-right text-xs text-muted-foreground sm:max-w-[12rem]">
|
||||
<span className="text-right text-xs text-muted-foreground sm:max-w-(--sz-12rem)">
|
||||
{retryNow.isPending
|
||||
? "Promoting scheduled retry"
|
||||
: isSuccessTransient
|
||||
|
||||
@@ -105,7 +105,7 @@ describe("IssueSiblingNavigation", () => {
|
||||
|
||||
expect(links[0].className).toContain("rounded-lg");
|
||||
expect(links[0].className).toContain("hover:bg-accent/50");
|
||||
expect(links[0].className).toContain("focus-visible:ring-[3px]");
|
||||
expect(links[0].className).toContain("focus-visible:ring-(length:--rad-3)");
|
||||
expect(node.querySelector(".truncate")?.textContent).toBe("Previous sibling title");
|
||||
});
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ function SiblingLink({
|
||||
issueQuicklookAlign={direction === "previous" ? "start" : "end"}
|
||||
aria-label={`${ariaDirection}: ${identifier} - ${issue.title}`}
|
||||
className={cn(
|
||||
"group min-w-0 rounded-lg border border-border bg-card px-3 py-2.5 text-left no-underline transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
|
||||
"group min-w-0 rounded-lg border border-border bg-card px-3 py-2.5 text-left no-underline transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-ring",
|
||||
direction === "next" && "sm:text-right",
|
||||
className,
|
||||
)}
|
||||
|
||||
@@ -218,7 +218,7 @@ function TaskField({
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"inline-flex items-center rounded-sm border px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.16em]",
|
||||
"inline-flex items-center rounded-sm border px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow)",
|
||||
tone === "default"
|
||||
? "border-border/70 bg-transparent text-foreground"
|
||||
: "border-border/60 bg-transparent text-muted-foreground",
|
||||
@@ -316,7 +316,7 @@ function TaskTreeNode({
|
||||
</div>
|
||||
</div>
|
||||
{depth > 0 ? (
|
||||
<div className="mt-0.5 text-[10px] font-medium uppercase tracking-[0.14em] text-muted-foreground">
|
||||
<div className="mt-0.5 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Child task
|
||||
</div>
|
||||
) : null}
|
||||
@@ -332,13 +332,13 @@ function TaskTreeNode({
|
||||
{createdTask?.issueId ? (
|
||||
<Link
|
||||
to={`/issues/${createdTask.identifier ?? createdTask.issueId}`}
|
||||
className="inline-flex shrink-0 items-center gap-1 rounded-sm border border-emerald-500/50 bg-emerald-500/10 px-2.5 py-1 text-[11px] font-medium text-emerald-900 transition-colors hover:bg-emerald-500/15 dark:text-emerald-100"
|
||||
className="inline-flex shrink-0 items-center gap-1 rounded-sm border border-emerald-500/50 bg-emerald-500/10 px-2.5 py-1 text-(length:--text-micro) font-medium text-emerald-900 transition-colors hover:bg-emerald-500/15 dark:text-emerald-100"
|
||||
>
|
||||
{createdTask.identifier ?? createdTask.issueId.slice(0, 8)}
|
||||
<ChevronRight className="h-3 w-3" />
|
||||
</Link>
|
||||
) : isSkipped ? (
|
||||
<span className="inline-flex shrink-0 items-center rounded-sm border border-amber-500/60 bg-amber-500/10 px-2.5 py-1 text-[11px] font-medium text-amber-900 dark:text-amber-100">
|
||||
<span className="inline-flex shrink-0 items-center rounded-sm border border-amber-500/60 bg-amber-500/10 px-2.5 py-1 text-(length:--text-micro) font-medium text-amber-900 dark:text-amber-100">
|
||||
Skipped
|
||||
</span>
|
||||
) : null}
|
||||
@@ -540,7 +540,7 @@ function SuggestTasksCard({
|
||||
|
||||
{interaction.status === "accepted" ? (
|
||||
<div className="rounded-sm border border-emerald-500/60 bg-emerald-500/10 px-4 py-3 text-sm text-emerald-900 dark:text-emerald-100">
|
||||
<div className="text-[11px] font-semibold uppercase tracking-[0.16em] text-emerald-700">
|
||||
<div className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow) text-emerald-700">
|
||||
Resolution summary
|
||||
</div>
|
||||
<p className="mt-1 leading-6">
|
||||
@@ -553,7 +553,7 @@ function SuggestTasksCard({
|
||||
|
||||
{interaction.status === "rejected" ? (
|
||||
<div className="rounded-sm border border-rose-500/60 bg-rose-500/10 px-4 py-3 text-sm text-rose-900 dark:text-rose-100">
|
||||
<div className="text-[11px] font-semibold uppercase tracking-[0.16em] text-rose-700">
|
||||
<div className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow) text-rose-700">
|
||||
Rejection reason
|
||||
</div>
|
||||
<p className={cn(
|
||||
@@ -671,7 +671,7 @@ function QuestionOptionButton({
|
||||
role={selectionMode === "single" ? "radio" : "checkbox"}
|
||||
aria-checked={selected}
|
||||
className={cn(
|
||||
"w-full rounded-sm border px-4 py-3 text-left transition-colors outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
||||
"w-full rounded-sm border px-4 py-3 text-left transition-colors outline-none focus-visible:border-ring focus-visible:ring-(length:--rad-3) focus-visible:ring-ring/50",
|
||||
selected
|
||||
? "border-sky-500/80 bg-sky-500/10 text-sky-950 dark:border-sky-400/80 dark:bg-sky-400/15 dark:text-sky-50"
|
||||
: "border-border/70 bg-transparent text-foreground hover:border-sky-500/70 hover:bg-sky-500/10 dark:hover:border-sky-400/70 dark:hover:bg-sky-400/10",
|
||||
@@ -842,7 +842,7 @@ function AskUserQuestionsCard({
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
|
||||
<span className="inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/70 px-2.5 py-1 font-medium uppercase tracking-[0.16em] text-foreground/70">
|
||||
<span className="inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/70 px-2.5 py-1 font-medium uppercase tracking-(--tracking-eyebrow) text-foreground/70">
|
||||
<MessageSquareQuote className="h-3 w-3" />
|
||||
Ask user questions
|
||||
</span>
|
||||
@@ -858,11 +858,11 @@ function AskUserQuestionsCard({
|
||||
{questions.map((question, index) => (
|
||||
<div
|
||||
key={question.id}
|
||||
className="rounded-2xl border border-border/70 bg-background/82 p-4 shadow-[0_18px_42px_rgba(15,23,42,0.06)]"
|
||||
className="rounded-2xl border border-border/70 bg-background/82 p-4 shadow-(--shadow-extract-9)"
|
||||
>
|
||||
<div className="flex items-start justify-between gap-3">
|
||||
<div>
|
||||
<div className="text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Question {index + 1}
|
||||
</div>
|
||||
<div
|
||||
@@ -908,7 +908,7 @@ function AskUserQuestionsCard({
|
||||
id={`${interaction.id}-${question.id}-other`}
|
||||
aria-expanded={otherActiveQuestions[question.id] === true}
|
||||
className={cn(
|
||||
"text-sm font-medium underline underline-offset-4 transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
||||
"text-sm font-medium underline underline-offset-4 transition-colors outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-ring/50",
|
||||
otherActiveQuestions[question.id]
|
||||
? "text-sky-700 hover:text-sky-800 dark:text-sky-300 dark:hover:text-sky-200"
|
||||
: "text-muted-foreground hover:text-foreground",
|
||||
@@ -1031,7 +1031,7 @@ function AskUserQuestionsCard({
|
||||
|
||||
{interaction.result?.summaryMarkdown ? (
|
||||
<div className="rounded-2xl border border-emerald-300/60 bg-emerald-50/85 p-4">
|
||||
<div className="mb-2 text-[11px] font-semibold uppercase tracking-[0.16em] text-emerald-700">
|
||||
<div className="mb-2 text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow) text-emerald-700">
|
||||
Submitted summary
|
||||
</div>
|
||||
<MarkdownBody externalReferences={externalReferences}>{interaction.result.summaryMarkdown}</MarkdownBody>
|
||||
@@ -1080,7 +1080,7 @@ function RequestConfirmationTargetChip({
|
||||
|
||||
const href = requestConfirmationTargetHref({ interaction, target });
|
||||
const className = cn(
|
||||
"inline-flex max-w-full items-center gap-1.5 rounded-sm border px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.16em]",
|
||||
"inline-flex max-w-full items-center gap-1.5 rounded-sm border px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow)",
|
||||
tone === "default"
|
||||
? "border-border/70 bg-transparent text-foreground"
|
||||
: "border-border/60 bg-transparent text-muted-foreground",
|
||||
@@ -1147,7 +1147,7 @@ function RequestConfirmationResolution({
|
||||
const expiredByTargetChange = outcome === "stale_target";
|
||||
return (
|
||||
<div className="space-y-3 rounded-sm border border-amber-500/60 bg-amber-500/10 px-4 py-3 text-sm text-amber-900 dark:text-amber-100">
|
||||
<div className="text-[11px] font-semibold uppercase tracking-[0.16em] text-amber-700">
|
||||
<div className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow) text-amber-700">
|
||||
{expiredByComment ? "Expired by comment" : "Expired by target change"}
|
||||
</div>
|
||||
<p className="leading-6">
|
||||
@@ -1497,7 +1497,7 @@ function RequestCheckboxConfirmationResolution({
|
||||
const hiddenCount = selectedLabels.length - CHECKBOX_SUMMARY_LABEL_LIMIT;
|
||||
const hasHiddenLabels = hiddenCount > 0;
|
||||
const chipClassName =
|
||||
"inline-flex items-center rounded-sm border border-border/60 bg-transparent px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.16em] text-muted-foreground";
|
||||
"inline-flex items-center rounded-sm border border-border/60 bg-transparent px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground";
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
@@ -1935,7 +1935,7 @@ export function IssueThreadInteractionCard({
|
||||
<div className="flex flex-wrap items-start justify-between gap-4">
|
||||
<div className="min-w-0 flex-1 basis-64">
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<span className={cn("inline-flex items-center gap-1 rounded-sm border px-2.5 py-1 text-[11px] font-semibold uppercase tracking-[0.16em]", styles.badge)}>
|
||||
<span className={cn("inline-flex items-center gap-1 rounded-sm border px-2.5 py-1 text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow)", styles.badge)}>
|
||||
<StatusIcon className="h-3.5 w-3.5" />
|
||||
{isPlan ? "Plan" : interactionKindLabel(interaction.kind)}
|
||||
<span className="text-current/60">/</span>
|
||||
|
||||
@@ -144,7 +144,7 @@ function statusBadge(status: string) {
|
||||
archived: "bg-muted text-muted-foreground",
|
||||
};
|
||||
return (
|
||||
<span className={cn("text-[10px] px-1.5 py-0.5 rounded-full font-medium", colors[status] ?? colors.idle)}>
|
||||
<span className={cn("text-(length:--text-nano) px-1.5 py-0.5 rounded-full font-medium", colors[status] ?? colors.idle)}>
|
||||
{status.replace(/_/g, " ")}
|
||||
</span>
|
||||
);
|
||||
@@ -405,7 +405,7 @@ export function IssueWorkspaceCard({
|
||||
)}
|
||||
{workspace?.repoUrl && (
|
||||
<div className="flex items-center gap-1.5 text-muted-foreground">
|
||||
<span className="text-[11px]">Repo:</span>
|
||||
<span className="text-(length:--text-micro)">Repo:</span>
|
||||
<CopyableInline value={workspace.repoUrl} mono />
|
||||
</div>
|
||||
)}
|
||||
@@ -447,7 +447,7 @@ export function IssueWorkspaceCard({
|
||||
<div className="pt-0.5">
|
||||
<Link
|
||||
to={currentWorkspaceLink}
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground hover:underline"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground hover:underline"
|
||||
>
|
||||
View workspace details →
|
||||
</Link>
|
||||
@@ -493,7 +493,7 @@ export function IssueWorkspaceCard({
|
||||
|
||||
{/* Current workspace summary when editing */}
|
||||
{workspace && (
|
||||
<div className="text-[11px] text-muted-foreground space-y-0.5 pt-1 border-t border-border/50">
|
||||
<div className="text-(length:--text-micro) text-muted-foreground space-y-0.5 pt-1 border-t border-border/50">
|
||||
<div style={{ overflowWrap: "anywhere" }}>
|
||||
Current:{" "}
|
||||
{currentWorkspaceLink ? (
|
||||
|
||||
@@ -1763,7 +1763,7 @@ export function IssuesList({
|
||||
target.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
||||
target.focus?.();
|
||||
}}
|
||||
className="inline-flex items-center rounded-full border border-amber-400/45 bg-amber-50/60 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 hover:bg-amber-100/80 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300"
|
||||
className="inline-flex items-center rounded-full border border-amber-400/45 bg-amber-50/60 px-1.5 py-0.5 text-(length:--text-nano) font-medium text-amber-700 hover:bg-amber-100/80 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300"
|
||||
title={firstVisibleBlockerTitle}
|
||||
aria-label={firstVisibleBlockerTitle}
|
||||
>
|
||||
@@ -1803,7 +1803,7 @@ export function IssuesList({
|
||||
{issueBadge ? (
|
||||
issueBadge === "Paused" ? (
|
||||
<span
|
||||
className={cn("ml-1.5 inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-medium", statusBadge.paused)}
|
||||
className={cn("ml-1.5 inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-(length:--text-nano) font-medium", statusBadge.paused)}
|
||||
aria-label="Paused"
|
||||
title="Paused"
|
||||
>
|
||||
@@ -1811,14 +1811,14 @@ export function IssuesList({
|
||||
Paused
|
||||
</span>
|
||||
) : (
|
||||
<span className="ml-1.5 inline-flex items-center rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:text-amber-300">
|
||||
<span className="ml-1.5 inline-flex items-center rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:text-amber-300">
|
||||
{issueBadge}
|
||||
</span>
|
||||
)
|
||||
) : null}
|
||||
{isSuccessfulRunHandoffRequired(issue) ? (
|
||||
<span
|
||||
className="ml-1.5 inline-flex items-center gap-1 rounded-full border border-amber-400/45 bg-amber-50/60 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300"
|
||||
className="ml-1.5 inline-flex items-center gap-1 rounded-full border border-amber-400/45 bg-amber-50/60 px-1.5 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300"
|
||||
aria-label="Needs next step"
|
||||
title="This task needs a next step"
|
||||
>
|
||||
|
||||
@@ -363,12 +363,12 @@ const FieldWrapper = React.memo(({
|
||||
</div>
|
||||
{children}
|
||||
{description && (
|
||||
<p className="text-[12px] text-muted-foreground leading-relaxed">
|
||||
<p className="text-xs text-muted-foreground leading-relaxed">
|
||||
{description}
|
||||
</p>
|
||||
)}
|
||||
{error && (
|
||||
<p className="text-[12px] font-medium text-destructive">{error}</p>
|
||||
<p className="text-xs font-medium text-destructive">{error}</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
@@ -597,7 +597,7 @@ const SecretField = React.memo(({
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
placeholder={String(defaultValue ?? "")}
|
||||
disabled={disabled}
|
||||
className="min-h-[140px] pr-10 font-mono text-xs"
|
||||
className="min-h-(--sz-140px) pr-10 font-mono text-xs"
|
||||
aria-invalid={!!error}
|
||||
/>
|
||||
) : (
|
||||
@@ -614,7 +614,7 @@ const SecretField = React.memo(({
|
||||
readOnly
|
||||
placeholder={String(defaultValue ?? "")}
|
||||
disabled={disabled}
|
||||
className="min-h-[140px] pr-10 font-mono text-xs italic text-muted-foreground"
|
||||
className="min-h-(--sz-140px) pr-10 font-mono text-xs italic text-muted-foreground"
|
||||
aria-invalid={!!error}
|
||||
/>
|
||||
)}
|
||||
@@ -695,7 +695,7 @@ const SecretField = React.memo(({
|
||||
{!hasRawValue ? (
|
||||
<button
|
||||
type="button"
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground"
|
||||
onClick={() => {
|
||||
setShowRawInput(false);
|
||||
setIsVisible(false);
|
||||
@@ -709,7 +709,7 @@ const SecretField = React.memo(({
|
||||
) : (
|
||||
<button
|
||||
type="button"
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground"
|
||||
onClick={() => setShowRawInput(true)}
|
||||
disabled={disabled}
|
||||
>
|
||||
@@ -837,7 +837,7 @@ const StringField = React.memo(({
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
placeholder={String(defaultValue ?? "")}
|
||||
disabled={disabled}
|
||||
className="min-h-[100px]"
|
||||
className="min-h-(--sz-100px)"
|
||||
aria-invalid={!!error}
|
||||
/>
|
||||
) : (
|
||||
|
||||
@@ -153,17 +153,17 @@ function KanbanColumn({
|
||||
<div
|
||||
ref={setNodeRef}
|
||||
className={cn(
|
||||
"flex min-h-[220px] w-[52px] shrink-0 flex-col items-center rounded-md border px-1.5 py-2 transition-colors",
|
||||
"flex min-h-(--sz-220px) w-(--sz-52px) shrink-0 flex-col items-center rounded-md border px-1.5 py-2 transition-colors",
|
||||
tone.rail,
|
||||
isOver && tone.railOver,
|
||||
)}
|
||||
title={`${statusLabel(status)}: ${issues.length}`}
|
||||
>
|
||||
<StatusIcon status={status} />
|
||||
<span className={cn("mt-2 [writing-mode:vertical-rl] rotate-180 text-[10px] font-semibold uppercase tracking-wide", tone.header)}>
|
||||
<span className={cn("mt-2 [writing-mode:vertical-rl] rotate-180 text-(length:--text-nano) font-semibold uppercase tracking-wide", tone.header)}>
|
||||
{statusLabel(status)}
|
||||
</span>
|
||||
<span className={cn("mt-auto rounded-full bg-background px-1.5 py-0.5 text-[10px] font-medium tabular-nums", tone.header)}>
|
||||
<span className={cn("mt-auto rounded-full bg-background px-1.5 py-0.5 text-(length:--text-nano) font-medium tabular-nums", tone.header)}>
|
||||
{issues.length}
|
||||
</span>
|
||||
</div>
|
||||
@@ -171,7 +171,7 @@ function KanbanColumn({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`flex flex-col shrink-0 transition-[width,min-width] ${isEmpty && !isOver ? "min-w-[48px] w-[48px]" : "min-w-[260px] w-[260px]"}`}>
|
||||
<div className={`flex flex-col shrink-0 transition-(--tp-width-min-width) ${isEmpty && !isOver ? "min-w-(--sz-48px) w-(--sz-48px)" : "min-w-(--sz-260px) w-(--sz-260px)"}`}>
|
||||
<div className={`flex items-center gap-2 px-2 py-2 mb-1 ${isEmpty && !isOver ? "justify-center" : ""}`}>
|
||||
<StatusIcon status={status} />
|
||||
{(!isEmpty || isOver) && (
|
||||
@@ -188,7 +188,7 @@ function KanbanColumn({
|
||||
<div
|
||||
ref={setNodeRef}
|
||||
className={cn(
|
||||
"flex-1 min-h-[120px] rounded-md p-1 space-y-1 transition-colors",
|
||||
"flex-1 min-h-(--sz-120px) rounded-md p-1 space-y-1 transition-colors",
|
||||
isOver ? tone.bodyOver : tone.body,
|
||||
)}
|
||||
>
|
||||
@@ -219,7 +219,7 @@ function KanbanColumn({
|
||||
</button>
|
||||
) : null}
|
||||
{issues.length > 0 && (hiddenCount > 0 || issues.length >= visibleCount) ? (
|
||||
<p className="px-1 pt-1 text-[11px] text-muted-foreground">
|
||||
<p className="px-1 pt-1 text-(length:--text-micro) text-muted-foreground">
|
||||
Showing {visibleIssues.length} of {issues.length}
|
||||
</p>
|
||||
) : null}
|
||||
@@ -295,7 +295,7 @@ function KanbanCard({
|
||||
</span>
|
||||
{isSuccessfulRunHandoffRequired(issue) ? (
|
||||
<span
|
||||
className="inline-flex items-center gap-1 rounded-full border border-amber-400/45 bg-amber-50/60 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300"
|
||||
className="inline-flex items-center gap-1 rounded-full border border-amber-400/45 bg-amber-50/60 px-1.5 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300"
|
||||
title="This task needs a next step"
|
||||
aria-label="Needs next step"
|
||||
>
|
||||
@@ -304,7 +304,7 @@ function KanbanCard({
|
||||
</span>
|
||||
) : null}
|
||||
{isLive && (
|
||||
<span className="inline-flex shrink-0 items-center gap-1 text-[10px] font-medium text-blue-600 dark:text-blue-400">
|
||||
<span className="inline-flex shrink-0 items-center gap-1 text-(length:--text-nano) font-medium text-blue-600 dark:text-blue-400">
|
||||
<span className="relative flex h-2 w-2">
|
||||
<span className="animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" />
|
||||
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-500" />
|
||||
@@ -314,7 +314,7 @@ function KanbanCard({
|
||||
)}
|
||||
{!isLive && subtreeLiveCount > 0 && (
|
||||
<span
|
||||
className="inline-flex shrink-0 items-center gap-1 rounded-full border border-border px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"
|
||||
className="inline-flex shrink-0 items-center gap-1 rounded-full border border-border px-1.5 py-0.5 text-(length:--text-nano) font-medium text-muted-foreground"
|
||||
title={`${subtreeLiveCount} sub-task${subtreeLiveCount === 1 ? "" : "s"} running below`}
|
||||
>
|
||||
<span className="h-2 w-2 shrink-0 rounded-full border border-muted-foreground/60" aria-hidden="true" />
|
||||
|
||||
@@ -64,7 +64,7 @@ const sections: ShortcutSection[] = [
|
||||
|
||||
function KeyCap({ children }: { children: string }) {
|
||||
return (
|
||||
<kbd className="inline-flex h-6 min-w-6 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-xs font-medium text-foreground shadow-[0_1px_0_1px_hsl(var(--border))]">
|
||||
<kbd className="inline-flex h-6 min-w-6 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-xs font-medium text-foreground shadow-(--shadow-extract-10)">
|
||||
{children}
|
||||
</kbd>
|
||||
);
|
||||
@@ -76,7 +76,7 @@ export function KeyboardShortcutsCheatsheetContent() {
|
||||
<div className="divide-y divide-border border-t border-border">
|
||||
{sections.map((section) => (
|
||||
<div key={section.title} className="px-5 py-3">
|
||||
<h3 className="mb-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
|
||||
<h3 className="mb-2 text-(length:--text-micro) font-semibold uppercase tracking-wider text-muted-foreground">
|
||||
{section.title}
|
||||
</h3>
|
||||
<div className="space-y-1.5">
|
||||
|
||||
@@ -498,7 +498,7 @@ export function Layout() {
|
||||
<GeneralSettingsProvider value={{ keyboardShortcutsEnabled }}>
|
||||
<div
|
||||
className={cn(
|
||||
"bg-background text-foreground pt-[env(safe-area-inset-top)]",
|
||||
"bg-background text-foreground pt-(--sz-safe-top)",
|
||||
// overflow-x-clip on mobile keeps a stray wide descendant from making the
|
||||
// whole viewport scroll horizontally. clip (not hidden) leaves overflow-y
|
||||
// computed as visible, so native body scroll + the sticky breadcrumb keep
|
||||
@@ -508,7 +508,7 @@ export function Layout() {
|
||||
>
|
||||
<a
|
||||
href="#main-content"
|
||||
className="sr-only focus:not-sr-only focus:fixed focus:left-3 focus:top-3 focus:z-[200] focus:rounded-md focus:bg-background focus:px-3 focus:py-2 focus:text-sm focus:font-medium focus:shadow-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
||||
className="sr-only focus:not-sr-only focus:fixed focus:left-3 focus:top-3 focus:z-(--z-200) focus:rounded-md focus:bg-background focus:px-3 focus:py-2 focus:text-sm focus:font-medium focus:shadow-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
||||
>
|
||||
Skip to Main Content
|
||||
</a>
|
||||
@@ -527,7 +527,7 @@ export function Layout() {
|
||||
{isMobile ? (
|
||||
<div
|
||||
className={cn(
|
||||
"fixed inset-y-0 left-0 z-50 flex flex-col overflow-hidden pt-[env(safe-area-inset-top)] transition-transform duration-100 ease-out",
|
||||
"fixed inset-y-0 left-0 z-50 flex flex-col overflow-hidden pt-(--sz-safe-top) transition-transform duration-100 ease-out",
|
||||
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
||||
)}
|
||||
>
|
||||
@@ -591,7 +591,7 @@ export function Layout() {
|
||||
// changes (e.g. switching skill-detail tabs) don't widen/shift
|
||||
// when the vertical scrollbar appears or disappears (PAP-10907).
|
||||
isMobile
|
||||
? "overflow-visible pb-[calc(5rem+env(safe-area-inset-bottom))]"
|
||||
? "overflow-visible pb-(--sz-calc-14)"
|
||||
: "overflow-auto [scrollbar-gutter:stable]",
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -89,9 +89,9 @@ export function LiveRunWidget({ issueId, companyId }: LiveRunWidgetProps) {
|
||||
if (runs.length === 0) return null;
|
||||
|
||||
return (
|
||||
<div className="overflow-hidden rounded-xl border border-cyan-500/25 bg-background/80 shadow-[0_18px_50px_rgba(6,182,212,0.08)]">
|
||||
<div className="border-b border-border/60 bg-cyan-500/[0.04] px-4 py-3">
|
||||
<div className="text-xs font-semibold uppercase tracking-[0.18em] text-cyan-700 dark:text-cyan-300">
|
||||
<div className="overflow-hidden rounded-xl border border-blue-500/25 bg-background/80 shadow-(--shadow-extract-11)">
|
||||
<div className="border-b border-border/60 bg-blue-500/[0.04] px-4 py-3">
|
||||
<div className="text-xs font-semibold uppercase tracking-(--tracking-caps) text-blue-700 dark:text-blue-300">
|
||||
Live Runs
|
||||
</div>
|
||||
<div className="mt-1 text-xs text-muted-foreground">
|
||||
@@ -113,7 +113,7 @@ export function LiveRunWidget({ issueId, companyId }: LiveRunWidgetProps) {
|
||||
<div className="mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
|
||||
<Link
|
||||
to={`/agents/${run.agentId}/runs/${run.id}`}
|
||||
className="inline-flex items-center rounded-full border border-border/70 bg-background/70 px-2 py-1 font-mono hover:border-cyan-500/30 hover:text-foreground"
|
||||
className="inline-flex items-center rounded-full border border-border/70 bg-background/70 px-2 py-1 font-mono hover:border-blue-500/30 hover:text-foreground"
|
||||
>
|
||||
{run.id.slice(0, 8)}
|
||||
</Link>
|
||||
@@ -127,7 +127,7 @@ export function LiveRunWidget({ issueId, companyId }: LiveRunWidgetProps) {
|
||||
<button
|
||||
onClick={() => handleCancelRun(run.id)}
|
||||
disabled={cancellingRunIds.has(run.id)}
|
||||
className="inline-flex items-center gap-1 rounded-full border border-red-500/20 bg-red-500/[0.06] px-2.5 py-1 text-[11px] font-medium text-red-700 transition-colors hover:bg-red-500/[0.12] dark:text-red-300 disabled:opacity-50"
|
||||
className="inline-flex items-center gap-1 rounded-full border border-red-500/20 bg-red-500/[0.06] px-2.5 py-1 text-(length:--text-micro) font-medium text-red-700 transition-colors hover:bg-red-500/[0.12] dark:text-red-300 disabled:opacity-50"
|
||||
>
|
||||
<Square className="h-2.5 w-2.5" fill="currentColor" />
|
||||
{cancellingRunIds.has(run.id) ? "Stopping…" : "Stop"}
|
||||
@@ -135,7 +135,7 @@ export function LiveRunWidget({ issueId, companyId }: LiveRunWidgetProps) {
|
||||
)}
|
||||
<Link
|
||||
to={`/agents/${run.agentId}/runs/${run.id}`}
|
||||
className="inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/70 px-2.5 py-1 text-[11px] font-medium text-cyan-700 transition-colors hover:border-cyan-500/30 hover:text-cyan-600 dark:text-cyan-300"
|
||||
className="inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/70 px-2.5 py-1 text-(length:--text-micro) font-medium text-blue-700 transition-colors hover:border-blue-500/30 hover:text-blue-600 dark:text-blue-300"
|
||||
>
|
||||
Open run
|
||||
<ExternalLink className="h-3 w-3" />
|
||||
@@ -143,7 +143,7 @@ export function LiveRunWidget({ issueId, companyId }: LiveRunWidgetProps) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="max-h-[320px] overflow-y-auto pr-1">
|
||||
<div className="max-h-(--sz-320px) overflow-y-auto pr-1">
|
||||
<RunChatSurface
|
||||
run={run}
|
||||
transcript={transcript}
|
||||
|
||||
@@ -283,7 +283,7 @@ describe("MarkdownBody", () => {
|
||||
expect(html).toContain('data-workspace-file-link="true"');
|
||||
expect(html).toContain('data-workspace-file-path="videos/90-days-paperclip/out/90-days-paperclip-1x1.mp4"');
|
||||
expect(html).toContain("videos/90-days-paperclip/out/90-days-paperclip-1x1.mp4");
|
||||
expect(html).not.toContain("max-w-[38ch]");
|
||||
expect(html).not.toContain("max-w-(--sz-38ch)");
|
||||
expect(html).not.toContain("paperclip-markdown-issue-ref");
|
||||
expect(html).not.toContain('href="/issues/PAP-10306"');
|
||||
});
|
||||
@@ -433,7 +433,7 @@ describe("MarkdownBody", () => {
|
||||
const html = renderMarkdown("[https://github.com/paperclipai/paperclip/pull/4099](https://github.com/paperclipai/paperclip/pull/4099)");
|
||||
|
||||
expect(html).toContain('<a href="https://github.com/paperclipai/paperclip/pull/4099"');
|
||||
expect(html).toContain('class="lucide lucide-github mr-1 inline h-3.5 w-3.5 align-[-0.125em]"');
|
||||
expect(html).toContain('class="lucide lucide-github mr-1 inline h-3.5 w-3.5 align-(--va-0_125em)"');
|
||||
// The icon and first character "h" must sit in a no-wrap span so the
|
||||
// icon can never be orphaned on the previous line from the URL text.
|
||||
expect(html).toMatch(/<span style="white-space:nowrap">.*lucide-github.*?<\/svg>h<\/span>/);
|
||||
@@ -445,7 +445,7 @@ describe("MarkdownBody", () => {
|
||||
const html = renderMarkdown("See https://github.com/paperclipai/paperclip/issues/1778");
|
||||
|
||||
expect(html).toContain('<a href="https://github.com/paperclipai/paperclip/issues/1778"');
|
||||
expect(html).toContain('class="lucide lucide-github mr-1 inline h-3.5 w-3.5 align-[-0.125em]"');
|
||||
expect(html).toContain('class="lucide lucide-github mr-1 inline h-3.5 w-3.5 align-(--va-0_125em)"');
|
||||
});
|
||||
|
||||
it("does not prefix non-GitHub markdown links with the GitHub icon", () => {
|
||||
@@ -559,7 +559,7 @@ describe("MarkdownBody", () => {
|
||||
// PAP-243b: the lg glyph is optically centered to the body text
|
||||
// (vertical-align: middle + a 1px lift), not floating off the baseline.
|
||||
expect(html).toContain("align-middle");
|
||||
expect(html).not.toContain("align-[-0.125em]");
|
||||
expect(html).not.toContain("align-(--va-0_125em)");
|
||||
// Legacy h-3 w-3 sizing is gone.
|
||||
expect(html).not.toContain("mr-1 h-3 w-3");
|
||||
});
|
||||
|
||||
@@ -194,7 +194,7 @@ const codeBlockActionStyle: React.CSSProperties = {
|
||||
border: "1px solid color-mix(in oklab, var(--foreground) 14%, transparent)",
|
||||
backgroundColor: "color-mix(in oklab, var(--muted) 92%, var(--background) 8%)",
|
||||
color: "var(--muted-foreground)",
|
||||
fontSize: "0.7rem",
|
||||
fontSize: "var(--text-micro)",
|
||||
lineHeight: 1,
|
||||
cursor: "pointer",
|
||||
};
|
||||
@@ -827,10 +827,10 @@ function MarkdownBodyImpl({
|
||||
const isGitHubLink = isGitHubUrl(href);
|
||||
const isExternal = isExternalHttpUrl(href);
|
||||
const leadingIcon = isGitHubLink ? (
|
||||
<Github aria-hidden="true" className="mr-1 inline h-3.5 w-3.5 align-[-0.125em]" />
|
||||
<Github aria-hidden="true" className="mr-1 inline h-3.5 w-3.5 align-(--va-0_125em)" />
|
||||
) : null;
|
||||
const trailingIcon = isExternal && !isGitHubLink ? (
|
||||
<ExternalLink aria-hidden="true" className="ml-1 inline h-3 w-3 align-[-0.125em]" />
|
||||
<ExternalLink aria-hidden="true" className="ml-1 inline h-3 w-3 align-(--va-0_125em)" />
|
||||
) : null;
|
||||
return (
|
||||
<a
|
||||
|
||||
@@ -950,7 +950,7 @@ describe("MarkdownEditor", () => {
|
||||
|
||||
const options = Array.from(menu.querySelectorAll('button[type="button"]'));
|
||||
expect(options).toHaveLength(12);
|
||||
expect(menu.className).toContain("max-h-[208px]");
|
||||
expect(menu.className).toContain("max-h-(--sz-208px)");
|
||||
expect(menu.className).toContain("overflow-y-auto");
|
||||
expect(menu.style.touchAction).toBe("pan-y");
|
||||
|
||||
|
||||
@@ -1177,7 +1177,7 @@ export const MarkdownEditor = forwardRef<MarkdownEditorRef, MarkdownEditorProps>
|
||||
}
|
||||
}}
|
||||
className={cn(
|
||||
"min-h-[12rem] w-full resize-none bg-transparent px-3 pb-3 pt-2 font-mono text-sm leading-6 outline-none",
|
||||
"min-h-(--sz-12rem) w-full resize-none bg-transparent px-3 pb-3 pt-2 font-mono text-sm leading-6 outline-none",
|
||||
contentClassName,
|
||||
)}
|
||||
/>
|
||||
@@ -1345,7 +1345,7 @@ export const MarkdownEditor = forwardRef<MarkdownEditorRef, MarkdownEditorProps>
|
||||
<div
|
||||
data-paperclip-floating-ui=""
|
||||
data-testid="mention-autocomplete-menu"
|
||||
className="pointer-events-auto fixed z-[9999] min-w-[180px] max-w-[calc(100vw-16px)] max-h-[208px] overflow-y-auto rounded-md border border-border bg-popover shadow-md"
|
||||
className="pointer-events-auto fixed z-(--z-9999) min-w-(--sz-180px) max-w-(--sz-calc-15) max-h-(--sz-208px) overflow-y-auto rounded-md border border-border bg-popover shadow-md"
|
||||
style={{
|
||||
top: mentionMenuPosition.top,
|
||||
left: mentionMenuPosition.left,
|
||||
@@ -1391,7 +1391,7 @@ export const MarkdownEditor = forwardRef<MarkdownEditorRef, MarkdownEditorProps>
|
||||
) : option.kind === "project" && option.projectId ? (
|
||||
<span
|
||||
className="inline-flex h-2 w-2 rounded-full border border-border/50"
|
||||
style={{ backgroundColor: option.projectColor ?? "#64748b" }}
|
||||
style={{ backgroundColor: option.projectColor ?? "var(--project-none)" }}
|
||||
/>
|
||||
) : option.kind === "user" ? (
|
||||
<User className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
||||
@@ -1403,7 +1403,7 @@ export const MarkdownEditor = forwardRef<MarkdownEditorRef, MarkdownEditorProps>
|
||||
)}
|
||||
{option.kind === "issue" && option.issueIdentifier ? (
|
||||
<span className="flex min-w-0 items-baseline gap-1.5">
|
||||
<span className="shrink-0 font-mono text-[11px] text-muted-foreground">
|
||||
<span className="shrink-0 font-mono text-(length:--text-micro) text-muted-foreground">
|
||||
{option.issueIdentifier}
|
||||
</span>
|
||||
<span className="truncate">{issueMentionTitle(option)}</span>
|
||||
@@ -1416,27 +1416,27 @@ export const MarkdownEditor = forwardRef<MarkdownEditorRef, MarkdownEditorProps>
|
||||
</span>
|
||||
)}
|
||||
{option.kind === "issue" && (
|
||||
<span className="ml-auto text-[10px] uppercase tracking-wide text-muted-foreground">
|
||||
<span className="ml-auto text-(length:--text-nano) uppercase tracking-wide text-muted-foreground">
|
||||
Task
|
||||
</span>
|
||||
)}
|
||||
{option.kind === "project" && option.projectId && (
|
||||
<span className="ml-auto text-[10px] uppercase tracking-wide text-muted-foreground">
|
||||
<span className="ml-auto text-(length:--text-nano) uppercase tracking-wide text-muted-foreground">
|
||||
Project
|
||||
</span>
|
||||
)}
|
||||
{option.kind === "user" && (
|
||||
<span className="ml-auto text-[10px] uppercase tracking-wide text-muted-foreground">
|
||||
<span className="ml-auto text-(length:--text-nano) uppercase tracking-wide text-muted-foreground">
|
||||
User
|
||||
</span>
|
||||
)}
|
||||
{option.kind === "skill" && (
|
||||
<span className="ml-auto text-[10px] uppercase tracking-wide text-muted-foreground">
|
||||
<span className="ml-auto text-(length:--text-nano) uppercase tracking-wide text-muted-foreground">
|
||||
Skill
|
||||
</span>
|
||||
)}
|
||||
{option.kind === "routine" && (
|
||||
<span className="ml-auto text-[10px] uppercase tracking-wide text-muted-foreground">
|
||||
<span className="ml-auto text-(length:--text-nano) uppercase tracking-wide text-muted-foreground">
|
||||
Routine
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -41,7 +41,7 @@ export function MembershipAction({
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"flex w-[66px] shrink-0 justify-end",
|
||||
"flex w-(--sz-66px) shrink-0 justify-end",
|
||||
!isLeft && !compact
|
||||
? "opacity-100 sm:opacity-0 sm:transition-opacity sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"
|
||||
: "opacity-100",
|
||||
@@ -55,7 +55,7 @@ export function MembershipAction({
|
||||
aria-busy={pending ? "true" : undefined}
|
||||
disabled={pending}
|
||||
onClick={handleClick}
|
||||
className="w-[66px]"
|
||||
className="w-(--sz-66px)"
|
||||
>
|
||||
<Icon className={cn("h-3 w-3", pending && "motion-safe:animate-spin")} />
|
||||
<span>{label}</span>
|
||||
|
||||
@@ -60,7 +60,7 @@ export function MobileBottomNav({ visible }: MobileBottomNavProps) {
|
||||
return (
|
||||
<nav
|
||||
className={cn(
|
||||
"fixed bottom-0 left-0 right-0 z-30 border-t border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/85 transition-transform duration-200 ease-out md:hidden pb-[env(safe-area-inset-bottom)]",
|
||||
"fixed bottom-0 left-0 right-0 z-30 border-t border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/85 transition-transform duration-200 ease-out md:hidden pb-(--sz-safe-bottom)",
|
||||
visible ? "translate-y-0" : "translate-y-full",
|
||||
)}
|
||||
aria-label="Mobile navigation"
|
||||
@@ -76,13 +76,13 @@ export function MobileBottomNav({ visible }: MobileBottomNavProps) {
|
||||
type="button"
|
||||
onClick={item.onClick}
|
||||
className={cn(
|
||||
"relative flex min-w-0 flex-col items-center justify-center gap-1 rounded-md text-[10px] font-medium transition-colors",
|
||||
"relative flex min-w-0 flex-col items-center justify-center gap-1 rounded-md text-(length:--text-nano) font-medium transition-colors",
|
||||
active
|
||||
? "text-foreground"
|
||||
: "text-muted-foreground hover:text-foreground",
|
||||
)}
|
||||
>
|
||||
<Icon className="h-[18px] w-[18px]" />
|
||||
<Icon className="h-(--sz-18px) w-(--sz-18px)" />
|
||||
<span className="truncate">{item.label}</span>
|
||||
</button>
|
||||
);
|
||||
@@ -96,7 +96,7 @@ export function MobileBottomNav({ visible }: MobileBottomNavProps) {
|
||||
state={SIDEBAR_SCROLL_RESET_STATE}
|
||||
className={({ isActive }) =>
|
||||
cn(
|
||||
"relative flex min-w-0 flex-col items-center justify-center gap-1 rounded-md text-[10px] font-medium transition-colors",
|
||||
"relative flex min-w-0 flex-col items-center justify-center gap-1 rounded-md text-(length:--text-nano) font-medium transition-colors",
|
||||
isActive
|
||||
? "text-foreground"
|
||||
: "text-muted-foreground hover:text-foreground",
|
||||
@@ -106,9 +106,9 @@ export function MobileBottomNav({ visible }: MobileBottomNavProps) {
|
||||
{({ isActive }) => (
|
||||
<>
|
||||
<span className="relative">
|
||||
<Icon className={cn("h-[18px] w-[18px]", isActive && "stroke-[2.3]")} />
|
||||
<Icon className={cn("h-(--sz-18px) w-(--sz-18px)", isActive && "stroke-(length:--sw-2_3)")} />
|
||||
{item.badge != null && item.badge > 0 && (
|
||||
<span className="absolute -right-2 -top-2 rounded-full bg-primary px-1.5 py-0.5 text-[10px] leading-none text-primary-foreground">
|
||||
<span className="absolute -right-2 -top-2 rounded-full bg-primary px-1.5 py-0.5 text-(length:--text-nano) leading-none text-primary-foreground">
|
||||
{item.badge > 99 ? "99+" : item.badge}
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -226,7 +226,7 @@ export function NewAgentDialog() {
|
||||
<DialogContent
|
||||
showCloseButton={false}
|
||||
className={cn(
|
||||
"max-h-[min(calc(100dvh-2rem),46rem)] p-0 gap-0 overflow-hidden flex flex-col",
|
||||
"max-h-(--sz-calc-16) p-0 gap-0 overflow-hidden flex flex-col",
|
||||
mode === "invite" || mode === "prompt" ? "sm:max-w-2xl" : "sm:max-w-md",
|
||||
)}
|
||||
>
|
||||
@@ -311,13 +311,13 @@ export function NewAgentDialog() {
|
||||
}}
|
||||
>
|
||||
{opt.recommended && (
|
||||
<span className="absolute -top-1.5 right-1.5 bg-green-500 text-white text-[9px] font-semibold px-1.5 py-0.5 rounded-full leading-none">
|
||||
<span className="absolute -top-1.5 right-1.5 bg-green-500 text-white text-(length:--text-nano) font-semibold px-1.5 py-0.5 rounded-full leading-none">
|
||||
Recommended
|
||||
</span>
|
||||
)}
|
||||
<opt.icon className="h-4 w-4" />
|
||||
<span className="font-medium">{opt.label}</span>
|
||||
<span className="text-muted-foreground text-[10px]">
|
||||
<span className="text-muted-foreground text-(length:--text-nano)">
|
||||
{opt.desc}
|
||||
</span>
|
||||
</button>
|
||||
@@ -395,7 +395,7 @@ export function NewAgentDialog() {
|
||||
<Textarea
|
||||
readOnly
|
||||
value={latestAgentPrompt ?? ""}
|
||||
className="h-[24rem] resize-y font-mono text-xs"
|
||||
className="h-(--sz-24rem) resize-y font-mono text-xs"
|
||||
/>
|
||||
<Button
|
||||
size="sm"
|
||||
|
||||
@@ -168,14 +168,14 @@ export function NewGoalDialog() {
|
||||
</div>
|
||||
|
||||
{/* Description */}
|
||||
<div className="px-4 pb-2 overflow-y-auto max-h-[50vh]">
|
||||
<div className="px-4 pb-2 overflow-y-auto max-h-(--sz-50vh)">
|
||||
<MarkdownEditor
|
||||
ref={descriptionEditorRef}
|
||||
value={description}
|
||||
onChange={setDescription}
|
||||
placeholder="Add description..."
|
||||
bordered={false}
|
||||
contentClassName={cn("text-sm text-muted-foreground", expanded ? "min-h-[220px]" : "min-h-[120px]")}
|
||||
contentClassName={cn("text-sm text-muted-foreground", expanded ? "min-h-(--sz-220px)" : "min-h-(--sz-120px)")}
|
||||
imageUploadHandler={async (file) => {
|
||||
const asset = await uploadDescriptionImage.mutateAsync(file);
|
||||
return asset.contentPath;
|
||||
|
||||
@@ -1068,9 +1068,9 @@ describe("NewIssueDialog", () => {
|
||||
await flush();
|
||||
|
||||
const dialogContent = Array.from(container.querySelectorAll("div")).find((element) =>
|
||||
typeof element.className === "string" && element.className.includes("max-h-[var(--new-issue-dialog-height)]"),
|
||||
typeof element.className === "string" && element.className.includes("max-h-(--new-issue-dialog-height)"),
|
||||
);
|
||||
expect(dialogContent?.className).toContain("h-[var(--new-issue-dialog-height)]");
|
||||
expect(dialogContent?.className).toContain("h-(--new-issue-dialog-height)");
|
||||
expect(dialogContent?.className).toContain("overflow-hidden");
|
||||
expect(dialogContent?.getAttribute("style")).toContain("env(safe-area-inset-top)");
|
||||
expect(dialogContent?.getAttribute("style")).toContain("env(safe-area-inset-bottom)");
|
||||
|
||||
@@ -405,7 +405,7 @@ const IssueDescriptionEditor = memo(function IssueDescriptionEditor({
|
||||
placeholder="Add description..."
|
||||
bordered={false}
|
||||
mentions={mentions}
|
||||
contentClassName={cn("text-sm text-muted-foreground pb-12", expanded ? "min-h-[220px]" : "min-h-[120px]")}
|
||||
contentClassName={cn("text-sm text-muted-foreground pb-12", expanded ? "min-h-(--sz-220px)" : "min-h-(--sz-120px)")}
|
||||
imageUploadHandler={imageUploadHandler}
|
||||
/>
|
||||
);
|
||||
@@ -1277,9 +1277,9 @@ export function NewIssueDialog() {
|
||||
aria-describedby={undefined}
|
||||
style={{ "--new-issue-dialog-height": MOBILE_DIALOG_HEIGHT } as CSSProperties}
|
||||
className={cn(
|
||||
"flex h-[var(--new-issue-dialog-height)] max-h-[var(--new-issue-dialog-height)] flex-col gap-0 overflow-hidden p-0 sm:h-auto",
|
||||
"flex h-(--new-issue-dialog-height) max-h-(--new-issue-dialog-height) flex-col gap-0 overflow-hidden p-0 sm:h-auto",
|
||||
expanded
|
||||
? "sm:max-w-2xl sm:h-[var(--new-issue-dialog-height)]"
|
||||
? "sm:max-w-2xl sm:h-(--new-issue-dialog-height)"
|
||||
: "sm:max-w-lg"
|
||||
)}
|
||||
onKeyDown={handleKeyDown}
|
||||
@@ -1352,7 +1352,7 @@ export function NewIssueDialog() {
|
||||
>
|
||||
<span
|
||||
className={cn(
|
||||
"px-1 py-0.5 rounded text-[10px] font-semibold leading-none",
|
||||
"px-1 py-0.5 rounded text-(length:--text-nano) font-semibold leading-none",
|
||||
!c.brandColor && "bg-muted",
|
||||
)}
|
||||
style={
|
||||
@@ -1504,7 +1504,7 @@ export function NewIssueDialog() {
|
||||
<>
|
||||
<span
|
||||
className="h-3.5 w-3.5 shrink-0 rounded-sm"
|
||||
style={{ backgroundColor: currentProject.color ?? "#6366f1" }}
|
||||
style={{ backgroundColor: currentProject.color ?? "var(--project-seed)" }}
|
||||
/>
|
||||
<span className="truncate">{option.label}</span>
|
||||
</>
|
||||
@@ -1519,7 +1519,7 @@ export function NewIssueDialog() {
|
||||
<>
|
||||
<span
|
||||
className="h-3.5 w-3.5 shrink-0 rounded-sm"
|
||||
style={{ backgroundColor: project?.color ?? "#6366f1" }}
|
||||
style={{ backgroundColor: project?.color ?? "var(--project-seed)" }}
|
||||
/>
|
||||
<span className="truncate">{option.label}</span>
|
||||
</>
|
||||
@@ -1797,7 +1797,7 @@ export function NewIssueDialog() {
|
||||
<div className="px-4 py-3 space-y-2">
|
||||
<div className="space-y-1.5">
|
||||
<div className="text-xs font-medium">Execution workspace</div>
|
||||
<div className="text-[11px] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) text-muted-foreground">
|
||||
Control whether this task runs in the shared workspace, a new isolated workspace, or an existing one.
|
||||
</div>
|
||||
<select
|
||||
@@ -1827,12 +1827,12 @@ export function NewIssueDialog() {
|
||||
/>
|
||||
)}
|
||||
{executionWorkspaceMode === "reuse_existing" && selectedReusableExecutionWorkspace && (
|
||||
<div className="text-[11px] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) text-muted-foreground">
|
||||
Reusing {selectedReusableExecutionWorkspace.name} from {selectedReusableExecutionWorkspace.branchName ?? selectedReusableExecutionWorkspace.cwd ?? "existing execution workspace"}.
|
||||
</div>
|
||||
)}
|
||||
{showParentWorkspaceWarning ? (
|
||||
<div className="rounded-md border border-amber-300/60 bg-amber-50 px-2 py-1.5 text-[11px] text-amber-900 dark:border-amber-800/70 dark:bg-amber-950/30 dark:text-amber-100">
|
||||
<div className="rounded-md border border-amber-300/60 bg-amber-50 px-2 py-1.5 text-(length:--text-micro) text-amber-900 dark:border-amber-800/70 dark:bg-amber-950/30 dark:text-amber-100">
|
||||
Warning: this sub-task will no longer use the parent task workspace{parentExecutionWorkspaceLabel ? ` (${parentExecutionWorkspaceLabel})` : ""}.
|
||||
</div>
|
||||
) : null}
|
||||
@@ -1879,7 +1879,7 @@ export function NewIssueDialog() {
|
||||
))}
|
||||
</div>
|
||||
{assigneeModelLane === "cheap" && (
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
<p className="text-(length:--text-micro) text-muted-foreground">
|
||||
Sends <code>modelProfile: "cheap"</code>{" "}
|
||||
{assigneeCheapProfile?.adapterConfig && typeof (assigneeCheapProfile.adapterConfig as Record<string, unknown>).model === "string"
|
||||
? <>· adapter default <code>{String((assigneeCheapProfile.adapterConfig as Record<string, unknown>).model)}</code></>
|
||||
@@ -1889,10 +1889,10 @@ export function NewIssueDialog() {
|
||||
</p>
|
||||
)}
|
||||
{assigneeModelLane === "primary" && (
|
||||
<p className="text-[11px] text-muted-foreground">Runs on the agent's primary model.</p>
|
||||
<p className="text-(length:--text-micro) text-muted-foreground">Runs on the agent's primary model.</p>
|
||||
)}
|
||||
{assigneeModelLane === "custom" && (
|
||||
<p className="text-[11px] text-muted-foreground">Override the model and effort for this task only.</p>
|
||||
<p className="text-(length:--text-micro) text-muted-foreground">Override the model and effort for this task only.</p>
|
||||
)}
|
||||
</div>
|
||||
{assigneeModelLane === "custom" && (
|
||||
@@ -1976,12 +1976,12 @@ export function NewIssueDialog() {
|
||||
<div key={file.id} className="flex items-start justify-between gap-3 rounded-md border border-border/70 px-3 py-2">
|
||||
<div className="min-w-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="rounded-full border border-border px-2 py-0.5 font-mono text-[10px] uppercase tracking-[0.16em] text-muted-foreground">
|
||||
<span className="rounded-full border border-border px-2 py-0.5 font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
{file.documentKey}
|
||||
</span>
|
||||
<span className="truncate text-sm">{file.file.name}</span>
|
||||
</div>
|
||||
<div className="mt-1 flex items-center gap-2 text-[11px] text-muted-foreground">
|
||||
<div className="mt-1 flex items-center gap-2 text-(length:--text-micro) text-muted-foreground">
|
||||
<FileText className="h-3.5 w-3.5" />
|
||||
<span>{file.title || file.file.name}</span>
|
||||
<span>•</span>
|
||||
@@ -2015,7 +2015,7 @@ export function NewIssueDialog() {
|
||||
<Paperclip className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
||||
<span className="truncate text-sm">{file.file.name}</span>
|
||||
</div>
|
||||
<div className="mt-1 text-[11px] text-muted-foreground">
|
||||
<div className="mt-1 text-(length:--text-micro) text-muted-foreground">
|
||||
{file.file.type || "application/octet-stream"} • {formatFileSize(file.file)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -2063,7 +2063,7 @@ export function NewIssueDialog() {
|
||||
<span className="flex flex-col text-left leading-tight">
|
||||
<span>{s.label}</span>
|
||||
{s.description ? (
|
||||
<span className="text-[10px] text-muted-foreground">{s.description}</span>
|
||||
<span className="text-(length:--text-nano) text-muted-foreground">{s.description}</span>
|
||||
) : null}
|
||||
</span>
|
||||
</button>
|
||||
@@ -2187,7 +2187,7 @@ export function NewIssueDialog() {
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-44 p-1" align="start" data-testid="new-issue-more-menu">
|
||||
<div className="sm:hidden">
|
||||
<div className="px-2 py-1 text-[10px] font-medium uppercase text-muted-foreground">
|
||||
<div className="px-2 py-1 text-(length:--text-nano) font-medium uppercase text-muted-foreground">
|
||||
Priority
|
||||
</div>
|
||||
{priorities.map((p) => (
|
||||
@@ -2270,7 +2270,7 @@ export function NewIssueDialog() {
|
||||
</div>
|
||||
<Button
|
||||
size="sm"
|
||||
className="min-w-[8.5rem] disabled:opacity-100"
|
||||
className="min-w-(--sz-8_5rem) disabled:opacity-100"
|
||||
disabled={!titleHasText || createIssue.isPending}
|
||||
onClick={handleSubmit}
|
||||
aria-busy={createIssue.isPending}
|
||||
|
||||
@@ -271,7 +271,7 @@ export function NewProjectDialog() {
|
||||
placeholder="Add description..."
|
||||
bordered={false}
|
||||
mentions={mentionOptions}
|
||||
contentClassName={cn("text-sm text-muted-foreground", expanded ? "min-h-[220px]" : "min-h-[120px]")}
|
||||
contentClassName={cn("text-sm text-muted-foreground", expanded ? "min-h-(--sz-220px)" : "min-h-(--sz-120px)")}
|
||||
imageUploadHandler={async (file) => {
|
||||
const asset = await uploadDescriptionImage.mutateAsync(file);
|
||||
return asset.contentPath;
|
||||
@@ -288,7 +288,7 @@ export function NewProjectDialog() {
|
||||
<TooltipTrigger asChild>
|
||||
<HelpCircle className="h-3 w-3 text-muted-foreground/50 cursor-help" />
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" className="max-w-[240px] text-xs">
|
||||
<TooltipContent side="top" className="max-w-(--sz-240px) text-xs">
|
||||
Link a GitHub repository so agents can clone, read, and push code for this project.
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
@@ -309,7 +309,7 @@ export function NewProjectDialog() {
|
||||
<TooltipTrigger asChild>
|
||||
<HelpCircle className="h-3 w-3 text-muted-foreground/50 cursor-help" />
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" className="max-w-[240px] text-xs">
|
||||
<TooltipContent side="top" className="max-w-(--sz-240px) text-xs">
|
||||
Set an absolute path on this machine where local agents will read and write files for this project.
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
@@ -361,7 +361,7 @@ export function NewProjectDialog() {
|
||||
className="inline-flex items-center gap-1 rounded-md border border-border px-2 py-1 text-xs"
|
||||
>
|
||||
<Target className="h-3 w-3 text-muted-foreground" />
|
||||
<span className="max-w-[160px] truncate">{goal.title}</span>
|
||||
<span className="max-w-(--sz-160px) truncate">{goal.title}</span>
|
||||
<button
|
||||
className="text-muted-foreground hover:text-foreground"
|
||||
onClick={() => setGoalIds((prev) => prev.filter((id) => id !== goal.id))}
|
||||
|
||||
@@ -259,7 +259,7 @@ export function OnboardingChat({
|
||||
{/* Messages */}
|
||||
<div
|
||||
ref={scrollRef}
|
||||
className="flex-1 overflow-y-auto space-y-3 mb-3 min-h-[180px] max-h-[320px] pr-1"
|
||||
className="flex-1 overflow-y-auto space-y-3 mb-3 min-h-(--sz-180px) max-h-(--sz-320px) pr-1"
|
||||
>
|
||||
{/* CEO welcome message + chips — delayed reveal */}
|
||||
<WelcomeMessage
|
||||
@@ -290,7 +290,7 @@ export function OnboardingChat({
|
||||
<div className="flex items-center gap-1.5 mb-1">
|
||||
<span
|
||||
className={cn(
|
||||
"text-[10px] font-medium uppercase tracking-wide",
|
||||
"text-(length:--text-nano) font-medium uppercase tracking-wide",
|
||||
isAgent
|
||||
? "text-muted-foreground"
|
||||
: "text-foreground/70",
|
||||
@@ -299,7 +299,7 @@ export function OnboardingChat({
|
||||
{isAgent ? agentName : "You"}
|
||||
</span>
|
||||
{isPlan && (
|
||||
<span className="inline-flex items-center gap-0.5 text-[10px] text-green-600 dark:text-green-400 font-medium">
|
||||
<span className="inline-flex items-center gap-0.5 text-(length:--text-nano) text-green-600 dark:text-green-400 font-medium">
|
||||
<CheckCircle2 className="h-3 w-3" />
|
||||
Hiring plan detected
|
||||
</span>
|
||||
@@ -323,8 +323,8 @@ export function OnboardingChat({
|
||||
{hasActiveRun ? (
|
||||
<>
|
||||
<span className="relative flex h-2.5 w-2.5 shrink-0">
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-cyan-400 opacity-75" />
|
||||
<span className="relative inline-flex rounded-full h-2.5 w-2.5 bg-cyan-500" />
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" />
|
||||
<span className="relative inline-flex rounded-full h-2.5 w-2.5 bg-blue-500" />
|
||||
</span>
|
||||
{getRunStatusMessage(activeRun.status, agentName, elapsed)}
|
||||
</>
|
||||
@@ -335,7 +335,7 @@ export function OnboardingChat({
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<span className="text-[11px] text-muted-foreground/60 tabular-nums shrink-0">
|
||||
<span className="text-(length:--text-micro) text-muted-foreground/60 tabular-nums shrink-0">
|
||||
{elapsedStr}
|
||||
</span>
|
||||
</div>
|
||||
@@ -352,7 +352,7 @@ export function OnboardingChat({
|
||||
<p className="text-sm font-medium">
|
||||
{agentName} has prepared a hiring plan
|
||||
</p>
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
<p className="text-(length:--text-micro) text-muted-foreground">
|
||||
Review it, make edits, then approve.
|
||||
</p>
|
||||
</div>
|
||||
@@ -427,7 +427,7 @@ function WelcomeMessage({
|
||||
{showMessage && (
|
||||
<div className="rounded-md px-3 py-2 text-sm bg-muted/50 border border-border mr-8 animate-in fade-in duration-300">
|
||||
<div className="flex items-center gap-1.5 mb-1">
|
||||
<span className="text-[10px] font-medium uppercase tracking-wide text-muted-foreground">
|
||||
<span className="text-(length:--text-nano) font-medium uppercase tracking-wide text-muted-foreground">
|
||||
{agentName}
|
||||
</span>
|
||||
</div>
|
||||
@@ -468,8 +468,8 @@ function WelcomeMessage({
|
||||
{!showMessage && (
|
||||
<div className="flex items-center gap-2 text-sm text-muted-foreground px-3 py-2">
|
||||
<span className="relative flex h-2.5 w-2.5 shrink-0">
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-cyan-400 opacity-75" />
|
||||
<span className="relative inline-flex rounded-full h-2.5 w-2.5 bg-cyan-500" />
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" />
|
||||
<span className="relative inline-flex rounded-full h-2.5 w-2.5 bg-blue-500" />
|
||||
</span>
|
||||
{phase === "waking"
|
||||
? `${agentName} is waking up...`
|
||||
|
||||
@@ -783,7 +783,7 @@ export function OnboardingWizard() {
|
||||
{step !== 0 && (
|
||||
<div
|
||||
className={cn(
|
||||
"w-full flex flex-col overflow-y-auto transition-[width] duration-500 ease-in-out",
|
||||
"w-full flex flex-col overflow-y-auto transition-(--tp-width) duration-500 ease-in-out",
|
||||
step === 1 || step === 2 ? "md:w-1/2" : "md:w-full"
|
||||
)}
|
||||
>
|
||||
@@ -859,7 +859,7 @@ export function OnboardingWizard() {
|
||||
glow="blue"
|
||||
size="md"
|
||||
/>
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
<p className="text-(length:--text-micro) text-muted-foreground">
|
||||
{step === 3 ? (
|
||||
"an empty slot for an agent"
|
||||
) : step === 4 ? (
|
||||
@@ -901,7 +901,7 @@ export function OnboardingWizard() {
|
||||
<div className="group">
|
||||
<label className="text-xs text-muted-foreground mb-1 block">What are your current workflows?</label>
|
||||
<textarea
|
||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-[60px]"
|
||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-(--sz-60px)"
|
||||
placeholder="e.g. Manual content creation, spreadsheet tracking, email outreach"
|
||||
value={growWorkflows}
|
||||
onChange={(e) => setGrowWorkflows(e.target.value)}
|
||||
@@ -910,7 +910,7 @@ export function OnboardingWizard() {
|
||||
<div className="group">
|
||||
<label className="text-xs text-muted-foreground mb-1 block">What pain points would you solve with AI?</label>
|
||||
<textarea
|
||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-[60px]"
|
||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-(--sz-60px)"
|
||||
placeholder="e.g. Can't produce content fast enough, no time for social media"
|
||||
value={growPainPoints}
|
||||
onChange={(e) => setGrowPainPoints(e.target.value)}
|
||||
@@ -945,7 +945,7 @@ export function OnboardingWizard() {
|
||||
<div className="group">
|
||||
<label className="text-xs text-foreground mb-1 block">Generated mission — edit however you like:</label>
|
||||
<textarea
|
||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-[60px]"
|
||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-(--sz-60px)"
|
||||
value={companyGoal}
|
||||
onChange={(e) => setCompanyGoal(e.target.value)}
|
||||
/>
|
||||
@@ -954,7 +954,7 @@ export function OnboardingWizard() {
|
||||
</>
|
||||
)}
|
||||
<button
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground transition-colors"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground transition-colors"
|
||||
onClick={() => { setOnboardingPath(null); setStep(0); }}
|
||||
>
|
||||
← Back to start
|
||||
@@ -1003,7 +1003,7 @@ export function OnboardingWizard() {
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground transition-colors"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground transition-colors"
|
||||
onClick={() => { setOnboardingPath(null); setStep(0); }}
|
||||
>
|
||||
← Back to start
|
||||
@@ -1043,7 +1043,7 @@ export function OnboardingWizard() {
|
||||
>
|
||||
<Sparkles className="h-4 w-4" />
|
||||
<span className="font-medium">I know my mission</span>
|
||||
<span className="text-muted-foreground text-[10px]">
|
||||
<span className="text-muted-foreground text-(length:--text-nano)">
|
||||
Type it directly
|
||||
</span>
|
||||
</button>
|
||||
@@ -1058,7 +1058,7 @@ export function OnboardingWizard() {
|
||||
>
|
||||
<ListTodo className="h-4 w-4" />
|
||||
<span className="font-medium">Help me figure it out</span>
|
||||
<span className="text-muted-foreground text-[10px]">
|
||||
<span className="text-muted-foreground text-(length:--text-nano)">
|
||||
Answer a few questions
|
||||
</span>
|
||||
</button>
|
||||
@@ -1080,7 +1080,7 @@ export function OnboardingWizard() {
|
||||
Mission
|
||||
</label>
|
||||
<textarea
|
||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-[60px]"
|
||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-(--sz-60px)"
|
||||
placeholder="What is your team trying to achieve?"
|
||||
value={companyGoal}
|
||||
onChange={(e) => setCompanyGoal(e.target.value)}
|
||||
@@ -1093,7 +1093,7 @@ export function OnboardingWizard() {
|
||||
<button
|
||||
key={chip}
|
||||
className={cn(
|
||||
"rounded-full border px-2.5 py-1 text-[11px] transition-colors",
|
||||
"rounded-full border px-2.5 py-1 text-(length:--text-micro) transition-colors",
|
||||
companyGoal === chip
|
||||
? "border-foreground bg-accent text-foreground"
|
||||
: "border-border text-muted-foreground hover:text-foreground hover:border-foreground/50"
|
||||
@@ -1178,14 +1178,14 @@ export function OnboardingWizard() {
|
||||
Here's your draft mission — edit it however you like:
|
||||
</label>
|
||||
<textarea
|
||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-[80px]"
|
||||
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-(--sz-80px)"
|
||||
value={companyGoal}
|
||||
onChange={(e) => setCompanyGoal(e.target.value)}
|
||||
autoFocus
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground transition-colors"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground transition-colors"
|
||||
onClick={() => { setMissionConfirmed(false); setCompanyGoal(""); }}
|
||||
>
|
||||
← Back to questions
|
||||
@@ -1195,13 +1195,13 @@ export function OnboardingWizard() {
|
||||
|
||||
{/* Confirm mission note */}
|
||||
{companyGoal.trim() && (
|
||||
<p className="text-[11px] text-muted-foreground italic">
|
||||
<p className="text-(length:--text-micro) text-muted-foreground italic">
|
||||
You can always change your mission later in settings.
|
||||
</p>
|
||||
)}
|
||||
|
||||
<button
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground transition-colors"
|
||||
className="text-(length:--text-micro) text-muted-foreground hover:text-foreground transition-colors"
|
||||
onClick={() => setStep(1)}
|
||||
>
|
||||
← Change company name
|
||||
@@ -1265,13 +1265,13 @@ export function OnboardingWizard() {
|
||||
}}
|
||||
>
|
||||
{opt.recommended && (
|
||||
<span className="absolute -top-1.5 right-1.5 bg-green-500 text-white text-[9px] font-semibold px-1.5 py-0.5 rounded-full leading-none">
|
||||
<span className="absolute -top-1.5 right-1.5 bg-green-500 text-white text-(length:--text-nano) font-semibold px-1.5 py-0.5 rounded-full leading-none">
|
||||
Recommended
|
||||
</span>
|
||||
)}
|
||||
<opt.icon className="h-4 w-4" />
|
||||
<span className="font-medium">{opt.label}</span>
|
||||
<span className="text-muted-foreground text-[10px]">
|
||||
<span className="text-muted-foreground text-(length:--text-nano)">
|
||||
{opt.description}
|
||||
</span>
|
||||
</button>
|
||||
@@ -1326,7 +1326,7 @@ export function OnboardingWizard() {
|
||||
>
|
||||
<opt.icon className="h-4 w-4" />
|
||||
<span className="font-medium">{opt.label}</span>
|
||||
<span className="text-muted-foreground text-[10px]">
|
||||
<span className="text-muted-foreground text-(length:--text-nano)">
|
||||
{opt.comingSoon
|
||||
? opt.disabledLabel ?? "Coming soon"
|
||||
: opt.description}
|
||||
@@ -1369,7 +1369,7 @@ export function OnboardingWizard() {
|
||||
</button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent
|
||||
className="w-[var(--radix-popover-trigger-width)] p-1"
|
||||
className="w-(--radix-popover-trigger-width) p-1"
|
||||
align="start"
|
||||
>
|
||||
<input
|
||||
@@ -1393,14 +1393,14 @@ export function OnboardingWizard() {
|
||||
Default
|
||||
</button>
|
||||
)}
|
||||
<div className="max-h-[240px] overflow-y-auto">
|
||||
<div className="max-h-(--sz-240px) overflow-y-auto">
|
||||
{groupedModels.map((group) => (
|
||||
<div
|
||||
key={group.provider}
|
||||
className="mb-1 last:mb-0"
|
||||
>
|
||||
{adapterType === "opencode_local" && (
|
||||
<div className="px-2 py-1 text-[10px] uppercase tracking-wide text-muted-foreground">
|
||||
<div className="px-2 py-1 text-(length:--text-nano) uppercase tracking-wide text-muted-foreground">
|
||||
{group.provider} ({group.entries.length})
|
||||
</div>
|
||||
)}
|
||||
@@ -1447,7 +1447,7 @@ export function OnboardingWizard() {
|
||||
<p className="text-xs font-medium">
|
||||
Adapter environment check
|
||||
</p>
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
<p className="text-(length:--text-micro) text-muted-foreground">
|
||||
Runs a live probe that asks the adapter CLI to
|
||||
respond with hello.
|
||||
</p>
|
||||
@@ -1464,7 +1464,7 @@ export function OnboardingWizard() {
|
||||
</div>
|
||||
|
||||
{adapterEnvError && (
|
||||
<div className="rounded-md border border-destructive/30 bg-destructive/10 px-2.5 py-2 text-[11px] text-destructive">
|
||||
<div className="rounded-md border border-destructive/30 bg-destructive/10 px-2.5 py-2 text-(length:--text-micro) text-destructive">
|
||||
{adapterEnvError}
|
||||
</div>
|
||||
)}
|
||||
@@ -1481,7 +1481,7 @@ export function OnboardingWizard() {
|
||||
|
||||
{shouldSuggestUnsetAnthropicApiKey && (
|
||||
<div className="rounded-md border border-amber-300/60 bg-amber-50/40 px-2.5 py-2 space-y-2">
|
||||
<p className="text-[11px] text-amber-900/90 leading-relaxed">
|
||||
<p className="text-(length:--text-micro) text-amber-900/90 leading-relaxed">
|
||||
Claude failed while{" "}
|
||||
<span className="font-mono">ANTHROPIC_API_KEY</span>{" "}
|
||||
is set. You can clear it in this adapter config
|
||||
@@ -1504,7 +1504,7 @@ export function OnboardingWizard() {
|
||||
)}
|
||||
|
||||
{adapterEnvResult && adapterEnvResult.status === "fail" && (
|
||||
<div className="rounded-md border border-border/70 bg-muted/20 px-2.5 py-2 text-[11px] space-y-1.5">
|
||||
<div className="rounded-md border border-border/70 bg-muted/20 px-2.5 py-2 text-(length:--text-micro) space-y-1.5">
|
||||
<p className="font-medium">Manual debug</p>
|
||||
<p className="text-muted-foreground font-mono break-all">
|
||||
{adapterType === "cursor"
|
||||
@@ -1719,7 +1719,7 @@ export function OnboardingWizard() {
|
||||
name + mission steps) */}
|
||||
<div
|
||||
className={cn(
|
||||
"hidden md:block overflow-hidden bg-[#1d1d1d] transition-[width,opacity] duration-500 ease-in-out",
|
||||
"hidden md:block overflow-hidden bg-(--hex-1d1d1d) transition-(--tp-width-opacity) duration-500 ease-in-out",
|
||||
step === 1 || step === 2 ? "w-1/2 opacity-100" : "w-0 opacity-0"
|
||||
)}
|
||||
>
|
||||
@@ -1750,7 +1750,7 @@ function AdapterEnvironmentResult({
|
||||
: "text-red-700 dark:text-red-300 border-red-300 dark:border-red-500/40 bg-red-50 dark:bg-red-500/10";
|
||||
|
||||
return (
|
||||
<div className={`rounded-md border px-2.5 py-2 text-[11px] ${statusClass}`}>
|
||||
<div className={`rounded-md border px-2.5 py-2 text-(length:--text-micro) ${statusClass}`}>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<span className="font-medium">{statusLabel}</span>
|
||||
<span className="opacity-80">
|
||||
|
||||
@@ -99,7 +99,7 @@ export function PageSkeleton({ variant = "list" }: PageSkeletonProps) {
|
||||
if (variant === "org-chart") {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<Skeleton className="h-[calc(100vh-4rem)] w-full rounded-lg border border-border" />
|
||||
<Skeleton className="h-(--sz-calc-17) w-full rounded-lg border border-border" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ export function PipelineItemBodyDocument({
|
||||
[conversationIssueId, doc?.latestRevisionId, latestBody, onStartConversation, pushToast, saveMutation],
|
||||
);
|
||||
|
||||
const bodyContentClassName = "paperclip-edit-in-place-content min-h-[220px] text-[15px] leading-7";
|
||||
const bodyContentClassName = "paperclip-edit-in-place-content min-h-(--sz-220px) text-sm leading-7";
|
||||
|
||||
const renderReadOnlyBody = (body: string) => (
|
||||
<FoldCurtain className="max-w-3xl">
|
||||
@@ -268,7 +268,7 @@ export function PipelineItemBodyDocument({
|
||||
onChange={setDraftBody}
|
||||
placeholder="Write the item body in Markdown…"
|
||||
bordered={false}
|
||||
className="min-h-[220px] bg-transparent"
|
||||
className="min-h-(--sz-220px) bg-transparent"
|
||||
contentClassName={bodyContentClassName}
|
||||
mentions={mentions}
|
||||
imageUploadHandler={imageUploadHandler}
|
||||
@@ -276,7 +276,7 @@ export function PipelineItemBodyDocument({
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-2 flex flex-wrap items-center justify-between gap-2">
|
||||
<span className="text-[11px] text-muted-foreground">
|
||||
<span className="text-(length:--text-micro) text-muted-foreground">
|
||||
Saving creates rev {(doc?.latestRevisionNumber ?? 0) + 1} · ⌘↵ to save · Esc to cancel
|
||||
</span>
|
||||
<div className="flex items-center gap-2">
|
||||
@@ -297,7 +297,7 @@ export function PipelineItemBodyDocument({
|
||||
<div className="rounded-md border border-amber-500/30 bg-amber-500/5 px-3 py-3">
|
||||
<div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div className="space-y-1">
|
||||
<p className="text-sm font-medium text-amber-200">
|
||||
<p className="text-sm font-medium text-amber-800 dark:text-amber-200">
|
||||
Viewing revision {selectedHistoricalRevision.revisionNumber}
|
||||
</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
@@ -360,7 +360,7 @@ export function PipelineItemBodyDocument({
|
||||
className="relative min-w-0"
|
||||
data-testid="pipeline-item-body-unlinked"
|
||||
>
|
||||
<div className="relative z-[1]">{renderReadOnlyBody(displayedBody)}</div>
|
||||
<div className="relative z-(--z-1)">{renderReadOnlyBody(displayedBody)}</div>
|
||||
<DocumentAnnotationLayer
|
||||
containerRef={containerRef}
|
||||
markdown={displayedBody}
|
||||
@@ -415,7 +415,7 @@ export function PipelineItemBodyDocument({
|
||||
/>
|
||||
) : null}
|
||||
actionsSlot={editing ? (
|
||||
<span className="text-[11px] font-medium text-amber-300">● Editing · unsaved</span>
|
||||
<span className="text-(length:--text-micro) font-medium text-amber-700 dark:text-amber-300">● Editing · unsaved</span>
|
||||
) : (
|
||||
<Button variant="ghost" size="sm" className="h-auto gap-1.5 px-2 py-1 text-xs" onClick={beginEdit}>
|
||||
<FilePenLine className="h-3.5 w-3.5" />
|
||||
|
||||
@@ -113,7 +113,7 @@ export function PipelineStageHistoryPanel({
|
||||
<p className="text-sm font-medium">
|
||||
Revision {revision.revisionNumber}
|
||||
{isCurrent ? (
|
||||
<span className="ml-2 rounded-full bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground">
|
||||
<span className="ml-2 rounded-full bg-muted px-2 py-0.5 text-(length:--text-micro) font-medium text-muted-foreground">
|
||||
Current
|
||||
</span>
|
||||
) : null}
|
||||
|
||||
@@ -46,7 +46,7 @@ export function ProductivityReviewBadge({
|
||||
<Link
|
||||
to={reviewPath}
|
||||
className={cn(
|
||||
"inline-flex items-center gap-1 rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-700 dark:text-amber-300 shrink-0 hover:bg-amber-500/20 transition-colors",
|
||||
"inline-flex items-center gap-1 rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:text-amber-300 shrink-0 hover:bg-amber-500/20 transition-colors",
|
||||
className,
|
||||
)}
|
||||
aria-label={`Under review · productivity review ${reviewIdentifier} (${label})`}
|
||||
|
||||
@@ -59,7 +59,7 @@ export type ProjectConfigFieldKey =
|
||||
function SaveIndicator({ state }: { state: ProjectFieldSaveState }) {
|
||||
if (state === "saving") {
|
||||
return (
|
||||
<span className="inline-flex items-center gap-1 text-[11px] text-muted-foreground">
|
||||
<span className="inline-flex items-center gap-1 text-(length:--text-micro) text-muted-foreground">
|
||||
<Loader2 className="h-3 w-3 animate-spin" />
|
||||
Saving
|
||||
</span>
|
||||
@@ -67,7 +67,7 @@ function SaveIndicator({ state }: { state: ProjectFieldSaveState }) {
|
||||
}
|
||||
if (state === "saved") {
|
||||
return (
|
||||
<span className="inline-flex items-center gap-1 text-[11px] text-green-600 dark:text-green-400">
|
||||
<span className="inline-flex items-center gap-1 text-(length:--text-micro) text-green-600 dark:text-green-400">
|
||||
<Check className="h-3 w-3" />
|
||||
Saved
|
||||
</span>
|
||||
@@ -75,7 +75,7 @@ function SaveIndicator({ state }: { state: ProjectFieldSaveState }) {
|
||||
}
|
||||
if (state === "error") {
|
||||
return (
|
||||
<span className="inline-flex items-center gap-1 text-[11px] text-destructive">
|
||||
<span className="inline-flex items-center gap-1 text-(length:--text-micro) text-destructive">
|
||||
<AlertCircle className="h-3 w-3" />
|
||||
Failed
|
||||
</span>
|
||||
@@ -641,7 +641,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
}}
|
||||
onChange={(env) => commitField("env", { env: env ?? null })}
|
||||
/>
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
<p className="text-(length:--text-micro) text-muted-foreground">
|
||||
Applied to all runs for tasks in this project. Project values override agent env on key conflicts.
|
||||
</p>
|
||||
</div>
|
||||
@@ -669,7 +669,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
<TooltipTrigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex h-4 w-4 items-center justify-center rounded-full border border-border text-[10px] text-muted-foreground hover:text-foreground"
|
||||
className="inline-flex h-4 w-4 items-center justify-center rounded-full border border-border text-(length:--text-nano) text-muted-foreground hover:text-foreground"
|
||||
aria-label="Codebase help"
|
||||
>
|
||||
?
|
||||
@@ -682,7 +682,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
</div>
|
||||
<div className="space-y-2 rounded-md border border-border/70 p-3">
|
||||
<div className="space-y-1">
|
||||
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">Repo</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-wide text-muted-foreground">Repo</div>
|
||||
{codebase.repoUrl ? (
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
{isSafeExternalUrl(codebase.repoUrl) ? (
|
||||
@@ -745,14 +745,14 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
</div>
|
||||
|
||||
<div className="space-y-1">
|
||||
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">Local folder</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-wide text-muted-foreground">Local folder</div>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<div className="min-w-0 space-y-1">
|
||||
<div className="min-w-0 break-all font-mono text-xs text-muted-foreground">
|
||||
{codebase.effectiveLocalFolder}
|
||||
</div>
|
||||
{codebase.origin === "managed_checkout" && (
|
||||
<div className="text-[11px] text-muted-foreground">Paperclip-managed folder.</div>
|
||||
<div className="text-(length:--text-micro) text-muted-foreground">Paperclip-managed folder.</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-1">
|
||||
@@ -783,7 +783,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
</div>
|
||||
|
||||
{hasAdditionalLegacyWorkspaces && (
|
||||
<div className="text-[11px] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) text-muted-foreground">
|
||||
Additional legacy workspace records exist on this project. Paperclip is using the primary workspace as the codebase view.
|
||||
</div>
|
||||
)}
|
||||
@@ -797,10 +797,10 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
>
|
||||
<div className="min-w-0 space-y-0.5">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-[11px] font-medium">{service.serviceName}</span>
|
||||
<span className="text-(length:--text-micro) font-medium">{service.serviceName}</span>
|
||||
<span
|
||||
className={cn(
|
||||
"rounded-full px-1.5 py-0.5 text-[10px] uppercase tracking-wide",
|
||||
"rounded-full px-1.5 py-0.5 text-(length:--text-nano) uppercase tracking-wide",
|
||||
service.status === "running"
|
||||
? "bg-green-500/15 text-green-700 dark:text-green-300"
|
||||
: service.status === "failed"
|
||||
@@ -811,7 +811,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
{service.status}
|
||||
</span>
|
||||
</div>
|
||||
<div className="text-[11px] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) text-muted-foreground">
|
||||
{service.url ? (
|
||||
<a
|
||||
href={service.url}
|
||||
@@ -826,7 +826,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-[10px] text-muted-foreground whitespace-nowrap">
|
||||
<div className="text-(length:--text-nano) text-muted-foreground whitespace-nowrap">
|
||||
{service.lifecycle}
|
||||
</div>
|
||||
</div>
|
||||
@@ -928,7 +928,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
<TooltipTrigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex h-4 w-4 items-center justify-center rounded-full border border-border text-[10px] text-muted-foreground hover:text-foreground"
|
||||
className="inline-flex h-4 w-4 items-center justify-center rounded-full border border-border text-(length:--text-nano) text-muted-foreground hover:text-foreground"
|
||||
aria-label="Execution workspaces help"
|
||||
>
|
||||
?
|
||||
@@ -974,7 +974,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
<span>New tasks default to isolated checkout</span>
|
||||
<SaveIndicator state={fieldState("execution_workspace_default_mode")} />
|
||||
</div>
|
||||
<div className="text-[11px] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) text-muted-foreground">
|
||||
If disabled, new tasks stay on the project's primary checkout unless someone opts in.
|
||||
</div>
|
||||
</div>
|
||||
@@ -1158,7 +1158,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa
|
||||
placeholder="bash ./scripts/teardown-worktree.sh"
|
||||
/>
|
||||
</div>
|
||||
<p className="text-[11px] text-muted-foreground">
|
||||
<p className="text-(length:--text-micro) text-muted-foreground">
|
||||
Provision runs inside the derived worktree before agent execution. Teardown is stored here for
|
||||
future cleanup flows.
|
||||
</p>
|
||||
|
||||
@@ -59,7 +59,7 @@ export function ProjectWorkspaceSummaryCard({
|
||||
<div className="flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div className="min-w-0 space-y-2">
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<span className="inline-flex items-center rounded-full border border-border bg-background px-2.5 py-1 text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground">
|
||||
<span className="inline-flex items-center rounded-full border border-border bg-background px-2.5 py-1 text-(length:--text-micro) font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
{workspaceKindLabel(summary.kind)}
|
||||
</span>
|
||||
<span className="inline-flex items-center rounded-full border border-border/70 bg-background px-2.5 py-1 text-xs text-muted-foreground">
|
||||
@@ -149,7 +149,7 @@ export function ProjectWorkspaceSummaryCard({
|
||||
<div className="flex items-start gap-2">
|
||||
<GitBranch className="mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="text-[11px] uppercase tracking-[0.14em] text-muted-foreground">Branch</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Branch</div>
|
||||
<div className="flex items-start gap-2">
|
||||
<CopyText
|
||||
text={summary.branchName}
|
||||
@@ -176,7 +176,7 @@ export function ProjectWorkspaceSummaryCard({
|
||||
<div className="flex items-start gap-2">
|
||||
<FolderOpen className="mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="text-[11px] uppercase tracking-[0.14em] text-muted-foreground">Path</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Path</div>
|
||||
<div className="flex items-start gap-2">
|
||||
<CopyText
|
||||
text={summary.cwd}
|
||||
@@ -204,7 +204,7 @@ export function ProjectWorkspaceSummaryCard({
|
||||
<div className="flex items-start gap-2">
|
||||
<ExternalLink className="mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
||||
<div className="min-w-0">
|
||||
<div className="text-[11px] uppercase tracking-[0.14em] text-muted-foreground">Service</div>
|
||||
<div className="text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Service</div>
|
||||
<a
|
||||
href={summary.primaryServiceUrl}
|
||||
target="_blank"
|
||||
@@ -226,7 +226,7 @@ export function ProjectWorkspaceSummaryCard({
|
||||
|
||||
{summary.issues.length > 0 ? (
|
||||
<div className="space-y-2">
|
||||
<div className="text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground">
|
||||
<div className="text-(length:--text-micro) font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Linked tasks
|
||||
</div>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
|
||||
@@ -76,7 +76,7 @@ export function ProjectWorkspacesContent({
|
||||
</div>
|
||||
{cleanupFailedSummaries.length > 0 ? (
|
||||
<div className="space-y-2">
|
||||
<div className="text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<div className="text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Cleanup attention needed
|
||||
</div>
|
||||
<div className="space-y-3">
|
||||
|
||||
@@ -10,10 +10,10 @@ export function PropertiesPanel() {
|
||||
|
||||
return (
|
||||
<aside
|
||||
className="hidden md:flex border-l border-border bg-card flex-col shrink-0 overflow-hidden transition-[width,opacity] duration-200 ease-in-out h-full"
|
||||
className="hidden md:flex border-l border-border bg-card flex-col shrink-0 overflow-hidden transition-(--tp-width-opacity) duration-200 ease-in-out h-full"
|
||||
style={{ width: panelVisible ? 320 : 0, opacity: panelVisible ? 1 : 0 }}
|
||||
>
|
||||
<div className="w-80 flex-1 flex flex-col min-w-[320px] min-h-0">
|
||||
<div className="w-80 flex-1 flex flex-col min-w-(--sz-320px) min-h-0">
|
||||
<div className="flex items-center justify-between px-4 py-2 border-b border-border">
|
||||
<span className="text-sm font-medium">Properties</span>
|
||||
<Button variant="ghost" size="icon-xs" onClick={() => setPanelVisible(false)}>
|
||||
|
||||
@@ -205,7 +205,7 @@ export function ProviderQuotaCard({
|
||||
</div>
|
||||
<div className="h-2 w-full border border-border overflow-hidden">
|
||||
<div
|
||||
className="h-full bg-primary/60 transition-[width] duration-150"
|
||||
className="h-full bg-primary/60 transition-(--tp-width) duration-150"
|
||||
style={{ width: `${barPct}%` }}
|
||||
/>
|
||||
</div>
|
||||
@@ -242,7 +242,7 @@ export function ProviderQuotaCard({
|
||||
<>
|
||||
<div className="h-1.5 w-full border border-border overflow-hidden">
|
||||
<div
|
||||
className="h-full bg-primary/60 transition-[width] duration-150"
|
||||
className="h-full bg-primary/60 transition-(--tp-width) duration-150"
|
||||
style={{ width: `${subSharePct}%` }}
|
||||
/>
|
||||
</div>
|
||||
@@ -272,7 +272,7 @@ export function ProviderQuotaCard({
|
||||
<span className="text-xs text-muted-foreground truncate font-mono block">
|
||||
{row.model}
|
||||
</span>
|
||||
<span className="text-[11px] text-muted-foreground truncate block">
|
||||
<span className="text-(length:--text-micro) text-muted-foreground truncate block">
|
||||
{providerDisplayName(row.biller)} · {billingTypeDisplayName(row.billingType)}
|
||||
</span>
|
||||
</div>
|
||||
@@ -286,13 +286,13 @@ export function ProviderQuotaCard({
|
||||
{/* token share bar */}
|
||||
<div className="relative h-2 w-full border border-border overflow-hidden">
|
||||
<div
|
||||
className="absolute inset-y-0 left-0 bg-primary/60 transition-[width] duration-150"
|
||||
className="absolute inset-y-0 left-0 bg-primary/60 transition-(--tp-width) duration-150"
|
||||
style={{ width: `${tokenPct}%` }}
|
||||
title={`${Math.round(tokenPct)}% of provider tokens`}
|
||||
/>
|
||||
{/* cost share overlay — narrower, opaque, shows relative cost weight */}
|
||||
<div
|
||||
className="absolute inset-y-0 left-0 bg-primary/85 transition-[width] duration-150"
|
||||
className="absolute inset-y-0 left-0 bg-primary/85 transition-(--tp-width) duration-150"
|
||||
style={{ width: `${costPct}%` }}
|
||||
title={`${Math.round(costPct)}% of provider cost`}
|
||||
/>
|
||||
@@ -314,7 +314,7 @@ export function ProviderQuotaCard({
|
||||
Subscription quota
|
||||
</p>
|
||||
{quotaSource && !isClaudeQuotaPanel && !isCodexQuotaPanel ? (
|
||||
<span className="text-[10px] uppercase tracking-[0.16em] text-muted-foreground">
|
||||
<span className="text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
{quotaSourceDisplayName(quotaSource)}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -338,10 +338,10 @@ export function ProviderQuotaCard({
|
||||
qw.usedPercent == null
|
||||
? null
|
||||
: qw.usedPercent >= 90
|
||||
? "bg-red-400"
|
||||
? "bg-(--status-task-blocked)"
|
||||
: qw.usedPercent >= 70
|
||||
? "bg-yellow-400"
|
||||
: "bg-green-400";
|
||||
? "bg-(--status-task-todo)"
|
||||
: "bg-(--status-task-done)";
|
||||
return (
|
||||
<div key={qw.label} className="space-y-1">
|
||||
<div className="flex items-center justify-between gap-2 text-xs">
|
||||
@@ -356,7 +356,7 @@ export function ProviderQuotaCard({
|
||||
{qw.usedPercent != null && fillColor != null && (
|
||||
<div className="h-2 w-full border border-border overflow-hidden">
|
||||
<div
|
||||
className={`h-full transition-[width] duration-150 ${fillColor}`}
|
||||
className={`h-full transition-(--tp-width) duration-150 ${fillColor}`}
|
||||
style={{ width: `${qw.usedPercent}%` }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -12,9 +12,9 @@ interface QuotaBarProps {
|
||||
}
|
||||
|
||||
function fillColor(pct: number): string {
|
||||
if (pct > 90) return "bg-red-400";
|
||||
if (pct > 70) return "bg-yellow-400";
|
||||
return "bg-green-400";
|
||||
if (pct > 90) return "bg-(--status-task-blocked)";
|
||||
if (pct > 70) return "bg-(--status-task-todo)";
|
||||
return "bg-(--status-task-done)";
|
||||
}
|
||||
|
||||
export function QuotaBar({
|
||||
@@ -47,7 +47,7 @@ export function QuotaBar({
|
||||
{/* fill */}
|
||||
<div
|
||||
className={cn(
|
||||
"absolute inset-y-0 left-0 transition-[width,background-color] duration-150",
|
||||
"absolute inset-y-0 left-0 transition-(--tp-width-background-color) duration-150",
|
||||
fillColor(clampedPct),
|
||||
)}
|
||||
style={{ width: `${clampedPct}%` }}
|
||||
@@ -55,7 +55,7 @@ export function QuotaBar({
|
||||
{/* deficit notch — 2px wide, sits at the fill tip */}
|
||||
{showDeficitNotch && clampedPct > 0 && (
|
||||
<div
|
||||
className="absolute inset-y-0 w-[2px] bg-destructive z-10"
|
||||
className="absolute inset-y-0 w-(--sz-2px) bg-destructive z-10"
|
||||
style={{ left: `${notchLeft}%` }}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -57,7 +57,7 @@ export function ReusableExecutionWorkspaceSelect<TWorkspace extends ReusableExec
|
||||
renderOption={(option, { selected }) => (
|
||||
<span className="flex min-w-0 flex-col">
|
||||
<span className={cn("truncate", selected && "font-medium")}>{option.label}</span>
|
||||
<span className="truncate text-[11px] text-muted-foreground">
|
||||
<span className="truncate text-(length:--text-micro) text-muted-foreground">
|
||||
{option.workspace.status ? `${option.workspace.status} - ` : ""}
|
||||
{option.description}
|
||||
</span>
|
||||
|
||||
@@ -184,7 +184,7 @@ export function RoutineHistoryTab({
|
||||
|
||||
if (revisionsQuery.isLoading) {
|
||||
return (
|
||||
<div className="grid gap-5 md:grid-cols-[300px_minmax(0,1fr)]">
|
||||
<div className="grid gap-5 md:grid-cols-(--gtc-9)">
|
||||
<div className="space-y-2">
|
||||
{Array.from({ length: 5 }).map((_, idx) => (
|
||||
<Skeleton key={idx} className="h-10 w-full" />
|
||||
@@ -216,7 +216,7 @@ export function RoutineHistoryTab({
|
||||
const onlyBootstrapRevision = revisions.length <= 1;
|
||||
|
||||
return (
|
||||
<div className="grid gap-5 md:grid-cols-[300px_minmax(0,1fr)]">
|
||||
<div className="grid gap-5 md:grid-cols-(--gtc-9)">
|
||||
<RevisionList
|
||||
revisions={visibleRevisions}
|
||||
latestRevisionId={routine.latestRevisionId}
|
||||
@@ -335,7 +335,7 @@ function HistoricalPreviewBanner({
|
||||
<div className="rounded-md border border-amber-500/30 bg-amber-500/5 px-4 py-3">
|
||||
<div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div className="space-y-1">
|
||||
<p className="text-sm font-medium text-amber-200">
|
||||
<p className="text-sm font-medium text-amber-800 dark:text-amber-200">
|
||||
Viewing revision {revisionNumber} (read-only)
|
||||
</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
@@ -374,7 +374,7 @@ function ConflictBanner({
|
||||
<div className="rounded-md border border-amber-500/30 bg-amber-500/5 px-4 py-3">
|
||||
<div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div className="space-y-1">
|
||||
<p className="text-sm font-medium text-amber-200">Unsaved routine edits</p>
|
||||
<p className="text-sm font-medium text-amber-800 dark:text-amber-200">Unsaved routine edits</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
You changed {fieldsText} but haven't saved yet. Save or discard before previewing or
|
||||
restoring an older revision.
|
||||
@@ -427,10 +427,10 @@ function RevisionList({
|
||||
return (
|
||||
<aside className="space-y-1">
|
||||
<header className="flex items-center justify-between pb-2">
|
||||
<p className="text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<p className="text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Revisions
|
||||
</p>
|
||||
<span className="text-[11px] text-muted-foreground">{totalRevisions} total</span>
|
||||
<span className="text-(length:--text-micro) text-muted-foreground">{totalRevisions} total</span>
|
||||
</header>
|
||||
{revisions.map((revision) => {
|
||||
const isSelected = revision.id === selectedRevisionId;
|
||||
@@ -460,12 +460,12 @@ function RevisionList({
|
||||
<div className="flex items-center gap-2 text-sm font-medium">
|
||||
<span>rev {revision.revisionNumber}</span>
|
||||
{isCurrent && (
|
||||
<span className="rounded-full border border-border px-1.5 text-[10px] uppercase tracking-[0.12em] text-muted-foreground">
|
||||
<span className="rounded-full border border-border px-1.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
Current
|
||||
</span>
|
||||
)}
|
||||
{revision.restoredFromRevisionId && (
|
||||
<span className="rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 text-[10px] uppercase tracking-[0.12em] text-amber-200">
|
||||
<span className="rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:text-amber-200">
|
||||
Restored
|
||||
</span>
|
||||
)}
|
||||
@@ -601,17 +601,17 @@ function RevisionPreview({
|
||||
</header>
|
||||
|
||||
<div className={`${cardWrapper} p-3`}>
|
||||
<p className="pb-2 text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<p className="pb-2 text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Structured fields
|
||||
</p>
|
||||
<div className="grid gap-3 md:grid-cols-2 divide-y md:divide-y-0 divide-border">
|
||||
{fieldRows.map((row) => (
|
||||
<div key={row.key} className="space-y-1 p-2">
|
||||
<p className="text-[11px] uppercase tracking-wide text-muted-foreground">{row.label}</p>
|
||||
<p className="text-(length:--text-micro) uppercase tracking-wide text-muted-foreground">{row.label}</p>
|
||||
<p className="text-sm">
|
||||
{row.value || <span className="text-muted-foreground">—</span>}
|
||||
{row.differs && (
|
||||
<span className="ml-2 rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 text-[10px] uppercase tracking-[0.12em] text-amber-200">
|
||||
<span className="ml-2 rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:text-amber-200">
|
||||
differs from current
|
||||
</span>
|
||||
)}
|
||||
@@ -622,7 +622,7 @@ function RevisionPreview({
|
||||
</div>
|
||||
|
||||
<div className={`${cardWrapper} p-3 space-y-2`}>
|
||||
<p className="text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<p className="text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Description
|
||||
</p>
|
||||
<div className="rounded-md bg-background/40 p-3 text-sm leading-7">
|
||||
@@ -635,7 +635,7 @@ function RevisionPreview({
|
||||
</div>
|
||||
|
||||
<div className={`${cardWrapper} p-3 space-y-2`}>
|
||||
<p className="text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<p className="text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Triggers ({triggers.length})
|
||||
</p>
|
||||
{triggers.length === 0 ? (
|
||||
@@ -644,7 +644,7 @@ function RevisionPreview({
|
||||
<ul className="divide-y divide-border">
|
||||
{triggers.map((trigger) => (
|
||||
<li key={trigger.id} className="py-2 flex flex-wrap items-center gap-2 text-sm">
|
||||
<span className="rounded-full border border-border px-2 py-0.5 text-[10px] uppercase tracking-[0.12em] text-muted-foreground">
|
||||
<span className="rounded-full border border-border px-2 py-0.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
||||
{trigger.kind}
|
||||
</span>
|
||||
<span className="font-medium">{trigger.label ?? trigger.kind}</span>
|
||||
@@ -668,7 +668,7 @@ function RevisionPreview({
|
||||
|
||||
{snapshot.variables.length > 0 && (
|
||||
<div className={`${cardWrapper} p-3 space-y-2`}>
|
||||
<p className="text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<p className="text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Variables ({snapshot.variables.length})
|
||||
</p>
|
||||
<ul className="divide-y divide-border">
|
||||
@@ -738,7 +738,7 @@ function RestoreConfirmDialog({
|
||||
Previous run history is preserved.
|
||||
</li>
|
||||
{recreatedWebhookLabels.map((label) => (
|
||||
<li key={label} className="flex items-start gap-2 text-amber-200">
|
||||
<li key={label} className="flex items-start gap-2 text-amber-800 dark:text-amber-200">
|
||||
<span className="mt-1 inline-block h-1.5 w-1.5 rounded-full bg-amber-400" />
|
||||
The webhook trigger {label} will be recreated with a new URL and secret. Paperclip will
|
||||
show the secret once after restore — copy it before closing.
|
||||
@@ -818,7 +818,7 @@ function RoutineRevisionDiffModal({
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="!max-w-[90%] w-full max-h-[85vh] overflow-hidden flex flex-col">
|
||||
<DialogContent className="!max-w-(--pct-90) w-full max-h-(--sz-85vh) overflow-hidden flex flex-col">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Compare routine revisions</DialogTitle>
|
||||
</DialogHeader>
|
||||
@@ -840,7 +840,7 @@ function RoutineRevisionDiffModal({
|
||||
</div>
|
||||
<div className="overflow-auto flex-1 space-y-4">
|
||||
<section className="space-y-2">
|
||||
<p className="text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<p className="text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Field changes
|
||||
</p>
|
||||
{fieldChanges.length === 0 ? (
|
||||
@@ -858,10 +858,10 @@ function RoutineRevisionDiffModal({
|
||||
{fieldChanges.map((change) => (
|
||||
<tr key={change.field} className="border-t border-border/60">
|
||||
<td className="px-3 py-2 align-top text-xs font-medium">{change.field}</td>
|
||||
<td className="px-3 py-2 align-top text-xs text-red-300">
|
||||
<td className="px-3 py-2 align-top text-xs text-red-700 dark:text-red-300">
|
||||
{change.oldValue ?? "—"}
|
||||
</td>
|
||||
<td className="px-3 py-2 align-top text-xs text-emerald-300">
|
||||
<td className="px-3 py-2 align-top text-xs text-emerald-700 dark:text-emerald-300">
|
||||
{change.newValue ?? "—"}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -871,7 +871,7 @@ function RoutineRevisionDiffModal({
|
||||
)}
|
||||
</section>
|
||||
<section className="space-y-2">
|
||||
<p className="text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground">
|
||||
<p className="text-xs font-medium uppercase tracking-(--tracking-caps) text-muted-foreground">
|
||||
Description diff
|
||||
</p>
|
||||
<DiffTable rows={descriptionDiff} />
|
||||
@@ -907,19 +907,19 @@ function RevisionPicker({
|
||||
tone: "red" | "green";
|
||||
}) {
|
||||
const toneClass = tone === "red"
|
||||
? "border-red-500/30 bg-red-500/10 text-red-300"
|
||||
: "border-green-500/30 bg-green-500/10 text-green-300";
|
||||
? "border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300"
|
||||
: "border-green-500/30 bg-green-500/10 text-green-700 dark:text-green-300";
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
<span
|
||||
className={`rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider ${toneClass}`}
|
||||
className={`rounded-full border px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wider ${toneClass}`}
|
||||
>
|
||||
{label}
|
||||
</span>
|
||||
<select
|
||||
value={value}
|
||||
onChange={(event) => onChange(event.target.value)}
|
||||
className="h-8 min-w-[12rem] rounded-md border border-border/60 bg-background px-2 text-xs"
|
||||
className="h-8 min-w-(--sz-12rem) rounded-md border border-border/60 bg-background px-2 text-xs"
|
||||
>
|
||||
{revisions.map((revision) => (
|
||||
<option key={revision.id} value={revision.id}>
|
||||
@@ -941,8 +941,8 @@ function DiffTable({ rows }: { rows: DiffRow[] }) {
|
||||
}
|
||||
const lineClassesByKind: Record<DiffRow["kind"], string> = {
|
||||
context: "bg-transparent",
|
||||
removed: "bg-red-500/10 text-red-100",
|
||||
added: "bg-green-500/10 text-green-100",
|
||||
removed: "bg-red-500/10 text-red-900 dark:text-red-100",
|
||||
added: "bg-green-500/10 text-green-900 dark:text-green-100",
|
||||
};
|
||||
const markerByKind: Record<DiffRow["kind"], string> = {
|
||||
context: " ",
|
||||
@@ -951,7 +951,7 @@ function DiffTable({ rows }: { rows: DiffRow[] }) {
|
||||
};
|
||||
return (
|
||||
<div className="rounded-md border border-border text-xs font-mono leading-6 overflow-hidden">
|
||||
<div className="grid grid-cols-[56px_56px_24px_minmax(0,1fr)] border-b border-border/60 bg-muted/30 px-3 py-2 text-[11px] uppercase tracking-wide text-muted-foreground">
|
||||
<div className="grid grid-cols-(--gtc-1) border-b border-border/60 bg-muted/30 px-3 py-2 text-(length:--text-micro) uppercase tracking-wide text-muted-foreground">
|
||||
<span>Old</span>
|
||||
<span>New</span>
|
||||
<span />
|
||||
@@ -960,7 +960,7 @@ function DiffTable({ rows }: { rows: DiffRow[] }) {
|
||||
{rows.map((row, index) => (
|
||||
<div
|
||||
key={`${row.kind}-${index}-${row.oldLineNumber ?? "x"}-${row.newLineNumber ?? "x"}`}
|
||||
className={`grid grid-cols-[56px_56px_24px_minmax(0,1fr)] gap-0 border-b border-border/30 px-3 ${lineClassesByKind[row.kind]}`}
|
||||
className={`grid grid-cols-(--gtc-1) gap-0 border-b border-border/30 px-3 ${lineClassesByKind[row.kind]}`}
|
||||
>
|
||||
<span className="select-none border-r border-border/30 pr-3 text-right text-muted-foreground">
|
||||
{row.oldLineNumber ?? ""}
|
||||
|
||||
Loaded 100 of 270 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user