# Milionář account — the addon side (plan of record)

Created: 2026-11-06
Updated: 2026-11-09 (K10: the account bar lasts until titles and Pro tebe are in, 2.1.143)
Status: **done** — released (2.1.132–2.1.135; 2.1.135 = the merge at sign-in, A12) and accepted by Standa 2026-11-07. Since 2.1.136 (2026-11-07) the account server is the Hub (S29, WEB `docs/plan/hub-release/README.md`). Next: bugs and
stability from his testing.

The addon signs in to the user's account of the Milionář web app and keeps everything of the user in sync with the
web and with other Kodi devices (keys, logins, library, watch state, onboarding, Pro tebe, MyTV, MyCinema, histories,
preferences). Without an account the addon works exactly as today.

## The master plan is in the web workspace

`/Users/chudy/Documents/Projector/Projects/milionar/docs/plan/account-sync/` (WEB) holds the decisions (S1–S27, T…),
the data inventory, the architecture, **the protocol (contract)**, the phases A00–A11 with their steps, the testing
plan and **the only status board** (`11-status.md`). This folder describes how the Kodi side is built; the steps that
build it are in WEB `phases/A01`, `A05`–`A10`.

Read first: WEB `README.md`, `01-decisions.md`, `11-status.md`, `03-architecture.md`, `04-protocol.md`; then the
chapter here that the step names.

| Chapter | What |
|---|---|
| [010-cleanup.md](010-cleanup.md) | removal of the migration from old versions, the mirror into Kodi's video library, Kráska and StreamCinema (A01) |
| [020-account-core.md](020-account-core.md) | `wcs/account/`: client, outbox, hooks, document and settings trackers, apply, worker, threading (A05) |
| [030-switch.md](030-switch.md) | sign-in / sign-out / remote sign-out: journal, staging, backup set, refresh without restart (A06) |
| [040-ui.md](040-ui.md) | onboarding account step with QR, skip logic, settings category, menu 1108, key lock, reset warning (A07) |
| [050-foryou.md](050-foryou.md) | Pro tebe from the server with the local fallback (A08) |
| [060-testing.md](060-testing.md) | addon tests, account harness, simulator, isolated Kodis, live Kodi with backup, performance (A09, A10) |
| [900-decisions.md](900-decisions.md) | pointer to the master decisions + addon-only technical decisions |

## Rules for an agent here

1. The addon's `AGENTS.md` applies in full (live Kodi, isolated installs, TV only on request, release only on
   request, GUI thread rules, generators for skin XML, texts cs/sk/en, targeted tests one file at a time).
2. Standa lifted "read-only" for this project (S9): the agent may change this workspace as the steps require.
3. Performance rules of the addon are hard requirements: the sync never blocks Home, a plugin call or a section;
   background work steps aside (`wcs/skin/userfirst.py`); a remote change redraws only its title's cards; every
   network call has a timeout; the service's threads end within 1 s of Kodi's abort.
4. Results go into the WEB phase file of the step and WEB `11-status.md`; chapters here get a short "Result" note.
5. Communicate with Standa in Czech, briefly; repository text in English.
