storebound/apps/desktop/tests/fixtures/state/d3-full.host.json
CRT bd3ab20e1d Desktop: never a blank window (frozen-prototype fix, error screens, logs, state migration, boot check)
The signed release showed only its background colour and never started the sidecar. Tauri's freezePrototype
freezes Object.prototype before the bundle runs; d3-color and d3-format (under the visx charts) assign
`constructor` / `toString` on plain objects while loading, which throws on a frozen prototype, so the bundle
stopped before React drew anything. The saved state was not the cause.

- build/freeze-safe.ts: Vite plugin that rewrites those assignments in dependencies into a helper that defines
  the property when the frozen prototype would refuse it
- error boundaries for the window, each screen and each app tab (Copy details, Reload, Reset saved state with a
  backup); public/boot.js shows the same panel when the bundle fails or the window stays empty
- logs/host.log (start, saved state, sidecar start/stop, panics) and logs/webview.log (log_webview), rotated,
  home as ~, keys, tokens and e-mail addresses replaced
- state.json `version` 2 with an explicit 1 -> 2 migration (original kept as state.json.v1.bak), per-entry
  tolerant parsing, partial settings keep their fields, unreadable files kept aside
- folders that are gone: "Folder not found" with Locate... (project_locate) / Remove; portfolio reads skip them
- tools/desktop-boot-check.ts: the built window with the release CSP and the frozen prototype, a mocked host from
  the state fixtures (empty, D1 with folders gone, D3) and the real sidecar, through every screen; in bun run ci,
  the Forgejo CI workflow and the macOS release
2026-10-11 09:36:34 +08:00

92 lines
1.9 KiB
JSON

{
"accounts_list": [
{
"created": "2026-10-01T00:00:00Z",
"id": "0123456789abcdef",
"kind": "play",
"label": "Example Games Play",
"studio": "s1"
},
{
"created": "2026-10-01T00:00:00Z",
"id": "fedcba9876543210",
"kind": "apple",
"label": "Example Games App Store",
"studio": "s1"
},
{
"created": "2026-10-03T00:00:00Z",
"id": "00112233445566ff",
"kind": "apple",
"label": "Side project",
"studio": null
}
],
"projects_list": [
{
"added": "2026-10-01T00:00:00Z",
"appleAccount": "fedcba9876543210",
"id": "p0game0000000001",
"name": "demo-game",
"path": "@EXAMPLES@/demo-game",
"playAccount": "0123456789abcdef"
},
{
"added": "2026-10-02T00:00:00Z",
"appleAccount": null,
"id": "p0gone0000000002",
"name": "Runner",
"path": "/nonexistent/games/runner",
"playAccount": "0123456789abcdef"
}
],
"workspace_get": {
"overrides": {
"appStudio": [
{
"key": "project:p0gone0000000002",
"studio": "s2"
}
],
"ignored": [
"account:00112233445566ff"
],
"links": [],
"pairs": [],
"unpairs": []
},
"settings": {
"cache": {
"keepDays": 30
},
"channel": "stable",
"notify": {
"crash": true,
"lowReviews": true,
"reviewState": true
},
"refresh": {
"autoMinutes": 0,
"icons": true,
"onLaunch": false,
"parallel": 4
}
},
"studios": [
{
"color": "emerald",
"created": "2026-10-01T00:00:00Z",
"id": "s1",
"logo": null,
"name": "Example Games"
},
{
"color": "violet",
"created": "2026-10-02T00:00:00Z",
"id": "s2",
"logo": null,
"name": "Example Labs"
}
]
}
}