From 9d638fb91967fea8573930771b7c7590150978a2 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 22 Aug 2026 16:17:06 +0200 Subject: [PATCH] Seed a Firebase session for todo as well todo used to be grouped with the Flutter-only apps that authenticate in-app on the phone and therefore need no desktop session. That stopped being true when it grew a desktop wrapper (lib/desktop/wrapper_server.dart) with its own Firebase REST client, which needs a seeded session exactly like the Python daemons do. Both files the new comment cites were confirmed present today. The credential cache at ~/.config/todo/firebase_auth.json has the same shape as every other entry -- FirebaseCredentials.fromJson in crdt_sync_dart parses the same {id_token, refresh_token, expires_at} that credential_store_for writes -- so the only thing that was missing is the DEFAULT_APPS entry. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG --- crdt-sync/tool/seed_session.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crdt-sync/tool/seed_session.py b/crdt-sync/tool/seed_session.py index 3bb08fb..bc4efd1 100644 --- a/crdt-sync/tool/seed_session.py +++ b/crdt-sync/tool/seed_session.py @@ -49,8 +49,16 @@ from tool.google_id_token import TokenError, fetch_id_token # discovered from ~/.config, because a missing directory is exactly the case # that needs seeding -- discovery would skip the app that needs this most. # -# The Flutter-only apps (todo, home_inventory, workout_app) are absent on +# The remaining Flutter-only apps (home_inventory, workout_app) are absent on # purpose: they authenticate in-app on the phone and have no desktop session. +# `todo` used to be grouped with them, but it grew a real desktop wrapper +# (lib/desktop/wrapper_server.dart) with its own Firebase REST client that +# needs a session exactly like the Python daemons do -- see +# lib/sync/firebase_backend.dart and lib/desktop/wrapper_server.dart in +# ~/todo. Its credential cache lives at ~/.config/todo/firebase_auth.json, +# same shape as every entry below, even though the reader is Dart, not +# Python: FirebaseCredentials.fromJson in crdt_sync_dart parses the exact +# {id_token, refresh_token, expires_at} shape credential_store_for writes. # # Re-derive rather than guess when adding one; a repo-by-repo sweep missed two # of these. Grep all of ~ for the string literal passed to firebase_client_for, @@ -64,6 +72,7 @@ DEFAULT_APPS = ( "screen_locker", "byox_ladder", "leetcode_guard", + "todo", ) # A fixed default so the redirect URI is stable enough to register once on the