mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-24 01:41:42 +02:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - The cost ledger records usage and controls agent budgets. > - Some runs lose the selected model or API billing category before their usage reaches the ledger. > - The dashboard reports missing costs but does not identify the affected runs or the available actions. > - This pull request preserves usage attribution and adds a compact view of cost gaps grouped by agent. > - Operators can inspect runs, open agent settings, and record saved costs without starting new agent work. ## Linked Issues or Issue Description Refs #15634, #11938, #15879. This follows the merged subscription reporting in #15634. The older proposal in #11938 addresses part of ACP model attribution. This change also rejects conflicting models across a turn, fixes credential-backed billing capture, and explains cost gaps in the existing dashboard. The Pi receipt recovery work in #15879 covers a separate adapter recovery path. This PR preserves unresolved receipts and does not recover provider usage or reprice past entries. **What happened?** ACP results use the requested model even when the runtime selects a model. Native and OpenCode API runs can report unknown billing despite a matching API credential. The dashboard shows notices without links to the affected runs. These gaps make API and subscription totals harder to interpret. **Expected behavior** Record the model selected by the runtime. Identify API billing only from a matching credential. Keep costs unresolved when reliable usage or pricing is absent. Show the affected agents and runs. Offer an accounting retry only when saved evidence is ready. **Steps to reproduce** 1. Run an ACP agent with its model left unset, or use a matching API credential with a native or OpenCode agent. 2. Inspect the recorded model and billing category for the run. 3. Open Costs Overview for a period with unpriced usage or terminal runs awaiting receipts. 4. Inspect the notice and try to find the affected run or the relevant agent settings. **Paperclip version or commit** Current master at `657e71584a0`. The patch is rebased on that commit. **Deployment mode** Self-hosted server and local development. The cost detail tests use a disposable PostgreSQL database. ## What Changed - Preserve the runtime-selected ACP model in checkpoints and final results. Conflicting models across one turn remain unpriced. - Share credential-backed API billing checks across native and OpenCode results. Keep unknown billing when the provider and credential do not match. - Add company-scoped cost detail and accounting retry endpoints. Board viewers can read details but cannot retry. Agents and foreign companies are denied. - Limit each detail category to 25 entries. Use one consistent database snapshot and sparse indexes matching the filters and sort order. Add the unknown-billing count to the existing summary query. - Replace the notice with an expandable count line. Group entries alphabetically by agent. Show the saved blob icon, link each name to configuration, and put run and retry links beside the date. - Preserve estimate and unavailable-price labels on Providers and Billers; keep retry confirmation after the resolved notice disappears. - Fetch details only while expanded. Retain the last loaded details after a refresh error. Retry saved accounting only; do not rerun the agent. - Add capture, database, authorization, UI, and Storybook coverage. Update the implementation contract and cost reporting guide. ## Verification - `pnpm -r typecheck` passed after rebase. - `pnpm build` and `pnpm build-storybook` passed after rebase. - `pnpm check:token-gates` and `git diff --check` passed. - 1,086 focused tests passed across 17 files. These cover ACP, native and OpenCode capture, PostgreSQL reports, route authorization, OpenAPI, Costs UI, and existing accounting regressions. - Desktop and mobile browser checks passed during UI review. They cover lazy expansion, alphabetical groups, loaded blob icons, configuration and run links, keyboard retry, and layout overflow. - `pnpm test:run` was attempted with command-scoped `init.defaultBranch=master` for Git fixtures. It was stopped after a native session recovery failure reproduced on unchanged base `657e71584a0` (`archives a damaged prior epoch before completing guarded same-task replacement with real runnerd`). An MCP upload case failed in the broad run but passed in isolation on both the base and PR branch. These local limitations do not affect the 1,086 passing focused tests. - Current-head CI is green, including all unit test lanes, serialized server suites, runner checks, typecheck, build, policy, and eight browser shards. Apex re-review is 5/5 on `56de60effdb`; all four original findings are addressed and every review thread is resolved. - PostgreSQL applies migration `0333` in the integration fixtures. EXPLAIN ANALYZE on the production detail statements uses the new sparse indexes behind 5,000 healthy records in each table. - Ten provider/biller card cases cover missing and estimated prices; the retry test covers row removal and notice unmount. A live Storybook browser check verifies the confirmation and updated count. - Run `pnpm storybook`. Open **Costs / Subscriptions / Cost Data Quality Details** to inspect the production page with representative fixtures. ## Risks - Model and billing metadata change for future runs. Estimates still require complete usage and a supported price. No past cost amount is rewritten. - A missing final receipt remains unresolved for budget checks. The display changes after fifteen minutes; that time limit never authorizes settlement. - Accounting retry is a write action. It retains the existing company checks, receipt fences, idempotency, and audit logging. - Detail reads are bounded and run only after expansion. They poll every 30 seconds while open. No provider probe or new summary query is added. - Migration `0333` adds two partial indexes; it changes no stored cost amounts or table columns. Index creation scans the existing tables and may briefly block writes during deployment. No lockfile or workflow change is included. ## Model Used OpenAI Codex, based on GPT-6, with repository inspection, code editing, browser checks, and test execution. The exact serving model ID, reasoning setting, and context window were not exposed to this session. ## 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 tests locally and they pass - [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 - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Paperclip <noreply@paperclip.ing>
430 lines
18 KiB
TypeScript
430 lines
18 KiB
TypeScript
import { AccountQuotaPanels } from "./AccountQuotaPanels";
|
|
import { quotaUnavailableMessage } from "@/lib/quota-refresh";
|
|
import { useMemo } from "react";
|
|
import type { CostByProviderModel, CostWindowSpendRow, QuotaWindow, ProviderQuotaResult } from "@paperclipai/shared";
|
|
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
|
|
import { Skeleton } from "@/components/ui/skeleton";
|
|
import { QuotaBar } from "./QuotaBar";
|
|
import { CostAmount } from "./CostAmount";
|
|
import { ClaudeSubscriptionPanel } from "./ClaudeSubscriptionPanel";
|
|
import { CodexSubscriptionPanel } from "./CodexSubscriptionPanel";
|
|
import {
|
|
billingTypeDisplayName,
|
|
formatCents,
|
|
formatTokens,
|
|
providerDisplayName,
|
|
quotaSourceDisplayName,
|
|
} from "@/lib/utils";
|
|
|
|
// ordered display labels for rolling-window rows
|
|
const ROLLING_WINDOWS = ["5h", "24h", "7d"] as const;
|
|
|
|
interface ProviderQuotaCardProps {
|
|
provider: string;
|
|
rows: CostByProviderModel[];
|
|
/** company monthly budget in cents (0 means unlimited) */
|
|
budgetMonthlyCents: number;
|
|
/** Only compare a current-month report with the monthly budget. */
|
|
showBudgetUtilization?: boolean;
|
|
/** total company spend in this period in cents, all providers */
|
|
totalCompanySpendCents: number;
|
|
/** spend in the current calendar week in cents, this provider only */
|
|
weekSpendCents: number;
|
|
/** rolling window rows for this provider: 5h, 24h, 7d */
|
|
windowRows: CostWindowSpendRow[];
|
|
showDeficitNotch: boolean;
|
|
/** live subscription quota windows from the provider's own api */
|
|
quotaWindows?: QuotaWindow[];
|
|
quotaAccounts?: ProviderQuotaResult[];
|
|
quotaRequestFailed?: boolean;
|
|
quotaError?: string | null;
|
|
quotaSource?: string | null;
|
|
quotaLoading?: boolean;
|
|
}
|
|
|
|
export function ProviderQuotaCard({
|
|
provider,
|
|
rows,
|
|
budgetMonthlyCents,
|
|
showBudgetUtilization = true,
|
|
totalCompanySpendCents,
|
|
weekSpendCents,
|
|
windowRows,
|
|
showDeficitNotch,
|
|
quotaAccounts,
|
|
quotaRequestFailed,
|
|
quotaWindows = [],
|
|
quotaError = null,
|
|
quotaSource = null,
|
|
quotaLoading = false,
|
|
}: ProviderQuotaCardProps) {
|
|
// single-pass aggregation over rows — memoized so the 8 derived values are not
|
|
// recomputed on every parent render tick (providers tab polls every 30s, and each
|
|
// card is mounted twice: once in the "all" tab grid and once in its per-provider tab).
|
|
const totals = useMemo(() => {
|
|
let inputTokens = 0, outputTokens = 0, costCents = 0;
|
|
let apiRunCount = 0, subRunCount = 0, subInputTokens = 0, subOutputTokens = 0;
|
|
let eventCount = 0, estimatedEventCount = 0, unpricedEventCount = 0;
|
|
for (const r of rows) {
|
|
inputTokens += r.inputTokens + r.cachedInputTokens;
|
|
outputTokens += r.outputTokens;
|
|
costCents += r.costCents;
|
|
eventCount += r.eventCount ?? 0;
|
|
estimatedEventCount += r.estimatedEventCount ?? 0;
|
|
unpricedEventCount += r.unpricedEventCount ?? 0;
|
|
apiRunCount += r.apiRunCount;
|
|
subRunCount += r.subscriptionRunCount;
|
|
subInputTokens += r.subscriptionInputTokens + r.subscriptionCachedInputTokens;
|
|
subOutputTokens += r.subscriptionOutputTokens;
|
|
}
|
|
const totalTokens = inputTokens + outputTokens;
|
|
const subTokens = subInputTokens + subOutputTokens;
|
|
// Subscription tokens are already included in the ledger totals.
|
|
const allTokens = totalTokens;
|
|
return {
|
|
totalInputTokens: inputTokens,
|
|
totalOutputTokens: outputTokens,
|
|
totalTokens,
|
|
totalCostCents: costCents,
|
|
eventCount, estimatedEventCount, unpricedEventCount,
|
|
totalApiRuns: apiRunCount,
|
|
totalSubRuns: subRunCount,
|
|
totalSubInputTokens: subInputTokens,
|
|
totalSubOutputTokens: subOutputTokens,
|
|
totalSubTokens: subTokens,
|
|
subSharePct: allTokens > 0 ? (subTokens / allTokens) * 100 : 0,
|
|
};
|
|
}, [rows]);
|
|
|
|
const {
|
|
totalInputTokens,
|
|
totalOutputTokens,
|
|
totalTokens,
|
|
totalCostCents,
|
|
totalApiRuns,
|
|
totalSubRuns,
|
|
totalSubInputTokens,
|
|
totalSubOutputTokens,
|
|
totalSubTokens,
|
|
subSharePct,
|
|
} = totals;
|
|
|
|
// Each biller contributes to the company budget; there is no per-biller allocation.
|
|
const providerBudgetShare = budgetMonthlyCents;
|
|
|
|
const budgetPct =
|
|
providerBudgetShare > 0
|
|
? Math.min(100, (totalCostCents / providerBudgetShare) * 100)
|
|
: 0;
|
|
|
|
// 4.33 = average weeks per calendar month (52 / 12)
|
|
const weeklyBudgetShare = providerBudgetShare > 0 ? providerBudgetShare / 4.33 : 0;
|
|
const weekPct =
|
|
weeklyBudgetShare > 0 ? Math.min(100, (weekSpendCents / weeklyBudgetShare) * 100) : 0;
|
|
|
|
const hasBudget = showBudgetUtilization && budgetMonthlyCents > 0;
|
|
|
|
// memoized so the Map and max are not reconstructed on every parent render tick
|
|
const windowMap = useMemo(
|
|
() => new Map(windowRows.map((r) => [r.window, r])),
|
|
[windowRows],
|
|
);
|
|
const maxWindowCents = useMemo(
|
|
() => Math.max(...windowRows.map((r) => r.costCents), 0),
|
|
[windowRows],
|
|
);
|
|
const isClaudeQuotaPanel = provider === "anthropic";
|
|
const isCodexQuotaPanel = provider === "openai" && quotaSource?.startsWith("codex-");
|
|
const supportsSubscriptionQuota = provider === "anthropic" || provider === "openai";
|
|
const showSubscriptionQuotaSection =
|
|
supportsSubscriptionQuota && (quotaLoading || Boolean(quotaAccounts?.length) || quotaWindows.length > 0 || quotaError != null);
|
|
|
|
return (
|
|
<Card>
|
|
<CardHeader className="px-4 pt-4 pb-0 gap-1">
|
|
<div className="flex items-start justify-between gap-3">
|
|
<div className="min-w-0">
|
|
<CardTitle className="text-sm font-semibold">
|
|
{providerDisplayName(provider)}
|
|
</CardTitle>
|
|
<CardDescription className="text-xs mt-0.5">
|
|
<span className="font-mono">{formatTokens(totalInputTokens)}</span> in
|
|
{" · "}
|
|
<span className="font-mono">{formatTokens(totalOutputTokens)}</span> out
|
|
{(totalApiRuns > 0 || totalSubRuns > 0) && (
|
|
<span className="ml-1.5">
|
|
·{" "}
|
|
{totalApiRuns > 0 && `~${totalApiRuns} api`}
|
|
{totalApiRuns > 0 && totalSubRuns > 0 && " / "}
|
|
{totalSubRuns > 0 && `~${totalSubRuns} sub`}
|
|
{" runs"}
|
|
</span>
|
|
)}
|
|
</CardDescription>
|
|
</div>
|
|
<div className="text-xl shrink-0">
|
|
<CostAmount costCents={totalCostCents} eventCount={totals.eventCount}
|
|
estimatedEventCount={totals.estimatedEventCount} unpricedEventCount={totals.unpricedEventCount} showUnavailableCount />
|
|
</div>
|
|
</div>
|
|
</CardHeader>
|
|
|
|
<CardContent className="px-4 pb-4 pt-3 space-y-4">
|
|
{hasBudget && (
|
|
<div className="space-y-3">
|
|
<QuotaBar
|
|
label="Period spend"
|
|
percentUsed={budgetPct}
|
|
leftLabel={formatCents(totalCostCents)}
|
|
rightLabel={`${Math.round(budgetPct)}% of company budget`}
|
|
showDeficitNotch={showDeficitNotch}
|
|
/>
|
|
<QuotaBar
|
|
label="This week"
|
|
percentUsed={weekPct}
|
|
leftLabel={formatCents(weekSpendCents)}
|
|
rightLabel={`~${formatCents(Math.round(weeklyBudgetShare))} / wk`}
|
|
showDeficitNotch={weekPct >= 100}
|
|
/>
|
|
</div>
|
|
)}
|
|
|
|
{/* rolling window consumption — always shown when data is available */}
|
|
{windowRows.length > 0 && (
|
|
<>
|
|
<div className="border-t border-border" />
|
|
<div className="space-y-2">
|
|
<p className="text-xs font-semibold text-muted-foreground uppercase tracking-wide">
|
|
Rolling windows
|
|
</p>
|
|
<div className="space-y-2.5">
|
|
{ROLLING_WINDOWS.map((w) => {
|
|
const row = windowMap.get(w);
|
|
// omit windows with no data rather than showing false $0.00 zeros
|
|
if (!row) return null;
|
|
const cents = row.costCents;
|
|
const tokens = row.inputTokens + row.cachedInputTokens + row.outputTokens;
|
|
const barPct = maxWindowCents > 0 ? (cents / maxWindowCents) * 100 : 0;
|
|
return (
|
|
<div key={w} className="space-y-1">
|
|
<div className="flex items-center justify-between gap-2 text-xs">
|
|
<span className="font-mono text-muted-foreground w-6 shrink-0">{w}</span>
|
|
<span className="text-muted-foreground font-mono flex-1">
|
|
{formatTokens(tokens)} tok
|
|
</span>
|
|
<span className="font-medium tabular-nums">{formatCents(cents)}</span>
|
|
</div>
|
|
<div className="h-2 w-full border border-border overflow-hidden">
|
|
<div
|
|
className="h-full bg-primary/60 transition-(--tp-width) duration-150"
|
|
style={{ width: `${barPct}%` }}
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
})}
|
|
</div>
|
|
</div>
|
|
</>
|
|
)}
|
|
|
|
{/* subscription usage — shown when any subscription-billed runs exist */}
|
|
{totalSubRuns > 0 && (
|
|
<>
|
|
<div className="border-t border-border" />
|
|
<div className="space-y-2">
|
|
<p className="text-xs font-semibold text-muted-foreground uppercase tracking-wide">
|
|
Subscription
|
|
</p>
|
|
<p className="text-xs text-muted-foreground">
|
|
<span className="font-mono text-foreground">{totalSubRuns}</span> runs
|
|
{" · "}
|
|
{totalSubTokens > 0 && (
|
|
<>
|
|
<span className="font-mono text-foreground">{formatTokens(totalSubTokens)}</span> total
|
|
{" · "}
|
|
</>
|
|
)}
|
|
<span className="font-mono text-foreground">{formatTokens(totalSubInputTokens)}</span> in
|
|
{" · "}
|
|
<span className="font-mono text-foreground">{formatTokens(totalSubOutputTokens)}</span> out
|
|
</p>
|
|
{subSharePct > 0 && (
|
|
<>
|
|
<div className="h-1.5 w-full border border-border overflow-hidden">
|
|
<div
|
|
className="h-full bg-primary/60 transition-(--tp-width) duration-150"
|
|
style={{ width: `${subSharePct}%` }}
|
|
/>
|
|
</div>
|
|
<p className="text-xs text-muted-foreground">
|
|
{Math.round(subSharePct)}% of token usage via subscription
|
|
</p>
|
|
</>
|
|
)}
|
|
</div>
|
|
</>
|
|
)}
|
|
|
|
{/* model breakdown — always shown, with token-share bars */}
|
|
{rows.length > 0 && (
|
|
<>
|
|
<div className="border-t border-border" />
|
|
<div className="space-y-3">
|
|
{rows.map((row) => {
|
|
const rowTokens = row.inputTokens + row.cachedInputTokens + row.outputTokens;
|
|
const tokenPct = totalTokens > 0 ? (rowTokens / totalTokens) * 100 : 0;
|
|
const costPct = totalCostCents > 0 ? (row.costCents / totalCostCents) * 100 : 0;
|
|
return (
|
|
<div key={`${row.provider}:${row.model}`} className="space-y-1.5">
|
|
{/* model name and cost */}
|
|
<div className="flex items-center justify-between gap-2">
|
|
<div className="min-w-0">
|
|
<span className="text-xs text-muted-foreground truncate font-mono block">
|
|
{row.model}
|
|
</span>
|
|
<span className="text-(length:--text-micro) text-muted-foreground truncate block">
|
|
{providerDisplayName(row.biller)} · {billingTypeDisplayName(row.billingType)}
|
|
</span>
|
|
</div>
|
|
<div className="flex items-center gap-3 shrink-0 tabular-nums text-xs">
|
|
<span className="text-muted-foreground">
|
|
{formatTokens(rowTokens)} tok
|
|
</span>
|
|
<span className="font-medium">{formatCents(row.costCents)}</span>
|
|
</div>
|
|
</div>
|
|
{/* 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-(--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-(--tp-width) duration-150"
|
|
style={{ width: `${costPct}%` }}
|
|
title={`${Math.round(costPct)}% of provider cost`}
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
})}
|
|
</div>
|
|
</>
|
|
)}
|
|
|
|
{/* subscription quota windows from provider api — shown when data is available */}
|
|
{showSubscriptionQuotaSection && (
|
|
<>
|
|
<div className="border-t border-border" />
|
|
<div className="space-y-2">
|
|
<div className="flex items-center justify-between gap-3">
|
|
<p className="text-xs font-semibold text-muted-foreground uppercase tracking-wide">
|
|
Subscription quota
|
|
</p>
|
|
{quotaSource && !isClaudeQuotaPanel && !isCodexQuotaPanel ? (
|
|
<span className="text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">
|
|
{quotaSourceDisplayName(quotaSource)}
|
|
</span>
|
|
) : null}
|
|
</div>
|
|
{quotaLoading ? (
|
|
<QuotaPanelSkeleton />
|
|
) : quotaAccounts?.length ? (
|
|
<AccountQuotaPanels accounts={quotaAccounts} failed={quotaRequestFailed} />
|
|
) : isClaudeQuotaPanel ? (
|
|
<ClaudeSubscriptionPanel windows={quotaWindows} source={quotaSource} error={quotaError} />
|
|
) : isCodexQuotaPanel ? (
|
|
<CodexSubscriptionPanel windows={quotaWindows} source={quotaSource} error={quotaError} />
|
|
) : (
|
|
<>
|
|
{quotaError ? (
|
|
<p role="status" className="text-xs text-muted-foreground">
|
|
{quotaUnavailableMessage(quotaWindows.length > 0)}
|
|
</p>
|
|
) : null}
|
|
<div className="space-y-2.5">
|
|
{quotaWindows.map((qw) => {
|
|
const fillColor =
|
|
qw.usedPercent == null
|
|
? null
|
|
: qw.usedPercent >= 90
|
|
? "bg-(--status-task-blocked)"
|
|
: qw.usedPercent >= 70
|
|
? "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">
|
|
<span className="font-mono text-muted-foreground shrink-0">{qw.label}</span>
|
|
<span className="flex-1" />
|
|
{qw.valueLabel != null ? (
|
|
<span className="font-medium tabular-nums">{qw.valueLabel}</span>
|
|
) : qw.usedPercent != null ? (
|
|
<span className="font-medium tabular-nums">{qw.usedPercent}% used</span>
|
|
) : null}
|
|
</div>
|
|
{qw.usedPercent != null && fillColor != null && (
|
|
<div className="h-2 w-full border border-border overflow-hidden">
|
|
<div
|
|
className={`h-full transition-(--tp-width) duration-150 ${fillColor}`}
|
|
style={{ width: `${qw.usedPercent}%` }}
|
|
/>
|
|
</div>
|
|
)}
|
|
{qw.detail ? (
|
|
<p className="text-xs text-muted-foreground">
|
|
{qw.detail}
|
|
</p>
|
|
) : qw.resetsAt ? (
|
|
<p className="text-xs text-muted-foreground">
|
|
resets {new Date(qw.resetsAt).toLocaleDateString(undefined, { month: "short", day: "numeric" })}
|
|
</p>
|
|
) : null}
|
|
</div>
|
|
);
|
|
})}
|
|
</div>
|
|
</>
|
|
)}
|
|
</div>
|
|
</>
|
|
)}
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
}
|
|
|
|
function QuotaPanelSkeleton() {
|
|
return (
|
|
<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 space-y-2">
|
|
<Skeleton className="h-3 w-36" />
|
|
<Skeleton className="h-4 w-64 max-w-full" />
|
|
</div>
|
|
<Skeleton className="h-7 w-28" />
|
|
</div>
|
|
<div className="mt-4 space-y-3">
|
|
{Array.from({ length: 3 }).map((_, index) => (
|
|
<div
|
|
key={index}
|
|
className="border border-border px-3.5 py-3"
|
|
>
|
|
<div className="flex items-start justify-between gap-3">
|
|
<div className="min-w-0 space-y-2">
|
|
<Skeleton className="h-4 w-32" />
|
|
<Skeleton className="h-3 w-44 max-w-full" />
|
|
</div>
|
|
<Skeleton className="h-4 w-20" />
|
|
</div>
|
|
<Skeleton className="mt-3 h-2 w-full" />
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|