nandi/frqpublic Fork 0
9237cf4
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 on launch when an account is remembered

A saved sign-in has already said what it wants; asking for the same click at
every launch carries no information. So a remembered account connects on its
own, and the connect screen shows it happening.

It goes through a timer rather than a straight call so the window is up first:
the status line and any error should land somewhere the user is already
looking. A stale token behaves as it does anywhere else — one attempt, then
the browser. Guests are untouched, and start where they always did.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-08-30T11:10:56-07:00 Browse files
9237cf4 parent: e84d24d
modified README.md +2 -1
@@ -58,7 +58,8 @@ job: POST the fragment back to itself. What comes back is a single-use SASL
5858 from the durable one at `/session` and skip the browser.
5959
6060 The durable token is saved to `$XDG_CONFIG_HOME/frq/session.edn` (mode 600) so
61-a restart resumes without one, along with the handle and nick it belongs to.
61+a restart resumes without one, along with the handle and nick it belongs to —
62+and it connects on its own at launch when one is there.
6263 The web-token beside it is single-use and deliberately not saved. A token the
6364 broker no longer honours is dropped — from disk and memory — and the browser
6465 flow runs once more, rather than failing the same way on every Connect.
@@ -58,7 +58,8 @@ job: POST the fragment back to itself. What comes back is a single-use SASL
58 from the durable one at `/session` and skip the browser.58 from the durable one at `/session` and skip the browser.
59 59
60 The durable token is saved to `$XDG_CONFIG_HOME/frq/session.edn` (mode 600) so60 The durable token is saved to `$XDG_CONFIG_HOME/frq/session.edn` (mode 600) so
61-a restart resumes without one, along with the handle and nick it belongs to.61+a restart resumes without one, along with the handle and nick it belongs to —
62+and it connects on its own at launch when one is there.
62 The web-token beside it is single-use and deliberately not saved. A token the63 The web-token beside it is single-use and deliberately not saved. A token the
63 broker no longer honours is dropped — from disk and memory — and the browser64 broker no longer honours is dropped — from disk and memory — and the browser
64 flow runs once more, rather than failing the same way on every Connect.65 flow runs once more, rather than failing the same way on every Connect.
modified src/frq/app.jolt +8 -1
@@ -367,5 +367,12 @@
367367 (defn -main [& _]
368368 ;; Before the window: a saved sign-in decides which mode the connect screen
369369 ;; opens in, and what it says.
370- (s/restore-session!)
370+ (when (s/restore-session!)
371+ ;; And then it connects on its own. A remembered account has already said
372+ ;; what it wants; making it say so again at every launch is a click that
373+ ;; carries no information. It is a timer rather than a call here so the
374+ ;; window is up first — the connect screen with its status is what the
375+ ;; user should be looking at while this happens, and if it fails, the
376+ ;; error lands somewhere visible.
377+ (vidya/after! 150 s/connect!))
371378 (ui/run app :title "frq" :width 520 :height 860))
@@ -367,5 +367,12 @@
367 (defn -main [& _]367 (defn -main [& _]
368 ;; Before the window: a saved sign-in decides which mode the connect screen368 ;; Before the window: a saved sign-in decides which mode the connect screen
369 ;; opens in, and what it says.369 ;; opens in, and what it says.
370- (s/restore-session!)370+ (when (s/restore-session!)
371+ ;; And then it connects on its own. A remembered account has already said
372+ ;; what it wants; making it say so again at every launch is a click that
373+ ;; carries no information. It is a timer rather than a call here so the
374+ ;; window is up first — the connect screen with its status is what the
375+ ;; user should be looking at while this happens, and if it fails, the
376+ ;; error lands somewhere visible.
377+ (vidya/after! 150 s/connect!))
371 (ui/run app :title "frq" :width 520 :height 860))378 (ui/run app :title "frq" :width 520 :height 860))