Repository navigation
heronin: sign in from the phone app - #39
Merged
Merged
Conversation
Signed-off-by: fizzy pop-os-codex-4 <slot+pop-os-codex-4@fizzy.invalid>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
heronin: sign in from the phone app
Part of fizzyedit/work#1198
In plain words
Sign in from the phone app using your browser, then return to Heronin with your account connected.
The app remembers your sign-in privately so you can keep using it after restarting.
What changes
What you will notice
The Agent tab shows your account after sign-in. If sign-in does not finish within five minutes,
you can try again.
How we know it works
New in-process tests cover the browser handoff, polling, cookie forwarding, session expiry,
and sign-out without opening sockets. All six required gates pass; the test gate reports
73/73 tests passed. The real-phone browser-and-return check remains unverified.
How this serves fizzy
Platform:
phone users can sign in through their browser and return to the app with their account connected.
For agents: technical summary
Goal
Complete native account sign-in without changing the server, Drive, native import, or web OAuth.
What changed and why
A transport wrapper adds the native session cookie. A claim hashes a random verifier for the
browser URL and polls every two seconds, stopping after 150 answered attempts without a session.
The app restores and saves only 64-hex session values through Host secrets under heronin.session.
A surface timer keeps polling active; logout and token-check 401 responses clear the credential.
Budget: 129 added non-test lines and 317 added plus deleted lines including tests.
Counts use git diff --numstat HEAD plus wc -l for the two new scoped source files; PR/report
delivery artifacts are excluded. No statements are packed, and added lines fit 100 columns.
How it was verified
The new app_session_tests.zig is registered in app_tests.zig. The native sign-in test replaces
openURL because it requires a dvui window, verifies the claim still starts when opening returns
false, and checks cookie installation, token requests, logout, and expiry. All transports are
in-process fakes.
Read in the dependency code: NativeTransport copies URL, headers, and body at request time.
Host exposes getSecret/setSecret. Android's sdl_main.zig sets an unset XDG_CONFIG_HOME from
SDL_GetAndroidInternalStoragePath, placing configuration and secrets in app-private storage.
Not done / follow-ups
UNVERIFIED: SDL_OpenURL opens the phone browser and the claim completes after returning to the app.
Ops' A7 smoke after merge: install, Sign in, return to the app, confirm the Agent tab shows the
account. No phone run or screenshots were taken.
Part of fizzyedit/work#1198