## 1. Shared config model - [x] 1.1 Define `AiRuntimeConfig` types/serde on PC (Rust + TS) and iPad (Swift) - [x] 1.2 Default prompts/features and `updatedAt` bump on save ## 2. PC AI settings + secure storage - [x] 2.1 Add Tauri commands to load/save AI config with OS-secure apiKey storage - [x] 2.2 Build AI Settings UI (vendor, model, baseUrl, key, prompts, features, test connection) - [x] 2.3 Wire navigation into AppShell ## 3. LAN pairing + encrypted sync - [x] 3.1 Implement AI share server routes: pair, config (encrypted), meta, revoke - [x] 3.2 Pairing QR + session token management on PC UI - [x] 3.3 Keep course publish APIs unauthenticated and key-free ## 4. iPad sync + Keychain - [x] 4.1 AiConfigStore (Keychain) + AiConfigClient (pair/sync/version compare) - [x] 4.2 Pairing UI from child menu; offline/unavailable messaging - [x] 4.3 Resolve config helper used before any AI call ## 5. Study AI UI - [x] 5.1 Shared chat panel + OpenAI-compatible chat client (baseUrl direct-connect) - [x] 5.2 PDF rectangle selection ask on iPad (and PC if study view exists) - [x] 5.3 Audio/video in/out clip ask ## 6. Server subscription stub - [x] 6.1 Add `source: server` merge helper and disabled server sync setting - [x] 6.2 Document dual-mode path; no live billing ## 7. Verification - [x] 7.1 Smoke: save config → pair → sync → test ask; offline cache path - [x] 7.2 Mark OpenSpec tasks complete as implemented