Desktop D3 UI: studios and store accounts (health checks with fixes, import apps), one card per app across studios (automatic iOS / Android pairing, manual pair / unpair, links, studio moves), store-only apps read-only, ignore list, portfolio search / studio filter / sort / grouping, collapsible studio sidebar, complete Settings, notifications, fixtures with 3 studios and 5 accounts

This commit is contained in:
CRTkafa 2026-10-10 20:15:30 +00:00
parent 395f2db152
commit 6e6305a407
24 changed files with 2225 additions and 312 deletions

View file

@ -3,7 +3,9 @@
// screenshotted without store accounts, in a browser or in `tauri dev`. Nothing here is real store data; the window
// shows a "DEV FIXTURES" badge. src/api.ts only imports this module behind import.meta.env.DEV, so release builds do
// not contain it (tests/webview.test.ts checks the built files for FIXTURE_MARKER).
import type { Account, AppStatus, CacheEntry, DownloadEvent, DraftsResult, ListingField, ListingsResult, PortfolioResult, Project, ProjectSummary, StoreRelease, ToolResult } from '../api';
import { type Account, type AccountCheck, type AppsListResult, type AppStatus, type CacheEntry, DEFAULT_SETTINGS, type DownloadEvent, type DraftsResult, type ListingField, type ListingsResult,
type PortfolioResult, type Project, type ProjectSummary, type Settings, type StoreApp, type StoreRelease, type Studio, type ToolResult } from '../api';
import { buildApps, type Overrides } from '../lib/identity';
import type { CatalogDiff, HealthSnapshot, MetricRow, Review, TestFlightStatus, ValidateResult } from '../lib/model';
export const FIXTURE_MARKER = 'storebound-dev-fixtures';
@ -32,16 +34,88 @@ const ICONS: Record<string, string> = {
'p-tidy': svg(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><linearGradient id="g" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#2fd18b"/><stop offset="1" stop-color="#0f9d74"/></linearGradient></defs><rect width="64" height="64" fill="url(#g)"/><rect x="14" y="13" width="36" height="40" rx="7" fill="#fff"/><path d="M20 25l3 3 6-6M20 37l3 3 6-6" stroke="#0f9d74" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round"/><path d="M33 26h11M33 38h11" stroke="#b6e8d4" stroke-width="3" stroke-linecap="round"/></svg>`),
};
// ---- workspace ----
// ---- workspace: 3 studios, 2 Play service accounts + 3 App Store Connect teams, 2 app folders, store-only apps ----
// Placeholder names only (example.com style): no real studio, person, team or id.
const P1 = '0a1b2c3d4e5f6071', P2 = '1b2c3d4e5f607182', A1 = '2c3d4e5f60718293', A2 = '3d4e5f6071829304', A3 = '4e5f607182930415';
const S1 = 's-example', S2 = 's-sample', S3 = 's-demo';
let studios: Studio[] = [
{ id: S1, name: 'Example Games', color: 'indigo', logo: null, created: iso(60 * 24 * 30) },
{ id: S2, name: 'Sample Labs', color: 'emerald', logo: null, created: iso(60 * 24 * 20) },
{ id: S3, name: 'Demo Indie', color: 'amber', logo: null, created: iso(60 * 24 * 9) },
];
let projects: Project[] = [
{ id: 'p-prism', path: `${HOME}/apps/prism-puddle`, name: 'Prism Puddle', playAccount: 'a-play', appleAccount: 'a-apple', added: iso(60 * 24 * 12) },
{ id: 'p-tidy', path: `${HOME}/apps/tidy-lists`, name: 'Tidy Lists', playAccount: 'a-play', appleAccount: 'a-apple', added: iso(60 * 24 * 5) },
{ id: 'p-prism', path: `${HOME}/apps/prism-puddle`, name: 'Prism Puddle', playAccount: P1, appleAccount: A1, added: iso(60 * 24 * 12) },
{ id: 'p-tidy', path: `${HOME}/apps/tidy-lists`, name: 'Tidy Lists', playAccount: P1, appleAccount: A2, added: iso(60 * 24 * 5) },
];
let accounts: Account[] = [
{ id: 'a-play', label: 'Example Studio · Play', kind: 'play', created: iso(60 * 24 * 12) },
{ id: 'a-apple', label: 'Example Studio · App Store', kind: 'apple', created: iso(60 * 24 * 12) },
{ id: P1, label: 'Example Games · Play', kind: 'play', created: iso(60 * 24 * 30), studio: S1 },
{ id: A1, label: 'Example Games · App Store (company)', kind: 'apple', created: iso(60 * 24 * 30), studio: S1 },
{ id: P2, label: 'Sample Labs · Play', kind: 'play', created: iso(60 * 24 * 20), studio: S2 },
{ id: A2, label: 'Sample Labs · App Store', kind: 'apple', created: iso(60 * 24 * 20), studio: S2 },
{ id: A3, label: 'Demo Indie · App Store (individual)', kind: 'apple', created: iso(60 * 24 * 9), studio: S3 },
];
if (import.meta.env.VITE_FIXTURES === 'empty') { projects = []; accounts = []; }
if (import.meta.env.VITE_FIXTURES === 'empty') { projects = []; accounts = []; studios = []; }
/** Small drawn icons for the store apps (fixture art). */
const glyph = (a: string, b: string, inner: string) => `data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="${a}"/><stop offset="1" stop-color="${b}"/></linearGradient></defs><rect width="64" height="64" fill="url(#g)"/>${inner}</svg>`)}`;
const G = {
orbit: glyph('#0ea5e9', '#6366f1', '<circle cx="32" cy="32" r="9" fill="#fff"/><ellipse cx="32" cy="32" rx="22" ry="9" fill="none" stroke="#fff" stroke-width="3" transform="rotate(-25 32 32)"/>'),
block: glyph('#22c55e', '#15803d', '<rect x="14" y="30" width="16" height="16" rx="3" fill="#fff"/><rect x="34" y="30" width="16" height="16" rx="3" fill="#bbf7d0"/><rect x="24" y="12" width="16" height="16" rx="3" fill="#fff"/>'),
lantern: glyph('#f59e0b', '#b45309', '<path d="M24 18h16l4 8v16l-4 6H24l-4-6V26z" fill="#fff"/><text x="32" y="41" font-family="Georgia" font-size="16" font-weight="700" text-anchor="middle" fill="#b45309">W</text>'),
tycoon: glyph('#a855f7', '#6d28d9', '<circle cx="32" cy="32" r="16" fill="#fde68a"/><text x="32" y="39" font-family="Arial" font-size="18" font-weight="800" text-anchor="middle" fill="#92400e">$</text>'),
racer: glyph('#ef4444', '#991b1b', '<path d="M14 38l6-12h24l6 12v6H14z" fill="#fff"/><circle cx="22" cy="44" r="4" fill="#111"/><circle cx="42" cy="44" r="4" fill="#111"/>'),
habit: glyph('#14b8a6', '#0f766e', '<ellipse cx="32" cy="36" rx="13" ry="16" fill="#fff"/><path d="M24 34l5 5 11-11" stroke="#0f766e" stroke-width="4" fill="none" stroke-linecap="round"/>'),
focus: glyph('#f43f5e', '#be123c', '<circle cx="32" cy="34" r="15" fill="#fff"/><path d="M32 34V24M32 34l7 4" stroke="#be123c" stroke-width="3.5" stroke-linecap="round"/>'),
sketch: glyph('#fb923c', '#ea580c', '<path d="M32 13l5 11 12 1-9 8 3 12-11-7-11 7 3-12-9-8 12-1z" fill="#fff"/>'),
night: glyph('#1e293b', '#4338ca', '<path d="M38 16a16 16 0 1 0 10 28 13 13 0 0 1-10-28z" fill="#fde68a"/><rect x="18" y="40" width="20" height="3" rx="1.5" fill="#c7d2fe"/>'),
mood: glyph('#ec4899', '#8b5cf6', '<rect x="14" y="14" width="10" height="10" rx="3" fill="#fff"/><rect x="27" y="14" width="10" height="10" rx="3" fill="#fbcfe8"/><rect x="40" y="14" width="10" height="10" rx="3" fill="#fff"/><rect x="14" y="27" width="10" height="10" rx="3" fill="#ddd6fe"/><rect x="27" y="27" width="10" height="10" rx="3" fill="#fff"/><rect x="40" y="27" width="10" height="10" rx="3" fill="#fbcfe8"/><rect x="14" y="40" width="10" height="10" rx="3" fill="#fff"/><rect x="27" y="40" width="10" height="10" rx="3" fill="#ddd6fe"/><rect x="40" y="40" width="10" height="10" rx="3" fill="#fff"/>'),
};
const ios = (id: string, bundleId: string, name: string, icon: string | null, latest: [string, string] | null): StoreApp =>
({ store: 'ios', id, bundleId, name, platforms: ['IOS'], sku: null, primaryLocale: 'en-US', latest: latest ? { version: latest[0], state: latest[1], platform: 'IOS' } : null, icon });
const droid = (pkg: string, name: string, icon: string | null): StoreApp => ({ store: 'android', id: pkg, bundleId: pkg, name, platforms: ['ANDROID'], sku: null, primaryLocale: null, latest: null, icon });
const STORE_APPS: Record<string, StoreApp[]> = {
// one Play service account invited to two developer accounts: it sees Example Games' and Sample Labs' Play apps
[P1]: [
droid('com.example.prismpuddle', 'Prism Puddle', null), droid('com.example.tidylists', 'Tidy Lists', null), droid('com.example.orbithop', 'Orbit Hop', G.orbit),
droid('com.example.blockgarden', 'Block Garden', G.block), droid('com.example.lantern.words', 'Word Lantern', G.lantern), droid('com.example.pockettycoon', 'Pocket Tycoon', G.tycoon),
droid('com.example.nightnotes.free', 'Nightnotes Free', G.night), droid('com.example.moodgrid', 'Mood Grid', G.mood),
],
[A1]: [
ios('6400000001', 'com.example.prismpuddle', 'Prism Puddle', null, ['2.4.0', 'WAITING_FOR_REVIEW']), ios('6400000011', 'com.example.orbithop', 'Orbit Hop', G.orbit, ['3.1.0', 'READY_FOR_SALE']),
ios('6400000012', 'com.example.blockgarden.ios', 'Block Garden', G.block, ['1.2.0', 'IN_REVIEW']), ios('6400000013', 'com.example.wordlantern', 'Word Lantern', G.lantern, ['2.0.1', 'READY_FOR_SALE']),
ios('6400000014', 'com.example.oldracer', 'Old Racer', G.racer, ['1.9.3', 'REMOVED_FROM_SALE']),
],
[A2]: [
ios('6400000002', 'com.example.tidylists', 'Tidy Lists', null, ['1.5.0', 'PREPARE_FOR_SUBMISSION']), ios('6400000021', 'com.example.habithatch', 'Habit Hatch', G.habit, ['1.0.4', 'READY_FOR_SALE']),
ios('6400000022', 'com.example.focustimer', 'Focus Timer Mini', G.focus, ['2.2.0', 'READY_FOR_SALE']),
],
[A3]: [ios('6400000031', 'com.example.starsketch', 'Star Sketch', G.sketch, ['1.1.0', 'READY_FOR_SALE']), ios('6400000032', 'com.example.nightnotes', 'Night Notes', G.night, ['4.0.0', 'READY_FOR_SALE'])],
};
// Sample Labs' Play service account was never invited: no app list, and its check says what to do
const IMPORTED: Record<string, number> = { [P1]: 60 * 3, [A1]: 60 * 3, [A2]: 60 * 3, [A3]: 60 * 26 };
let overrides: Overrides = {
pairs: [{ ios: `ios:${A3}:6400000032`, android: `android:${P1}:com.example.nightnotes.free` }],
unpairs: [], links: [],
appStudio: [{ key: `android:${P1}:com.example.moodgrid`, studio: S3 }],
ignored: [`app:ios:${A1}:6400000014`],
};
if (import.meta.env.VITE_FIXTURES === 'empty') overrides = { pairs: [], unpairs: [], links: [], appStudio: [], ignored: [] };
let settings: Settings = { ...DEFAULT_SETTINGS, refresh: { ...DEFAULT_SETTINGS.refresh, autoMinutes: 60 } };
const PLAY_INVITE = (who: string) => `Play Console > Users and permissions > Invite new users: add ${who}. Account permissions: "View app information and download bulk reports (read-only)"; per app, as needed: "Manage store presence", "Manage testing tracks", "Release to production, exclude devices and use Play App Signing" (rollouts), "Reply to reviews", "Manage orders and subscriptions". One service account can be invited to several developer accounts.`;
const CHECKS: Record<string, AccountCheck> = {
[P1]: { store: 'android', status: 'ok', principal: 'storebound@example-games-123.iam.gserviceaccount.com', apps: 8, message: 'The service account can see 8 apps.', fix: null, docs: null },
[P2]: { store: 'android', status: 'permission', principal: 'storebound@sample-labs-456.iam.gserviceaccount.com', apps: 0, message: 'The key works, but no developer account has invited this service account (it sees no apps).', fix: PLAY_INVITE('storebound@sample-labs-456.iam.gserviceaccount.com'), docs: 'https://play.google.com/console/developers/users-and-permissions' },
[A1]: { store: 'ios', status: 'ok', principal: null, apps: 5, message: 'The key works and can read the team\'s apps.', fix: null, docs: null },
[A2]: { store: 'ios', status: 'ok', principal: null, apps: 3, message: 'The key works and can read the team\'s apps.', fix: null, docs: null },
[A3]: { store: 'ios', status: 'ok', principal: null, apps: 2, message: 'The key works and can read the team\'s apps.', fix: null, docs: null },
};
const appsEntry = (id: string): CacheEntry<AppsListResult> | null => (STORE_APPS[id] && IMPORTED[id] !== undefined && import.meta.env.VITE_FIXTURES !== 'cold'
? { value: { store: accounts.find(a => a.id === id)?.kind === 'play' ? 'android' : 'ios', apps: STORE_APPS[id]!, warnings: [], at: iso(IMPORTED[id]!) }, at: iso(IMPORTED[id]!) } : null);
/** Store-only apps as the window pairs them (so the cached live read covers them too). */
const storeTargets = () => buildApps({
projects, accounts, overrides, summaryOf: p => SUMMARY[p.id],
storeApps: accounts.map(a => ({ account: a.id, apps: appsEntry(a.id)?.value.apps ?? [] })),
}).filter(a => !a.project && !a.ignored);
const SUMMARY: Record<string, ProjectSummary> = {
'p-prism': {
@ -98,7 +172,39 @@ function status(id: string, live: boolean): AppStatus {
storeErrors: {}, errors: [],
};
}
const portfolio = (live: boolean): PortfolioResult => ({ apps: projects.map(p => status(p.id, live)), at: live ? iso(14) : iso(0) });
/** Store-only app releases (fixture), by bundle id / package name. */
const STORE_RELEASES: Record<string, StoreRelease[]> = {
'com.example.orbithop': [rel('ios', '3.1.0', 'live', { build: '88', state: 'READY_FOR_SALE', date: iso(60 * 24 * 6) }), rel('android', '3.1.0', 'rollout', { build: '310', state: 'inProgress', fraction: 0.5 })],
'com.example.blockgarden.ios': [rel('ios', '1.2.0', 'review', { build: '17', state: 'IN_REVIEW', date: iso(60 * 5) }), rel('ios', '1.1.2', 'live', { build: '15', state: 'READY_FOR_SALE', date: iso(60 * 24 * 40) })],
'com.example.blockgarden': [rel('android', '1.2.0', 'live', { build: '120', state: 'completed' })],
'com.example.wordlantern': [rel('ios', '2.0.1', 'live', { build: '41', state: 'READY_FOR_SALE', date: iso(60 * 24 * 18) })],
'com.example.lantern.words': [rel('android', '2.0.1', 'halted', { build: '201', state: 'halted', fraction: 0.1 })],
'com.example.pockettycoon': [rel('android', '5.4.0', 'live', { build: '540', state: 'completed' })],
'com.example.habithatch': [rel('ios', '1.0.4', 'live', { build: '9', state: 'READY_FOR_SALE', date: iso(60 * 24 * 60) })],
'com.example.focustimer': [rel('ios', '2.2.0', 'live', { build: '30', state: 'READY_FOR_SALE', date: iso(60 * 24 * 3) }), rel('ios', '2.3.0', 'rejected', { build: '31', state: 'REJECTED', date: iso(60 * 10) })],
'com.example.starsketch': [rel('ios', '1.1.0', 'live', { build: '12', state: 'READY_FOR_SALE', date: iso(60 * 24 * 12) })],
'com.example.nightnotes': [rel('ios', '4.0.0', 'live', { build: '77', state: 'READY_FOR_SALE', date: iso(60 * 24 * 2) })],
'com.example.nightnotes.free': [rel('android', '4.0.0', 'rollout', { build: '400', state: 'inProgress', fraction: 0.2 })],
'com.example.moodgrid': [rel('android', '0.9.0', 'testing', { build: '9', state: 'completed', track: 'beta' })],
};
function storeStatus(target: string, live: boolean): AppStatus {
const ios = /ios:[^:]+:(\d+):([^;]+)/.exec(target), android = /android:[^:]+:([^;]+)/.exec(target);
const bundle = ios?.[2] ?? null, pkg = android?.[1] ?? null;
const all = [...(bundle ? STORE_RELEASES[bundle] ?? [] : []), ...(pkg ? STORE_RELEASES[pkg] ?? [] : [])];
const name = Object.values(STORE_APPS).flat().find(a => a.bundleId === (bundle ?? pkg))?.name ?? bundle ?? pkg ?? '?';
const versions = [...new Set(all.map(r => r.version!))].sort().reverse();
const live1 = versions.find(v => all.some(r => r.version === v && ['live', 'rollout', 'halted'].includes(r.phase))) ?? null;
const next1 = versions.find(v => !live1 || v > live1) ?? null;
const s: ProjectSummary = { dir: '', config: '', name, languages: ['en'], play: pkg ? { packageName: pkg } : null, apple: bundle ? { bundleId: bundle, appId: ios![1]! } : null,
platforms: [...(bundle ? ['ios' as const] : []), ...(pkg ? ['android' as const] : [])], products: 0, productIds: [], subscriptions: 0, subscriptionIds: [], catalog: { ios: [], android: [] }, shots: false, testflightGroups: 0 };
return {
project: target, ok: true, virtual: true, summary: s, check: { ok: true, problems: [], warnings: [] },
app: { id: target, name, platforms: { ios: bundle ? { bundleId: bundle, ascAppId: ios![1]! } : null, android: pkg ? { packageName: pkg } : null } },
release: live ? { source: 'live', current: live1 ? train(all, live1) : null, next: next1 && next1 !== live1 ? train(all, next1) : null, all } : { source: 'none', current: null, next: null },
catalog: { checked: 'config', products: 0, subscriptions: 0, onlyIos: [], onlyAndroid: [], missingIos: [], missingAndroid: [], ok: true }, storeErrors: {}, errors: [],
};
}
const portfolio = (live: boolean, stores: string[] = []): PortfolioResult => ({ apps: [...projects.map(p => status(p.id, live)), ...(live ? stores.map(s => storeStatus(s, true)) : [])], at: live ? iso(14) : iso(0) });
// ---- per-app store reads ----
const series = (n: number, base: number, drift: number, seed: number): number[] =>
@ -282,7 +388,23 @@ let chromeInstalled = false;
const ok = (method: string, data: unknown): ToolResult => ({ method, ok: true, exitCode: 0, dryRun: false, command: `storebound ${method.replace('.', ' ')} --json`, output: '', data });
const STORE_REVIEWS: Review[] = [
R('apple', 's-a1', 5, 'Lovely', 'Simple and quick, does exactly what it says.', 'USA', 1),
R('play', 's-p1', 1, 'Stuck on loading', 'Since the last update it stays on the loading screen on my tablet.', 'en', 1),
R('apple', 's-a2', 4, 'Nice update', 'The new widgets are great. Please add a dark icon.', 'GBR', 3),
R('play', 's-p2', 2, 'Too many ads', 'An ad after every round is too much.', 'en', 5),
R('apple', 's-a3', 5, 'Harika', 'Her gün kullanıyorum, çok sade.', 'TUR', 7),
];
function read(method: string, id: string): ToolResult {
if (id.startsWith('store:')) {
const play = /android:/.test(id);
switch (method) {
case 'health': return ok(method, play ? HEALTH['p-tidy'] : { date: day(0), apple: HEALTH['p-tidy']!.apple });
case 'reviews.list': return ok(method, STORE_REVIEWS.filter(r => (play || r.store === 'apple') && (/ios:/.test(id) || r.store === 'play')));
case 'apple.testflight_status': return ok(method, TF['p-tidy']);
default: return { method, ok: false, exitCode: 1, dryRun: false, command: `storebound ${method}`, output: `fixture: ${method} needs an app folder` };
}
}
switch (method) {
case 'project.icon': return ok(method, { path: SUMMARY[id]?.icon ?? null, dataUrl: ICONS[id] ?? null });
case 'project.listings': return ok(method, LISTINGS[id]);
@ -316,21 +438,48 @@ async function answer(cmd: string, a: Record<string, unknown>): Promise<unknown>
case 'sidecar_status': return { running: true, version: '0.5.0', protocol: 'storebound-desktop/1', methods: Array.from({ length: 64 }, (_, i) => ({ method: `m${i}` })), tools: { tools: TOOLS.map(x => (x.id === 'chrome' && chromeInstalled ? { ...x, found: true, name: 'Chrome for Testing', version: '141.0.7390.54', source: 'app' } : x)) } };
case 'projects_list': return projects;
case 'accounts_list': return accounts;
case 'workspace_get': return { studios, overrides, settings };
case 'store_apps_cached': return accounts.map(x => ({ account: x.id, entry: appsEntry(x.id) }));
case 'store_apps_refresh': {
const id = a.id as string;
await progressLines(job, ['[apps] reading the account\'s apps', '[apps] icons']);
if (job && cancelled.has(job)) throw { code: -32800, message: 'Request cancelled' };
if (!STORE_APPS[id]) throw { code: -32603, message: `Google Play: ${CHECKS[id]?.message ?? 'no apps'}` };
IMPORTED[id] = 0;
return appsEntry(id);
}
case 'account_check': await sleep(350); return CHECKS[a.id as string];
case 'studio_save': {
const s = a.id ? studios.find(x => x.id === a.id)! : { id: `s-${studios.length + 1}`, logo: null, created: iso(0) } as Studio;
Object.assign(s, { name: a.name, color: a.color });
if (!a.id) studios = [...studios, s];
return s;
}
case 'studio_remove': studios = studios.filter(s => s.id !== a.id); accounts = accounts.map(x => (x.studio === a.id ? { ...x, studio: null } : x)); return null;
case 'studio_logo': return null;
case 'account_update': { const x = accounts.find(y => y.id === a.id)!; x.label = a.label as string; x.studio = (a.studio as string | null) ?? null; return x; }
case 'overrides_set': overrides = a.overrides as Overrides; return overrides;
case 'settings_set': settings = a.settings as Settings; return settings;
case 'cache_info': return { rows: 214, bytes: 3_412_000, oldest: iso(60 * 24 * 26), file_bytes: 4_718_592 };
case 'data_reveal': case 'notify': return null;
case 'app_reset': return false;
case 'portfolio_status': {
const stores = (a.stores as string[] | undefined) ?? [];
if (a.live) {
for (let n = 1; n <= projects.length; n++) {
await sleep(700);
const total = projects.length + stores.length;
for (let n = 1; n <= total; n++) {
await sleep(total > 6 ? 180 : 700);
if (job && cancelled.has(job)) throw { code: -32800, message: 'Request cancelled' };
emit('sidecar-progress', { params: { requestId: 0, n, total: projects.length, project: projects[n - 1]!.path }, job });
emit('sidecar-progress', { params: { requestId: 0, n, total, project: projects[n - 1]?.path ?? stores[n - 1 - projects.length] }, job });
}
return portfolio(true);
return portfolio(true, stores);
}
await sleep(120);
return portfolio(false);
}
case 'cache_get': {
const method = a.method as string, id = a.projectId as string;
if (id === '*' && method === 'portfolio.status') return projects.length ? { value: portfolio(true), at: iso(14) } satisfies CacheEntry<PortfolioResult> : null;
if (id === '*' && method === 'portfolio.status') return projects.length ? { value: portfolio(true, storeTargets().map(x => x.target)), at: iso(14) } satisfies CacheEntry<PortfolioResult> : null;
if (method === 'project.icon') return ICONS[id] ? { value: read(method, id), at: iso(60) } : null;
if (CACHED_AGO[method] !== undefined && import.meta.env.VITE_FIXTURES !== 'cold') return { value: read(method, id), at: iso(CACHED_AGO[method]!) };
return null;