Skip to content

Keep the session through updates; login page says e-ink displays - #6

Merged
CLCK0622 merged 1 commit into
mainfrom
fix/session-survives-updates
Sep 26, 2026
Merged

CLCK0622 merged 1 commit into
mainfrom
fix/session-survives-updates

Conversation

@CLCK0622

Copy link
Copy Markdown
Member

Signing in again after every Sparkle update came from TokenStore.save:
it deleted the Keychain item and added a new one on every save. On this
Mac the item had been created by the first Developer ID install
(~/Applications/inklet.app, 2026-09-16) and never changed since, although
the backend rotates the refresh token every 72 hours: the delete was
refused, the add failed with errSecDuplicateItem, and the fresh tokens
lived only in memory. The next launch — an update relaunch — presented the
old refresh token, the backend answered 401, and the app signed out.

Saves now update the existing item in place and only fall back to
delete-and-add; if the Keychain still refuses, the session is kept in the
0600 file until the Keychain accepts it, instead of being dropped. The
login page reads "Your second brain, on e-ink displays."

Build and the 75 tests pass with the Xcode toolchain.

Signing in again after every Sparkle update came from TokenStore.save:
it deleted the Keychain item and added a new one on every save. On this
Mac the item had been created by the first Developer ID install
(~/Applications/inklet.app, 2026-09-16) and never changed since, although
the backend rotates the refresh token every 72 hours: the delete was
refused, the add failed with errSecDuplicateItem, and the fresh tokens
lived only in memory. The next launch — an update relaunch — presented the
old refresh token, the backend answered 401, and the app signed out.

Saves now update the existing item in place and only fall back to
delete-and-add; if the Keychain still refuses, the session is kept in the
0600 file until the Keychain accepts it, instead of being dropped. The
login page reads "Your second brain, on e-ink displays."
Copilot AI lite review requested due to automatic review settings September 26, 2026 20:50
@CLCK0622
CLCK0622 merged commit 0249fe2 into main Sep 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CLCK0622
CLCK0622 deleted the fix/session-survives-updates branch September 26, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants