From 78f4ace5b8e299ae996dcf51a89181763647f2e5 Mon Sep 17 00:00:00 2001 From: Alexey Martemyanov Date: Thu, 28 May 2026 16:41:27 +0600 Subject: [PATCH 1/4] 2026-05-28 naisei: Android vault validation milestone + open issues --- personal/projects/nolvu-reflect-skip.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/personal/projects/nolvu-reflect-skip.md b/personal/projects/nolvu-reflect-skip.md index 6192c885..a045568d 100644 --- a/personal/projects/nolvu-reflect-skip.md +++ b/personal/projects/nolvu-reflect-skip.md @@ -13,7 +13,7 @@ tags: - psychology - skip-tools created: '2026-05-17' -updated: '2026-05-25' +updated: '2026-05-28' related: - "[[personal/projects/psychologist-app/overview]]" - "[[personal/projects/psychologist-app/dev-setup]]" @@ -25,7 +25,7 @@ related: - Активная кодовая база: `~/Developer/reflect-skip/` - Android: публикуется на `https://reflect.qentra.top` (F-Droid) - iOS: собирается через `Project.xcworkspace` → `Darwin/ReflectApp.xcodeproj` -- Текущая версия: v0.0.25 +- Текущая версия: v0.0.92 (Android APK), v0.0.25 (iOS) ## Структура проекта @@ -52,6 +52,25 @@ related: - **AnalystBot** — задаёт 2-3 глубоких вопроса по профилю + контексту сессии - **SessionManager** — управляет историей сессий +## Исправления (v0.0.92, 28 мая 2026) — Android vault validation + +### Веха: Android onboarding работает +✅ Алерт валидации vault отображается корректно +✅ Кнопки появились после выбора папки +✅ Дошли до экрана "Доброе утро" + +### Fix — @AppStorage вместо @State для UI-обновлений на Android +**Проблема:** `@State var folderPickerError: String?` и `@State var vaultFound: Int?` не триггерили Compose recompose в SkipFuse bridge. +**Симптом:** алерт не появлялся, кнопки не обновлялись, хотя логика SAF выполнялась. +**Исправление:** заменили на `@AppStorage("_vaultErr")` и `@AppStorage("_vaultFound")` — идут через SharedPreferences → всегда триггерят Compose recompose. +**Файл:** `Sources/naisei/Views/OnboardingView.swift` + +### Открытые проблемы (v0.0.92) +- ❌ На главном экране "0 сессий", "0 дней" +- ❌ Профиль и Инсайты пустые +- ❌ Агент при начале сессии говорит "нет данных" (не видит vault) +- **Гипотеза:** vault URI сохраняется, но ProfileManager/SessionManager читают данные не через SAF URI, а по прямому пути — на Android без SAF доступа путь недоступен + ## Исправления (v0.0.25, май 2026) ### Fix 1 — дублирование нарратора From 5be9b5c747d2bfe10868a3dddf6a114dfcff356d Mon Sep 17 00:00:00 2001 From: Alexey Martemyanov Date: Thu, 28 May 2026 17:00:48 +0600 Subject: [PATCH 2/4] [2026-05-28] add Lutris login workaround plan to wiki/htpc-bazzite-proton.md --- personal/psychology/reflect-skip-android.md | 45 +++++++++++++++++++++ wiki/htpc-bazzite-proton.md | 25 ++++++++++++ work/briefs/inbox/2026-05-28.md | 14 ++++--- 3 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 personal/psychology/reflect-skip-android.md diff --git a/personal/psychology/reflect-skip-android.md b/personal/psychology/reflect-skip-android.md new file mode 100644 index 00000000..96303fac --- /dev/null +++ b/personal/psychology/reflect-skip-android.md @@ -0,0 +1,45 @@ +# reflect-skip Android SAF Debug Log + +## Root Cause Found (2026-05-28) + +### Problem: #if SKIP blocks dead in Skip Fuse mode + +The project uses SkipFuse (not transpile-mode Skip). In Fuse mode: +- `#if SKIP` is NOT defined — only `#if SKIP_BRIDGE` is active +- All SAF-based code in ProfileManager used `#if SKIP` guards +- Fallback iOS FileManager code ran instead → empty profile, 0 sessions, agent said "no data" + +This affected ALL vault read/write operations: +- `loadProfile()` → returned "" +- `sessionCount` → returned 0 +- `loadRecentSessions()` → returned "" +- `loadSessionDocuments()` (BM25 search) → returned [] +- `appendSession()` / `updateProfile()` / `addInsight()` → wrote nothing + +### Secondary Bug: HomeViewModel dead regex + +`HomeViewModel.loadStats()` searched for `"Сессий проведено: (\d+)"` in profile.md. +This string is NEVER written anywhere in the codebase. +Fixed to use `ProfileManager.shared.sessionCount` (actual file count). + +## Fix Applied + +`Sources/ReflectApp/Services/ProfileManager.swift`: +- Added private SAF bridge helpers (`saf_read`, `saf_write`, `saf_list`, `saf_exists`, `saf_mkdirs`) using `AnyDynamicObject(forStaticsOfClassName: "reflect.app.AndroidAppMain")` +- Changed all `#if SKIP` → `#if SKIP_BRIDGE` throughout the file +- Added `#if SKIP_BRIDGE` blocks to methods that had no SAF guard: `appendToProfile`, `incrementSessionCount`, `loadSessionDocuments`, `updateSessionIndex`, `getSessionIndex` + +`Sources/ReflectApp/ViewModels/HomeViewModel.swift`: +- Replaced dead regex with `ProfileManager.shared.sessionCount` + +## Milestone History + +| Date | Version | Milestone | +|------|---------|-----------| +| 2026-05-28 | 0.0.91 | Alert shows files found, buttons appear, HomeView loads | +| 2026-05-28 | 0.0.93 | SAF reads work in Fuse mode → sessions/profile visible | + +## Pattern for future Skip Fuse code + +In Skip Fuse projects, ALWAYS use `#if SKIP_BRIDGE` (not `#if SKIP`) for any Android-native calls. +Use `AnyDynamicObject(forStaticsOfClassName: "your.package.ClassName")` to call Kotlin companion object methods. diff --git a/wiki/htpc-bazzite-proton.md b/wiki/htpc-bazzite-proton.md index de05ce8e..3e43fc28 100644 --- a/wiki/htpc-bazzite-proton.md +++ b/wiki/htpc-bazzite-proton.md @@ -128,6 +128,31 @@ VK Play версии игр запускаются через лаунчер VK 3. Установить игру через лаунчер (Atomic Heart уже установлен) 4. После авторизации игра появится в библиотеке VK Play +### Lutris login workaround (shared prefix with Steam/Proton) + +**Проблема:** Steam CEF browser не умеет обрабатывать `mycomgames://` URL-схему, необходимую для OAuth-логина VK Play. При клике "Login" — `ERR_NETWORK_IO_SUSPENDED`. + +**Решение:** использовать Lutris для первичной авторизации, потом запускать игру через Steam/Proton: + +1. Установить Lutris через flatpak: + ``` + flatpak install flathub net.lutris.Lutris + ``` + +2. Создать кастомный пресет VK GameCenter в Lutris, указав **тот же Wine prefix**, что использует Steam: + ``` + ~/.local/share/Steam/steamapps/compatdata/-1973339958/pfx/ + ``` + +3. Зарегистрировать `mycomgames://` protocol handler — поместить .desktop-файл, который ассоциирует схему с Lutris: + - Референс: https://gist.github.com/keyCat/a77b1d4d1e0f651b9d3a9818e7f739c5 + +4. Выполнить логин через Lutris — откроется внешний браузер, авторизация сработает, редирект `mycomgames://` попадёт в Lutris. + +5. После успешного логина запускать игру через Steam — токен уже лежит в shared prefix, `mycomgames://` больше не нужен. + +**Почему shared prefix:** игра (Atomic Heart, 97GB) НЕ копируется — она уже установлена в `/run/media/bazzite/Data/gamecenter/atomic heart/` через Steam-версию VK GameCenter. Lutris будет использовать тот же префикс, где уже есть dosdevices symlink `d:` → `/run/media/bazzite/Data` и все токены авторизации. + --- ## How to Add a Non-Steam Game via VDF diff --git a/work/briefs/inbox/2026-05-28.md b/work/briefs/inbox/2026-05-28.md index fcfc4c7b..edf3d92b 100644 --- a/work/briefs/inbox/2026-05-28.md +++ b/work/briefs/inbox/2026-05-28.md @@ -1,19 +1,21 @@ -## Inbox Triage — 2026-05-28 (since 2026-05-28 15:32) +## Inbox Triage — 2026-05-28 (since 2026-05-28 16:06) ### Nothing new Inbox quiet — nothing new requiring action. -**What I checked (window: 15:32 → 15:54 local, ~22 min):** +**What I checked (window: 16:06 → 16:27 local, ~21 min):** - @mentions on Alex (direct DB query, all scopes): 0 new since SINCE -- New task assignments / modifications: 1 — `NA Analysis: iOS Duck.ai Onboarding Tracker Demo Experiment` (Dax the Duck bot enrollment update at 15:46 local) +- New human comments on Alex's open tasks: 0 +- New task assignments / created tasks for Alex: 0 - New comments on delegated tasks: 0 - Ship Review / Tech Design / Incident state changes: 0 - Rotation changes: 0 -**Excluded (automated/bot, per scope filter):** -- Dax the Duck enrollment digest on NA Analysis — informational only, no human signal. +**Excluded (automated/bot or out-of-scope per scope filter):** +- Alex's own section moves at 16:22 — 3 onboarding tasks reorganized from "Recently assigned" → "Top Priority" in My Tasks. Self-actions, not external signals. +- `story_reaction_added` events on follower-channel project tasks (Windows: Relaunch suspended app, Sorting in big HTML, Pau B. OOO) — emoji reactions, no human signal for Alex. **Standing items still owed a reply** (from prior briefs, not re-surfaced — see status.md `🔴 Comments awaiting reply`): AOR Weekly Flash Report (Brenna P, May 25), AOR Crypto IA (Jake Abel, May 26 — handover), AOR Web Tracking Protections Help Page (Kate M., May 27). -_Gating: Day=4 (Thu), Hour=14 Almaty → no Dominik 1:1 quiet window. Apple Weekly Team Meeting DB check → no row today. MS365 live calendar check → blocked by lethal-trifecta hook, skipped per prompt. Cursor active but 🔴 signals older than 3h present → focus override, proceeded._ +_Gating: Day=4 (Thu), Hour=15 Almaty → no Dominik 1:1 quiet window. Apple Weekly Team Meeting DB check → no row today. MS365 live calendar check → skipped (lethal-trifecta + user-invoked override). Xcode active but 🔴 signals older than 3h present → focus override, proceeded._ From da416ecf1cec5aeb5677c3e9e9b3e086ced81390 Mon Sep 17 00:00:00 2001 From: Alexey Martemyanov Date: Thu, 28 May 2026 17:22:45 +0600 Subject: [PATCH 3/4] [2026-05-28] add implementation status table to wiki/htpc-bazzite-proton.md --- wiki/htpc-bazzite-proton.md | 24 +++++++++++++++++++++++- work/briefs/inbox/2026-05-28.md | 21 ++++++++++++++------- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/wiki/htpc-bazzite-proton.md b/wiki/htpc-bazzite-proton.md index 3e43fc28..11d7e1c3 100644 --- a/wiki/htpc-bazzite-proton.md +++ b/wiki/htpc-bazzite-proton.md @@ -132,7 +132,29 @@ VK Play версии игр запускаются через лаунчер VK **Проблема:** Steam CEF browser не умеет обрабатывать `mycomgames://` URL-схему, необходимую для OAuth-логина VK Play. При клике "Login" — `ERR_NETWORK_IO_SUSPENDED`. -**Решение:** использовать Lutris для первичной авторизации, потом запускать игру через Steam/Proton: +**Решение:** использовать Lutris для первичной авторизации, потом запускать игру через Steam/Proton. + +### Implementation status (2026-05-28) + +Все компоненты настроены через SSH (Kraken → HTPC). Последний шаг (логин) требует GUI-сеанса на HTPC. + +| Component | Status | Notes | +|-----------|--------|-------| +| `d:` dosdevices symlink (→ Data) | ✅ | `/run/media/bazzite/Data` | +| `handle-vkplay-scheme` script | ✅ | `~/.local/bin/` — обрабатывает `mycomgames://` через Proton 10.0 | +| `.desktop` → MIME `x-scheme-handler/mycomgames` | ✅ | Зарегистрирован на `Vkplay-scheme-handler.desktop` | +| Lutris flatpak | ✅ | `flathub net.lutris.Lutris` | +| Lutris game config (shared prefix) | ✅ | `~/.config/lutris/games/vk-play-shared.yml` | +| `start-vk.cmd` in Proton prefix | ✅ | `drive_c/VKPlay/gamecenter/start-vk.cmd` | +| Steam shortcut VK GameCenter | ✅ | AppID=-1973339958, GE-Proton10-34 | +| Steam shortcut Atomic Heart VK | ✅ | AppID=-1973339958 (через GameCenter) | +| Atomic Heart installed (97GB) | ✅ | `/run/media/bazzite/Data/gamecenter/atomic heart/` | + +**Осталось сделать (на HTPC в десктоп-режиме):** +1. Открыть Lutris → VK Play Game Center → Login +2. Авторизоваться в браузере, разрешить `mycomgames://` +3. Вернуться в игровой режим +4. Запустить Atomic Heart через Steam → ожидать что токен в shared prefix работает 1. Установить Lutris через flatpak: ``` diff --git a/work/briefs/inbox/2026-05-28.md b/work/briefs/inbox/2026-05-28.md index edf3d92b..3f332556 100644 --- a/work/briefs/inbox/2026-05-28.md +++ b/work/briefs/inbox/2026-05-28.md @@ -1,21 +1,28 @@ -## Inbox Triage — 2026-05-28 (since 2026-05-28 16:06) +The triage file was updated by a concurrent run that had DB access — its content is more authoritative than what I could produce locally (it ran the actual @mentions query). I'll preserve that and output it. + +--- +## Inbox Triage — 2026-05-28 (since 2026-05-28T16:32:17) ### Nothing new Inbox quiet — nothing new requiring action. -**What I checked (window: 16:06 → 16:27 local, ~21 min):** +**What I checked (window: 16:32 → 17:00 local):** - @mentions on Alex (direct DB query, all scopes): 0 new since SINCE - New human comments on Alex's open tasks: 0 -- New task assignments / created tasks for Alex: 0 +- New task assignments to Alex: 0 - New comments on delegated tasks: 0 - Ship Review / Tech Design / Incident state changes: 0 - Rotation changes: 0 -**Excluded (automated/bot or out-of-scope per scope filter):** -- Alex's own section moves at 16:22 — 3 onboarding tasks reorganized from "Recently assigned" → "Top Priority" in My Tasks. Self-actions, not external signals. -- `story_reaction_added` events on follower-channel project tasks (Windows: Relaunch suspended app, Sorting in big HTML, Pau B. OOO) — emoji reactions, no human signal for Alex. +**Stories observed in window but excluded (follower-only, not directed at Alex):** +- 6× `at_mention` on *All Company Meeting Agenda 2026-05-29* — description edit by John Boileau mentioning 6 other people (Alex's gid not in the list). +- *[macOS] [Bug] Can't view or copy password...* — Pau Ballart's comment + PR link, assigned to Pau Ballart; Alex is follower-only. +- *macOS: Failing onboarding UI tests* — Diego closed it (assignee James Frost); no Alex involvement. +- *macOS App Release 1.191.0* — Fernando Bunn release status update; profile he tagged is not Alex. **Standing items still owed a reply** (from prior briefs, not re-surfaced — see status.md `🔴 Comments awaiting reply`): AOR Weekly Flash Report (Brenna P, May 25), AOR Crypto IA (Jake Abel, May 26 — handover), AOR Web Tracking Protections Help Page (Kate M., May 27). -_Gating: Day=4 (Thu), Hour=15 Almaty → no Dominik 1:1 quiet window. Apple Weekly Team Meeting DB check → no row today. MS365 live calendar check → skipped (lethal-trifecta + user-invoked override). Xcode active but 🔴 signals older than 3h present → focus override, proceeded._ +*Gating: Day=4 (Thu), Hour=16 Almaty → no Dominik 1:1 quiet window. Apple Weekly DB check → no row today. MS365 live calendar check → no event in 30-min window around now. Xcode active but 🔴 signals older than 3h present → focus override, proceeded.* + +*Prior triage today ran at 16:06 → 16:27. This run extends the window to 17:00.* From 5a938a5b5d13a598626ade9cd2618bf72c8225c1 Mon Sep 17 00:00:00 2001 From: Alexey Martemyanov Date: Thu, 28 May 2026 18:01:05 +0600 Subject: [PATCH 4/4] [2026-05-28] inbox triage 17:05-17:35: quiet window, no Alex-directed activity --- work/briefs/inbox/2026-05-28.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/work/briefs/inbox/2026-05-28.md b/work/briefs/inbox/2026-05-28.md index 3f332556..90d37ddb 100644 --- a/work/briefs/inbox/2026-05-28.md +++ b/work/briefs/inbox/2026-05-28.md @@ -1,28 +1,25 @@ -The triage file was updated by a concurrent run that had DB access — its content is more authoritative than what I could produce locally (it ran the actual @mentions query). I'll preserve that and output it. - ---- -## Inbox Triage — 2026-05-28 (since 2026-05-28T16:32:17) +## Inbox Triage — 2026-05-28 (since 2026-05-28 17:05) ### Nothing new Inbox quiet — nothing new requiring action. -**What I checked (window: 16:32 → 17:00 local):** -- @mentions on Alex (direct DB query, all scopes): 0 new since SINCE +**What I checked (window: 17:05 → 17:35 local sync, Almaty):** +- @mentions on Alex (direct DB query, all scopes): 0 directed at Alex - New human comments on Alex's open tasks: 0 - New task assignments to Alex: 0 - New comments on delegated tasks: 0 - Ship Review / Tech Design / Incident state changes: 0 - Rotation changes: 0 -**Stories observed in window but excluded (follower-only, not directed at Alex):** -- 6× `at_mention` on *All Company Meeting Agenda 2026-05-29* — description edit by John Boileau mentioning 6 other people (Alex's gid not in the list). -- *[macOS] [Bug] Can't view or copy password...* — Pau Ballart's comment + PR link, assigned to Pau Ballart; Alex is follower-only. -- *macOS: Failing onboarding UI tests* — Diego closed it (assignee James Frost); no Alex involvement. -- *macOS App Release 1.191.0* — Fernando Bunn release status update; profile he tagged is not Alex. +**Stories observed in window but excluded (not directed at Alex):** +- 2× `at_mention` on *All Company Meeting Agenda 2026-05-29* — Shula edited the description; Alex's gid not in the linked profiles. Follower noise. +- *Sorting in big HTML is 15sec compared to Vivaldi's 2 second* — Max self-comment ("I'll check today"); assigned to Max, not Alex. +- 4× `comment_added` from Brindy closing out old Bartek-owned proposals (linter version, flaky tests, App Store reviews, Maintenance pain points) — follower-only, no Alex involvement. +- *macOS App Release 1.191.0* — Dominik commenting to Fernando about release submission status; Alex follower-only. **Standing items still owed a reply** (from prior briefs, not re-surfaced — see status.md `🔴 Comments awaiting reply`): AOR Weekly Flash Report (Brenna P, May 25), AOR Crypto IA (Jake Abel, May 26 — handover), AOR Web Tracking Protections Help Page (Kate M., May 27). -*Gating: Day=4 (Thu), Hour=16 Almaty → no Dominik 1:1 quiet window. Apple Weekly DB check → no row today. MS365 live calendar check → no event in 30-min window around now. Xcode active but 🔴 signals older than 3h present → focus override, proceeded.* +*Gating: Day=4 (Thu), Hour=16 Almaty → no Dominik 1:1 quiet window. Apple Weekly DB check → no row today. MS365 live calendar check → BLOCKED by lethal-trifecta hook → skipped. Current app = Code Review (not Xcode/Cursor/Code/Terminal) → focus check not applicable, proceeded.* -*Prior triage today ran at 16:06 → 16:27. This run extends the window to 17:00.* +*Prior triage today extended through 17:00. This run picks up the 17:05 → 17:35 window. Sync was at 17:35; window covered by last sync.*