[2026-05-28] add Lutris login workaround plan to wiki/htpc-bazzite-proton.md

This commit is contained in:
Alexey Martemyanov
2026-05-28 17:00:48 +06:00
parent 78f4ace5b8
commit 5be9b5c747
3 changed files with 78 additions and 6 deletions
@@ -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.
+25
View File
@@ -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
+8 -6
View File
@@ -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._