amber-backend/pb_migrations
Claude 57585d8ad2 Tell a new viewer what to buy before asking them to fill in a form
Someone with their own accounts had to work out on their own that Amber
needs a paid subscription somewhere before it can find anything, and
which of three services that means. The Zdroje box already turns their
usernames into addon URLs; nothing anywhere told them which usernames to
go and get, or what it would cost.

Six steps as a new #start tab: change the generated password, choose
services, create the accounts and pay, take a free TMDB key, enter it all
in Zdroje, download. Steps 1, 5 and 6 hand off to the tabs that already do
that work. This screen owns no credentials and no crypto on purpose, since
a second encryptor for one blob is how a vault gets corrupted.

The password is step 1, not step 6. Changing it re-keys the vault with a
fresh salt, so every device already signed in holds a stale key until it
authenticates again. Done first, while the vault is empty, there is
nothing to re-encrypt and no paired television to strand.

State is three fields on the user record and nothing more: skipped, chosen
and pwChangedAt. Whether the sources exist is CONFIGS.length and whether
TMDB is set is a field in the decrypted config, so storing those again
would let two answers disagree. pwChangedAt is the one thing that cannot be
derived, because PocketBase records no password-changed timestamp.

Prices and click-paths live in a providers collection, editable in the
admin UI, with priceCheckedAt rendered beside the number so a stale figure
looks stale rather than reading as a promise. Owner supplied the three
signup guides; TorBox Free is called out as unusable because it has no API
access, which is the only way Amber talks to it.

byGo also stops demanding a Czech host. Nothing downstream needed one, and
someone who only wants anime was being told to buy a service they had no
use for.

Verified against PocketBase 0.39.6 from a throwaway data dir with this
repo's real migrations, hooks and page: both migrations applied clean, the
flow opened itself for a user with no sources, a choice persisted as
{"chosen":["prehrajto","torbox"]} and nothing else, guides rendered
numbered with working links, skipping raised the banner and survived a
reload, resuming came back in.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 18:36:55 +02:00
..
1752600000_init_accounts_schema.js feat: PocketBase backend + account/profile schema (epic #6, issue #9) 2026-07-15 20:22:45 +02:00
1784250000_sync_fields.js feat(schema): fields the client needs to sync watch state / watchlist / prefs 2026-07-17 16:20:38 +02:00
1785200000_addon_config.js feat(schema): encrypted addon-config collection (issue #20) 2026-07-18 02:14:40 +02:00
1786000000_device_auth.js feat(device-auth): codeless device sign-in backend (#12) 2026-07-19 14:36:15 +02:00
1786500000_releases.js Fix auto-update file gating: mark releases.file protected (#16) 2026-07-20 11:48:07 +02:00
1786500001_releases_protect_file.js Fix auto-update file gating: mark releases.file protected (#16) 2026-07-20 11:48:07 +02:00
1787000000_profile_max_rating.js Add profiles.maxRating for per-profile content tiers (#14) 2026-07-21 20:42:40 +02:00
1787500000_onboarding_template.js Family onboarding site: invite-gated signup, template config, /get/tv 2026-07-22 18:23:05 +02:00
1788000000_client_logs.js Add client_logs collection for background device diagnostics (feedback 2 §4) 2026-07-23 11:49:04 +02:00
1788500000_client_logs_flavor.js client_logs: add flavor, which PocketBase was silently discarding 2026-08-06 06:45:48 +02:00
1789000000_owner_created_accounts.js Accounts are owner-created, and one page manages the whole account 2026-08-07 01:54:25 +02:00
1789000001_users_rating_default.js Accounts are owner-created, and one page manages the whole account 2026-08-07 01:54:25 +02:00
1789500000_client_logs_tester.js client_logs.tester: mark our own sessions, not the family's 2026-08-08 20:54:12 +02:00
1790000000_client_logs_gitsha.js Dashboard: read the reports, and create accounts without the admin UI 2026-08-08 23:29:51 +02:00
1790500000_providers.js Tell a new viewer what to buy before asking them to fill in a form 2026-08-12 18:36:55 +02:00
1790500001_users_onboarding.js Tell a new viewer what to buy before asking them to fill in a form 2026-08-12 18:36:55 +02:00