fix(app): a saved token is read when it is used, not once when a workspace opens #158

Merged
james.maes merged 3 commits from fix/157-token-at-use into main 2026-11-10 22:59:25 +00:00
3 Commits
Author SHA1 Message Date
james.maesandClaude Fable 5.2 02bd751357 test(cli): the vault doubles added on main describe their entries
Refs #157

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
2026-11-10 16:59:20 -06:00
james.maesandClaude Fable 5.2 20d2f3e3f1 fix(app): address the independent review of reading tokens at use
- Sync all skips any account whose token is gone, whichever source it
  comes from, and reports a sync that could not start as failed, not as
  succeeded.
- A sync reads its token before it touches a row: one that cannot start
  for want of a token leaves failures, their paths and the retry as they
  were. The WSL clone reads the token at use too.
- The organization survives its token going away (the same capture and
  restore the successful lookup has).
- A lookup started by reading the token again says nothing: it does not
  write the status line or close the error of the load that triggered it.
- The token's source is taken from the account as the store has it now.
- A credential store that does not answer keeps the token read earlier
  and is logged; it no longer escapes into Sync all or the shell.
- A saved token of nothing but spaces is no token; Quick Sync with an
  empty box fails in its own words.

Refs #157

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
2026-11-10 16:56:25 -06:00
james.maesandClaude Fable 5.2 e083089cb3 fix(app): a saved token is read when it is used, not once when a workspace opens
An account workspace took its token from the vault in its constructor
and kept it. After the default token was replaced or removed in Settings,
open workspaces went on using the old one until the app was restarted;
after a default token was saved for the first time, Sync all still
skipped the accounts that use it; Quick Sync, which Settings pre-fills,
kept the old value too.

- A workspace reads its account's token from its source again when it is
  shown, before it loads, before it syncs, and when Sync all reaches it.
  A token that is gone by then stops the operation with a message that
  names the source, instead of running with the old one.
- The shell tells the open workspaces when Settings changed the default
  token. Quick Sync follows only while its box still holds what Settings
  put there; a token somebody typed stays.
- The account wizard shows the choice between the default token and a
  token of the account's own also for an account that uses the default
  token while none is saved, which was a dead end at step 2.
- The "no token" message names the credential entry the way the vault in
  use names it (entry names are scoped to the data folder).

Closes #157

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>
2026-11-10 16:56:24 -06:00