egutierrez
|
23c933bfa2
|
feat: persist last user + diagnostics + logging + icon + defensive whoami
Backend:
- last_user.go: writes/reads <UserConfigDir>/matrix_client_pc/last_user.txt.
Login persists; Logout clears.
- GetLastUserID bind replaces fragile localStorage in App.tsx.
- GetDiagnostics bind: live snapshot (started, client_ready, crypto_init,
sync_active, rooms_count, encrypted_rooms, dms_count, last_error).
- applog.go: slog to stderr + <UserConfigDir>/matrix_client_pc/app.log.
GetLogTail + GetLogPath binds.
- matrix_service.go logs throughout Login/Start. After MatrixClientInit,
if client.DeviceID empty -> retry whoami + persist back (defensive).
- main.go inits logger before wails.Run, OnShutdown logs close.
Frontend:
- App.tsx awaits GetLastUserID() instead of localStorage.
- HomeScreen.tsx Health modal (green stethoscope button) with HealthRow
status dots — comprobar chats.
- Auto-relogin on token-rejected error in Start().
Icon:
- appicon.ico (Phosphor chat-circle + #7c3aed) generated via generate_app_icon.
- build/windows/icon.ico replaced (Wails embeds via windres).
- build/appicon.png regenerated from ico (256x256).
Refs: issues 0147 + 0148 + 0150 (partial). Fixes M_UNKNOWN_TOKEN auto-recovery.
|
2026-05-25 17:20:52 +02:00 |
|