nandi/frqpublic Fork 0
a839373
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Connect a remembered account on launch, as the desktop does

`frq.app/start!` has done this since it was written, and says why: a
remembered account has already said what it wants, and making it say so
again at every launch is a click that carries no information. The phone
restored the same session and then sat on the connect screen waiting to be
told a second time.

On a timer rather than awaited before the first frame, and for the
desktop's reason too — the connect screen with its status is what should be
on screen while it happens, so a failure lands somewhere visible instead of
in front of a window that has not been drawn.

Nothing changes for a guest: the whole thing is inside the `when-let` over
the saved session, so an install that has never signed in has nothing to
resume and still opens where it did.

Verified on a Pixel 6a: a cold launch with no taps reaches "Logged in as
nandi.uk" with the channels and their backlog.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-12T06:56:50-07:00 Browse files
a839373 parent: bc0e14f
modified flutter/src/frq/main.cljd +13 -1
@@ -589,7 +589,19 @@
589589 (when (seq (str (or (:nick saved) "")))
590590 (reset! cells/form-nick (:nick saved)))
591591 (reset! cells/auth-mode :bluesky)
592- (reset! cells/status (str "Signed in as " (:handle saved) " — Connect to resume")))
592+ (reset! cells/status (str "Signed in as " (:handle saved) "…"))
593+ ;; And then it connects on its own, as `frq.app/start!` does on the
594+ ;; desktop: a remembered account has already said what it wants, and
595+ ;; making it say so again at every launch is a tap that carries no
596+ ;; information. The web-token is minted fresh from the broker token
597+ ;; either way, so this is the same round trip Connect would make.
598+ ;;
599+ ;; On a timer rather than awaited here, and for the desktop's reason:
600+ ;; the connect screen with its status is what should be on screen while
601+ ;; it happens, and if it fails the error lands somewhere visible rather
602+ ;; than before the first frame.
603+ (.then (async/Future.delayed (Duration .milliseconds 150))
604+ (fn [_] (connect!) nil)))
593605 ;; What the shared screen calls. The desktop installs frq.state's
594606 ;; reducers here; this installs the phone's.
595607 (actions/install!
@@ -589,7 +589,19 @@
589 (when (seq (str (or (:nick saved) "")))589 (when (seq (str (or (:nick saved) "")))
590 (reset! cells/form-nick (:nick saved)))590 (reset! cells/form-nick (:nick saved)))
591 (reset! cells/auth-mode :bluesky)591 (reset! cells/auth-mode :bluesky)
592- (reset! cells/status (str "Signed in as " (:handle saved) " — Connect to resume")))592+ (reset! cells/status (str "Signed in as " (:handle saved) "…"))
593+ ;; And then it connects on its own, as `frq.app/start!` does on the
594+ ;; desktop: a remembered account has already said what it wants, and
595+ ;; making it say so again at every launch is a tap that carries no
596+ ;; information. The web-token is minted fresh from the broker token
597+ ;; either way, so this is the same round trip Connect would make.
598+ ;;
599+ ;; On a timer rather than awaited here, and for the desktop's reason:
600+ ;; the connect screen with its status is what should be on screen while
601+ ;; it happens, and if it fails the error lands somewhere visible rather
602+ ;; than before the first frame.
603+ (.then (async/Future.delayed (Duration .milliseconds 150))
604+ (fn [_] (connect!) nil)))
593 ;; What the shared screen calls. The desktop installs frq.state's605 ;; What the shared screen calls. The desktop installs frq.state's
594 ;; reducers here; this installs the phone's.606 ;; reducers here; this installs the phone's.
595 (actions/install!607 (actions/install!