Skip to content

fix: branded auth success page that actually reaches the browser - #6

Merged
jpalanco merged 2 commits into
mainfrom
feat/pretty-auth-page
Jul 2, 2026
Merged

jpalanco merged 2 commits into
mainfrom
feat/pretty-auth-page

Conversation

@jpalanco

@jpalanco jpalanco commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Answers "does the terminal show a nice authenticated message in the browser?" — it was supposed to, but in practice it didn't:

  • The success page rarely arrived: resolving the login promise triggered server.stop(true) in the finally block, force-closing the socket while the success response was still in flight. The browser got a connection reset instead of a confirmation (found while testing the page against the real local server). Now the server stops gracefully and gives the response a moment to flush before the hard stop.
  • The pages were bare unstyled HTML (and the 400 error paths returned plain text). All three responses — success, missing parameters, state mismatch — are now branded Plexicus pages: purple gradient, card with check/cross badge, the authenticated email (HTML-escaped), and "You can close this tab and return to your terminal."

Test plan

  • bun run typecheck — zero errors
  • bun test — 54/54 pass
  • In-process harness against the real Bun.serve flow: wrong state → styled 400, missing params → styled 400, valid callback → 200 with title/email/hint/branding AND the login promise resolves with the token

jpalanco added 2 commits July 2, 2026 20:28
The browser-side confirmation was unstyled HTML, and worse, it rarely
arrived: resolving the login promise triggered server.stop(true) in
the finally block, force-closing the socket while the success response
was still in flight — the browser got a connection reset instead of a
confirmation. Stop gracefully and give the response a moment to flush
before the hard stop.

The success, missing-params, and state-mismatch responses are now
branded Plexicus pages (inline CSS, escaped email) telling the user
they're authenticated and can return to the terminal.
White navbar with the inlined Plexicus wordmark, #8220FF primary,
square corners, and light body — the same look as the theme-plexicus
Forgejo theme on scm.plexicus.ai.
@jpalanco
jpalanco merged commit fdbad58 into main Jul 2, 2026
1 check passed
@jpalanco
jpalanco deleted the feat/pretty-auth-page branch July 2, 2026 19:04
jpalanco pushed a commit that referenced this pull request Oct 24, 2026
…and filter docs' (#6) from docs-origin-and-contract into main
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.

1 participant