Merge remote-tracking branch 'origin/237958b2c8722ce0f87cf139d9e17988ea4d075c' into 237958b2c8

This commit is contained in:
alex phone S25
2026-05-28 18:34:57 +06:00
4 changed files with 126 additions and 9 deletions
+21 -2
View File
@@ -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 — дублирование нарратора
@@ -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.
+47
View File
@@ -128,6 +128,53 @@ 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.
### 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:
```
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
+13 -7
View File
@@ -1,19 +1,25 @@
## Inbox Triage — 2026-05-28 (since 2026-05-28 15:32)
## Inbox Triage — 2026-05-28 (since 2026-05-28 17:05)
### Nothing new
Inbox quiet — nothing new requiring action.
**What I checked (window: 15:32 → 15:54 local, ~22 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)
**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
**Excluded (automated/bot, per scope filter):**
- Dax the Duck enrollment digest on NA Analysis — informational only, no human signal.
**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=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=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 extended through 17:00. This run picks up the 17:05 → 17:35 window. Sync was at 17:35; window covered by last sync.*