Desktop D2 UI: design system, portfolio, release timeline, catalog parity, listings, health, reviews, TestFlight, checks, command palette, toasts, first-run guide, en + tr with i18n check, 7:1 theme check, dev fixture mode and screenshot harness

This commit is contained in:
CRTkafa 2026-10-10 19:34:47 +00:00
parent 7388c8ab37
commit 33e2101d27
44 changed files with 5475 additions and 742 deletions

View file

@ -32,6 +32,35 @@ Types of the protocol: `cli/lib/desktop-protocol.ts`; pure portfolio logic: `cli
- Store keys (Play service account JSON, App Store Connect key id, issuer id and .p8) are picked in native dialogs,
stored in the OS keychain (`keyring`), never shown again and passed to the sidecar per call in memory only.
## Screens and data (D2)
- **Portfolio**: KPIs (apps, live versions, rolling out, in review, needs attention), one row per app with the version
reaching users on each store and its place on the track (build, testing, review, live, rollout %), the next
version, the last saved crash rate as a sparkline, catalog parity and the config check; then a "needs attention"
list (problems first, then warnings, store read errors, rejected or halted releases, catalog drift, health near a
threshold).
- **App**: Releases (release timeline, both stores on one track per version; iOS phased release day and share from
`apple status --json`), Catalog (parity matrix from `catalog.diff`: matches, differs, missing, not sold there, not
compared; price gaps per region), Listings (`project.listings`: per language and store, fields against the limits,
rendered screenshots), Health (`health`: daily user-perceived crash and ANR rate against the Play thresholds,
worst devices, top issues, App Store metrics and signatures), Reviews (`reviews.list` + `reviews.drafts`: star
distribution, filters, the local draft with its send checks, Approve via `reviews.approve`), TestFlight
(`apple.testflight_status`), Checks (offline `check` + `validate` with fix hints).
- **First-run guide**: what the app does, add or start an app folder (`project.init` = `storebound init --profile`,
confirmed in a native dialog), store keys into the keychain and which app uses which, local tools, first read.
- **Command palette** (Cmd/Ctrl+K): apps, tabs, screens and actions. Cmd/Ctrl+1 Portfolio, +2-5 workspace screens,
Cmd/Ctrl+Shift+[ ] app tabs, arrow keys in the tab list. Toasts show background jobs with progress and Cancel.
- **Unknown, never false.** Store reads run on demand (they use the account's API quota) and are saved in app data
(`cache.sqlite`, results only, never keys); a screen opens with the saved read and its time ("Last read 3 h ago,
saved copy"), a failed read keeps the previous one and says so, and nothing that was not read is shown as fine.
Settings clears the saved reads.
- **Jobs.** The window tags a call with a job id; the host maps sidecar request ids to it, so progress lines reach the
right toast, and `job_cancel` sends `$/cancelRequest` (or stops a download). Live portfolio reads run up to four
apps at a time with their own accounts and report n / total.
- **i18n**: English and Turkish (`src/i18n`), Settings picks the language (default: the system's); `tools/i18n-check.ts`
(CI) checks keys, empty messages and placeholders. **Theme**: text tokens keep 7:1 contrast in both themes
(`tests/theme.test.ts`), motion at most 200 ms and off with reduced motion.
## Dependencies screen
storebound needs no local tool for store work. Screenshots, app previews, icons and captures use:
@ -49,14 +78,21 @@ copies to the sidecar: `STOREBOUND_TOOL_PATH` (app data `tools/bin`, put in fron
`STOREBOUND_CHROME` (app data `tools/chrome/...`, used as Playwright's `executablePath`). Nothing is installed
system-wide and nothing is bundled in the installer.
Download sources (decided; the one-click download lands in the next desktop phase):
`storebound doctor` prints the same detection (plus playwright) with the install commands for the OS.
Download sources (one click on the Dependencies screen or in the first-run guide; `src-tauri/src/downloads.rs`):
- **ffmpeg, macOS (arm64, x64):** release builds from ffmpeg.martin-riedl.de (static, notarized zip per tool).
- **ffmpeg, Linux (x64, arm64) and Windows (x64):** `ffmpeg-n<major>-latest-<os>-gpl` release builds from
github.com/BtbN/FFmpeg-Builds.
- **Verification:** the app ships a manifest with the exact URL and SHA-256 of each archive, updated with each
desktop release; a download whose hash differs is deleted. The publisher's own checksum files are not trusted on
their own (same host as the archive).
- **Verification:** the app ships a manifest (`src-tauri/tools-manifest.json`, written by `bun tools/tools-manifest.ts`
before each desktop release, `--check` tests the URLs) with the exact URL, size and SHA-256 of each archive; a
download whose hash differs is deleted. Every pinned hash has two independent sources: macOS archives are
downloaded and hashed by the tool and must equal the publisher's `.sha256`; BtbN archives (pinned autobuild tag)
use the digest GitHub computes for the release asset, which must equal the publisher's `checksums.sha256`.
Downloads and their redirects may only use HTTPS and the hosts in `downloads::DOWNLOAD_HOSTS`. Everything is
unpacked and checked in a staging folder; only a verified result replaces the installed copy, and the sidecar
restarts so it sees the new tool.
- **License:** these ffmpeg builds are GPL (v3 for the BtbN `gpl` variants). The app downloads them only on the
owner's click, from the original publisher, shows the license and the source link next to the button, and never
redistributes them, so the app itself stays MIT.
@ -77,8 +113,16 @@ cd apps/desktop && bunx tauri dev # Vite on 127.0.0.1:1420 + the Rust ho
cd apps/desktop/src-tauri && cargo test && cargo clippy --all-targets -- -D warnings
```
Dev-only switches (ignored in release builds): `VITE_START=accounts|app:catalog|...` opens a screen first,
`VITE_THEME=light|dark` forces the theme, `VITE_AUTORUN=gallery` starts the confirm flow on the first app.
Dev-only switches (ignored in release builds): `VITE_START=accounts|app:catalog|app:health:2|welcome:3|palette|...`
opens a screen first, `VITE_THEME=light|dark` and `VITE_LANG=en|tr` force theme and language, `VITE_AUTORUN=gallery`
starts the confirm flow on the first app (the same names work as `?start=...&theme=...` query parameters on the Vite
server). `STOREBOUND_DEV_PROJECTS=<dir>:<dir>` (debug builds) seeds the app folder list.
Fixture mode (dev builds only): `VITE_FIXTURES=1` answers every app command from `src/dev/fixtures.ts` (made-up
store data around the two demo apps; `=empty` for a first run, `=cold` for nothing read yet). The window shows a
"DEV FIXTURES" badge; release bundles do not contain it (`tests/webview.test.ts` checks `dist/`). Screenshots of
every screen in both themes: `VITE_FIXTURES=1 bunx vite --port 1431 &` then
`bun scripts/screens.ts --base http://127.0.0.1:1431 --out <dir>` (playwright with the installed Chrome).
Gotchas kept from earlier Tauri apps: Cmd+Q quits and the Window menu keeps an entry for the hidden window; platform
configs (`tauri.<os>.conf.json`) must not set `app.windows` (Tauri replaces the whole array); Linux sets
`WEBKIT_DISABLE_DMABUF_RENDERER=1` unless the user set it; a `bun build --compile` binary needs an ad-hoc re-sign on