Merge remote-tracking branch 'origin/main' into play-app-record

# Conflicts:
#	CHANGELOG.md
#	docs/pitfalls.md
#	skills/store-pitfalls/SKILL.md
#	tests/console-fill.test.ts
This commit is contained in:
CRTkafa 2026-10-11 21:24:52 +00:00
commit ebc45c8c1a
70 changed files with 3729 additions and 290 deletions

View file

@ -1,7 +1,7 @@
// DEV-ONLY FIXTURE DATA for the screens that cover the rest of the CLI (prices, store art, growth, app info). Made-up
// numbers around the two demo apps; drawn SVG stand-ins for the rendered screenshots. Only src/dev/fixtures.ts imports
// this module, and only fixture mode (dev builds) loads that.
import type { AnalyticsCompare, DeclarationsResult, ListingText, PpoStatus, PriceRowData, PricesCurrent, PricesDiff, RendersResult, RenderTile } from '../api';
import type { AnalyticsCompare, AsoAuditView, DeclarationsResult, ListingText, PpoStatus, PriceRowData, PricesCurrent, PricesDiff, RendersResult, RenderTile } from '../api';
const HOME = '/home/you';
const NOW = Date.now();
@ -200,3 +200,38 @@ function analytics(days: number, seed: number): AnalyticsCompare {
return { snapshots: Math.ceil(days / 28) + 1, since: day(days), series: { apple, play }, effects };
}
export const ANALYTICS: Record<string, AnalyticsCompare | null> = { 'p-prism': analytics(56, 1), 'p-tidy': null };
// ---- aso.audit: `aso audit --json` of the demo apps (made up: four rank snapshots two weeks apart) ----
function asoAudit(withRanks: boolean): AsoAuditView {
const dates = [day(42), day(28), day(14), day(0)];
const series = [
{ storefront: 'us', keyword: 'match', ranks: [48, 39, 31, 24] },
{ storefront: 'us', keyword: 'puzzle', ranks: [88, 92, 71, 66] },
{ storefront: 'us', keyword: 'tiles', ranks: [null, 140, 118, 121] },
{ storefront: 'us', keyword: 'offline', ranks: [null, null, null, null] },
];
const rows = series.map(x => {
const rank = x.ranks.at(-1) ?? null, previous = x.ranks.at(-2) ?? null;
const known = x.ranks.filter((v): v is number => v !== null);
return { storefront: x.storefront, keyword: x.keyword, rank, previous, change: rank !== null && previous !== null ? previous - rank : null,
arrow: rank === null ? '·' as const : previous === null ? 'new' as const : rank < previous ? '↑' as const : rank > previous ? '↓' as const : '→' as const,
best: known.length ? Math.min(...known) : null, snapshots: x.ranks.length };
});
return {
generated: day(0),
keywordField: { errors: 0, warnings: 1, hints: 2, findings: [{ level: 'warn', where: 'apple en-US', msg: 'keywords: 71/100 bytes used; fill at least 90 (29 bytes free)' }] },
drafts: [],
ranks: withRanks ? { snapshots: 4, latest: day(0), rows, dates, series } : { snapshots: 0, latest: null, rows: [], dates: [], series: [] },
competitors: withRanks ? { date: day(3), gaps: [{ storefront: 'us', locale: 'en-US', gaps: [{ word: 'blast', apps: 4, developers: 3 }, { word: 'block', apps: 3, developers: 3 }] }] } : { date: null, gaps: [] },
experiments: [{ store: 'apple', what: 'first screenshot caption', why: 'the first screenshot is what search results show', how: 'storebound apple ppo create --variant b --dry' }],
next: withRanks ? [
{ what: 'fill the keyword field of en-US (71/100 bytes used)', why: 'unused bytes are unused search reach', command: 'storebound aso suggest --locale en-US' },
{ what: 'consider "blast", "block" for en-US (in the names of 3 developers\' top apps)', why: 'words the top apps lead with; only if they describe your app', command: 'storebound aso suggest --locale en-US' },
{ what: 'look at the keywords that dropped: us "tiles" 118 -> 121', why: 'a drop after a listing change is the signal to revert or adjust it' },
] : [
{ what: 'take a first rank snapshot', why: 'trends need a baseline before the next listing change', command: 'storebound aso rank --dry, then storebound aso rank' },
{ what: 'read the competitors for your keywords', why: 'coverage gaps and suggest need the top apps per term', command: 'storebound aso competitors --dry, then storebound aso competitors' },
],
};
}
export const ASO: Record<string, AsoAuditView> = { 'p-prism': asoAudit(true), 'p-tidy': asoAudit(false) };

View file

@ -7,7 +7,7 @@ import { type Account, type AccountCheck, type ConsoleFillResult, type ConsoleFo
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, ScanResult } from '../lib/model';
import { ANALYTICS, DECLARATIONS, LISTING_TEXT, PPO, PPO_STORE, PRICE_DIFF, PRICES, renderArt, RENDERS } from './fixtures-more';
import { ANALYTICS, ASO, DECLARATIONS, LISTING_TEXT, PPO, PPO_STORE, PRICE_DIFF, PRICES, renderArt, RENDERS } from './fixtures-more';
export const FIXTURE_MARKER = 'storebound-dev-fixtures';
@ -438,6 +438,7 @@ function read(method: string, id: string, args: Record<string, unknown> = {}): T
case 'prices.diff': return ok(method, PRICE_DIFF[id]);
case 'apple.ppo_status': return ok(method, PPO[id]);
case 'analytics.compare': return ANALYTICS[id] ? ok(method, ANALYTICS[id]) : { method, ok: false, exitCode: 1, dryRun: false, command: 'storebound analytics compare --json', output: `error: no snapshots in ${HOME}/apps/tidy-lists/.storebound/analytics (storebound analytics snapshot)` };
case 'aso.audit': return ASO[id] ? ok(method, ASO[id]) : { method, ok: false, exitCode: 1, dryRun: false, command: 'storebound aso audit --json', output: 'fixture: no data for aso.audit' };
case 'check': return { method, ok: true, exitCode: 0, dryRun: false, command: 'storebound check', output: '12:00:01 [check] config ok: storebound.config.ts\n12:00:01 [check] listing: 4 languages\n12:00:01 [check] 0 problems, 2 warnings' };
default: return { method, ok: false, exitCode: 1, dryRun: false, command: `storebound ${method}`, output: `fixture: no data for ${method}` };
}