Skip to content

Commit 5d78e66

Browse files
V48 (impl-only): Align Read UX with Deposit master-detail
Restructure /reads to deposit parity: compact header, pipelines table, New compose detail with SHA source, Need free-text, Relevant/Irrelevant path pickers, option cards (needinesses + total BTD), and settle. Wire path steering through synthesize-options. Product surface tints: Packs emerald, Deposit violet, Read orange; brand primary stays green.
1 parent 6f8cbe2 commit 5d78e66

23 files changed

Lines changed: 570 additions & 429 deletions

File tree

uapi/app/api/read/synthesize-options/dispatch-read-synthesis.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export type ReadSynthesisDispatchInput = {
1616
sourceBranch: string;
1717
sourceCommit: string | null;
1818
need: string;
19+
/** Deposit forcedInclusions twin. */
20+
relevantPaths?: string[];
21+
/** Deposit forcedExclusions twin. */
22+
irrelevantPaths?: string[];
1923
};
2024

2125
export async function runReadOptionSynthesis(input: ReadSynthesisDispatchInput): Promise<void> {
@@ -24,6 +28,11 @@ export async function runReadOptionSynthesis(input: ReadSynthesisDispatchInput):
2428
storeCrossPhaseArtifact(exec, 'host', 'runId', input.runId);
2529
storeCrossPhaseArtifact(exec, 'pipeline', 'runId', input.runId);
2630
storeCrossPhaseArtifact(exec, 'pipeline', 'productPipeline', 'synthesize-reads-asset-packs-pipeline');
31+
storeCrossPhaseArtifact(exec, 'read', 'relevantPaths', input.relevantPaths || []);
32+
storeCrossPhaseArtifact(exec, 'read', 'irrelevantPaths', input.irrelevantPaths || []);
33+
// Deposit steering keys so shared discovery filters can reuse exclusion law.
34+
storeCrossPhaseArtifact(exec, 'deposit', 'forcedInclusions', input.relevantPaths || []);
35+
storeCrossPhaseArtifact(exec, 'deposit', 'forcedExclusions', input.irrelevantPaths || []);
2736

2837
const [owner, name] = input.repositoryFullName.split('/');
2938
const pipelineInput = {
@@ -33,6 +42,10 @@ export async function runReadOptionSynthesis(input: ReadSynthesisDispatchInput):
3342
repositoryFullName: input.repositoryFullName,
3443
sourceBranch: input.sourceBranch,
3544
sourceCommit: input.sourceCommit,
45+
relevantPaths: input.relevantPaths || [],
46+
irrelevantPaths: input.irrelevantPaths || [],
47+
forcedInclusions: input.relevantPaths || [],
48+
forcedExclusions: input.irrelevantPaths || [],
3649
repository: {
3750
owner,
3851
name,

uapi/app/api/read/synthesize-options/route.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,20 @@ export async function POST(request: Request) {
6464
: '';
6565
const sourceBranch = typeof body.sourceBranch === 'string' ? body.sourceBranch.trim() : 'main';
6666
const sourceCommit = typeof body.sourceCommit === 'string' ? body.sourceCommit.trim() : '';
67+
const normalizePathList = (value: unknown): string[] =>
68+
Array.isArray(value)
69+
? value
70+
.filter((entry): entry is string => typeof entry === 'string')
71+
.map((entry) => entry.trim())
72+
.filter(Boolean)
73+
: [];
74+
// Deposit twin: relevant/irrelevant paths (also accept forcedInclusions/Exclusions).
75+
const relevantPaths = normalizePathList(
76+
body.relevantPaths ?? body.forcedInclusions ?? body.relevants,
77+
);
78+
const irrelevantPaths = normalizePathList(
79+
body.irrelevantPaths ?? body.forcedExclusions ?? body.irrelevants,
80+
);
6781
const requestedRunId =
6882
typeof body.runId === 'string' && UUID_PATTERN.test(body.runId) ? body.runId : randomUUID();
6983

@@ -92,6 +106,8 @@ export async function POST(request: Request) {
92106
sourceBranch,
93107
sourceCommit: sourceCommit || null,
94108
needLength: need.length,
109+
relevantPathCount: relevantPaths.length,
110+
irrelevantPathCount: irrelevantPaths.length,
95111
},
96112
context: {
97113
source: 'read-synthesize-options',
@@ -101,6 +117,8 @@ export async function POST(request: Request) {
101117
repositoryFullName,
102118
sourceBranch,
103119
sourceCommit: sourceCommit || null,
120+
relevantPaths,
121+
irrelevantPaths,
104122
},
105123
started_at: new Date().toISOString(),
106124
});
@@ -132,6 +150,8 @@ export async function POST(request: Request) {
132150
sourceBranch,
133151
sourceCommit: sourceCommit || null,
134152
need,
153+
relevantPaths,
154+
irrelevantPaths,
135155
}),
136156
);
137157

uapi/components/bitcode/routes/ProductRouteShell/ProductRouteShell.tsx

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ import {
1111
ShieldCheck,
1212
} from "lucide-react";
1313

14-
type ProductRouteTone = "emerald" | "sky" | "violet";
14+
/**
15+
* Product surface tints (secondary page wash). Brand primary remains Bitcode
16+
* emerald green everywhere else (nav, CTAs, logo).
17+
* - emerald → Packs (primary green secondary wash)
18+
* - violet → Deposits (purple)
19+
* - orange → Reads
20+
* - sky → retained for non-product panels
21+
*/
22+
type ProductRouteTone = "emerald" | "sky" | "violet" | "orange";
1523

1624
// Section (b) generic copy for the shell's rich tooltips.
1725
const ROUTE_METRIC_TOOLTIP_GENERIC =
@@ -89,16 +97,27 @@ const TONE_CLASSES: Record<ProductRouteTone, ToneClasses> = {
8997
panelAccent: "border-sky-300/15 bg-sky-300/[0.04] text-sky-100/85",
9098
},
9199
violet: {
92-
page: "bg-[radial-gradient(circle_at_top_left,rgba(167,139,250,0.13),transparent_30%),linear-gradient(180deg,#050915_0%,#02050d_100%)]",
93-
headerBorder: "border-violet-300/15",
94-
eyebrow: "text-violet-200/80",
100+
page: "bg-[radial-gradient(circle_at_top_left,rgba(167,139,250,0.16),transparent_30%),linear-gradient(180deg,#050915_0%,#02050d_100%)]",
101+
headerBorder: "border-violet-300/18",
102+
eyebrow: "text-violet-200/85",
95103
activeStep:
96-
"border-violet-300/38 bg-violet-300/12 shadow-[0_0_24px_rgba(167,139,250,0.12)]",
104+
"border-violet-300/38 bg-violet-300/12 shadow-[0_0_24px_rgba(167,139,250,0.14)]",
97105
inactiveStep:
98106
"border-white/10 bg-white/[0.035] hover:border-violet-300/24 hover:bg-violet-300/[0.06]",
99107
focusRing: "focus-visible:ring-violet-300/55",
100108
panelAccent: "border-violet-300/15 bg-violet-300/[0.04] text-violet-100/85",
101109
},
110+
orange: {
111+
page: "bg-[radial-gradient(circle_at_top_left,rgba(251,146,60,0.16),transparent_30%),linear-gradient(180deg,#050915_0%,#02050d_100%)]",
112+
headerBorder: "border-orange-300/18",
113+
eyebrow: "text-orange-200/85",
114+
activeStep:
115+
"border-orange-300/40 bg-orange-300/12 shadow-[0_0_24px_rgba(251,146,60,0.14)]",
116+
inactiveStep:
117+
"border-white/10 bg-white/[0.035] hover:border-orange-300/26 hover:bg-orange-300/[0.06]",
118+
focusRing: "focus-visible:ring-orange-300/55",
119+
panelAccent: "border-orange-300/16 bg-orange-300/[0.05] text-orange-50/90",
120+
},
102121
};
103122

104123
export type ProductRouteMetric = {

uapi/components/deposits/DepositOptionCard/DepositOptionCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export function DepositOptionCard(props: DepositOptionCardProps) {
7878
data-testid={`deposit-option-${option.kind}`}
7979
className={`grid min-w-0 gap-4 border px-4 py-4 ${
8080
reviewed
81-
? "border-emerald-300/38 bg-emerald-300/10"
81+
? "border-violet-300/38 bg-violet-300/10"
8282
: "border-white/10 bg-black/20"
8383
}`}
8484
>

uapi/components/deposits/DepositPageClient/DepositPageClient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ export default function DepositPageClient() {
457457
<BitcodeShellBridgeProvider>
458458
<ProductRouteShell
459459
testId="route-shell-deposit"
460-
tone="emerald"
460+
tone="violet"
461461
label="Deposit"
462462
title="Depositing"
463463
summary="Synthesize, review, and deposit AssetPacks from your repository."

uapi/components/deposits/DepositPipelinesMaster/DepositPipelinesMaster.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function DepositPipelinesMaster({
5858
<button
5959
type="button"
6060
onClick={onCloseDetail}
61-
className="inline-flex h-9 items-center gap-2 border border-white/10 bg-white/[0.04] px-3 text-xs font-medium uppercase tracking-[0.14em] text-neutral-200 transition hover:border-emerald-300/30 hover:bg-emerald-300/10"
61+
className="inline-flex h-9 items-center gap-2 border border-white/10 bg-white/[0.04] px-3 text-xs font-medium uppercase tracking-[0.14em] text-neutral-200 transition hover:border-violet-300/30 hover:bg-violet-300/10"
6262
aria-label="Back to Deposit"
6363
>
6464
<ArrowLeft className="h-4 w-4" aria-hidden="true" />
@@ -80,7 +80,7 @@ export function DepositPipelinesMaster({
8080
<button
8181
type="button"
8282
onClick={onOpenCompose}
83-
className="ml-auto inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-none border border-emerald-200/55 bg-[linear-gradient(180deg,rgba(52,211,153,0.95),rgba(16,185,129,0.88))] text-slate-950 shadow-[0_0_0_1px_rgba(167,243,208,0.35)_inset,0_12px_36px_rgba(16,185,129,0.42),0_0_28px_rgba(52,211,153,0.28)] transition hover:border-emerald-100/70 hover:bg-[linear-gradient(180deg,rgba(110,231,183,1),rgba(52,211,153,0.95))] hover:shadow-[0_0_0_1px_rgba(209,250,229,0.45)_inset,0_14px_40px_rgba(16,185,129,0.5),0_0_34px_rgba(52,211,153,0.38)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-200/70 focus-visible:ring-offset-2 focus-visible:ring-offset-[rgba(4,8,18,0.9)] active:translate-y-px"
83+
className="ml-auto inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-none border border-violet-200/55 bg-[linear-gradient(180deg,rgba(167,139,250,0.95),rgba(139,92,246,0.88))] text-slate-950 shadow-[0_0_0_1px_rgba(196,181,253,0.35)_inset,0_12px_36px_rgba(139,92,246,0.42),0_0_28px_rgba(167,139,250,0.28)] transition hover:border-violet-100/70 hover:bg-[linear-gradient(180deg,rgba(196,181,253,1),rgba(167,139,250,0.95))] hover:shadow-[0_0_0_1px_rgba(221,214,254,0.45)_inset,0_14px_40px_rgba(139,92,246,0.5),0_0_34px_rgba(167,139,250,0.38)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-violet-200/70 focus-visible:ring-offset-2 focus-visible:ring-offset-[rgba(4,8,18,0.9)] active:translate-y-px"
8484
aria-label="New deposit"
8585
title="New deposit"
8686
data-testid="deposit-open-compose"

uapi/components/deposits/DepositRouteStateAside/DepositRouteStateAside.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export function DepositRouteStateAside({
7474
<div className="mt-3">
7575
<ProductRouteDisclosure
7676
title="Authority blockers"
77-
tone="emerald"
77+
tone="violet"
7878
summaryDescription={DEPOSIT_AUTHORITY_BLOCKERS_EXPLAINER}
7979
>
8080
{depositRouteSession.organizationPolicyWalletAuthority.aggregate.blockers.join(
@@ -105,7 +105,7 @@ export function DepositRouteStateAside({
105105
<div className="mt-3">
106106
<ProductRouteDisclosure
107107
title="Disclosure boundary"
108-
tone="emerald"
108+
tone="violet"
109109
summaryDescription={DEPOSIT_DISCLOSURE_BOUNDARY_EXPLAINER}
110110
>
111111
Visible: measurements, demand roots, source path roots, policy
@@ -118,7 +118,7 @@ export function DepositRouteStateAside({
118118
<ProductRouteProofDetail
119119
testId="deposit-expandable-proof-detail"
120120
title="Deposit proof detail"
121-
tone="emerald"
121+
tone="violet"
122122
roots={[
123123
{
124124
id: "route-session-root",

0 commit comments

Comments
 (0)