detached dcb7d15

fix(sign-on): reset welcome state on cancel and report a failed cancel logout

commit
dcb7d15e9163486518e65765e845f302dcf65afc
author
Kit · · 2026-09-29 06:01 UTC
parent
d17e56d
signature
SSH UnverifiedSHA256:H91DFuEG4jpk5edzLA4aUKkpv4zv9Q339ipRmkph6Tk The key is unknown
1 file · +9 -3
M src/lib/components/desktop/sign-on-window.svelte +9 -3
@@ -132,15 +132,21 @@
132132 // Cancelled after the credentials were sent: the server may have created a
133133 // session, so honour "Annuler" by signing out (a no-op without a session).
134134 if (step >= 2 && signOnAbort === controller) {
135- await fetch('/api/session/logout', { method: 'POST' }).catch(() => {});
136- chatState.setCurrentUser(null);
135+ const loggedOut = await fetch('/api/session/logout', { method: 'POST' })
136+ .then((res) => res.ok)
137+ .catch(() => false);
138+ // Re-sync client auth with the server either way; only claim success if the logout worked.
137139 await invalidate('app:session');
140+ if (!loggedOut) error = 'Annulation impossible : tu es peut-être connecté.';
138141 }
139142 } finally {
140143 if (signOnAbort === controller) {
141144 signOnAbort = null;
142145 desktop.signingOn = false;
143- if (signal.aborted) step = 0;
146+ if (signal.aborted) {
147+ step = 0;
148+ signedOnAs = null;
149+ }
144150 }
145151 }
146152 }
@@ -132,15 +132,21 @@
132 // Cancelled after the credentials were sent: the server may have created a132 // Cancelled after the credentials were sent: the server may have created a
133 // session, so honour "Annuler" by signing out (a no-op without a session).133 // session, so honour "Annuler" by signing out (a no-op without a session).
134 if (step >= 2 && signOnAbort === controller) {134 if (step >= 2 && signOnAbort === controller) {
135- await fetch('/api/session/logout', { method: 'POST' }).catch(() => {});135+ const loggedOut = await fetch('/api/session/logout', { method: 'POST' })
136- chatState.setCurrentUser(null);136+ .then((res) => res.ok)
137+ .catch(() => false);
138+ // Re-sync client auth with the server either way; only claim success if the logout worked.
137 await invalidate('app:session');139 await invalidate('app:session');
140+ if (!loggedOut) error = 'Annulation impossible : tu es peut-être connecté.';
138 }141 }
139 } finally {142 } finally {
140 if (signOnAbort === controller) {143 if (signOnAbort === controller) {
141 signOnAbort = null;144 signOnAbort = null;
142 desktop.signingOn = false;145 desktop.signingOn = false;
143- if (signal.aborted) step = 0;146+ if (signal.aborted) {
147+ step = 0;
148+ signedOnAs = null;
149+ }
144 }150 }
145 }151 }
146 }152 }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 3

Tags 8

↑↓ moveenter openesc close