Skip to content

feat(ui): rebuild the login screen on subturtle-ui - #63

Merged
navidshad merged 2 commits into
devfrom
new-design
Aug 29, 2026
Merged

feat(ui): rebuild the login screen on subturtle-ui#63
navidshad merged 2 commits into
devfrom
new-design

Conversation

@SomiVista

Copy link
Copy Markdown
Collaborator

Promotes the new-design batch to dev. The design system, app shell and Progress screen already landed via #61, so the delta here is the login screen plus the earlier docs commit freezing main for the migration.

What changed

frontend/pages/auth/login.vue was the last untouched admin-template screen — skewed purple panel, five decorative PNGs, a pilotui Button, dark: variants and two hardcoded English strings. It is the first thing every signed-out visitor sees, so it was the loudest remaining piece of the old blue palette.

It is now the redesigned screen: a sign-in column on warm paper with two ambient brand blobs, and a tilted, blurred preview of Today's board off the right edge with two floating phrase cards.

The script logic is unchanged

The ?redirectsessionStorage store, the authentication.isLogin early replace, the anonymous-token priming and triggerGoogleLoginProcess (timezone + redirect params, window.open(url, '_self')) are byte-identical. The only additions inside those two functions are two phase.value assignments driving the new views. Verified live: the handoff URL still comes out as …/auth/google?timezone=…&redirect=…, and auth_redirect_url is still written on load.

States

idle the Google button
waiting "Waiting for Google…" with a retry link — window.open normally navigates away first, but this earns its place on a slow connection
returning the "Signing you in…" overlay, shown while an existing session is forwarded, so the form never flashes at someone who is in fact signed in
notices session-ended and sign-in-failed, from ?notice=expired|failed

Nothing produces ?notice= yet. login_with_token.vue keeps its toastError and the 401/412 interceptor still bounces here silently — both deliberately untouched in this PR. Wiring either is a one-line change in those files that needs no change to this page.

Two decisions worth review

The two-column switch is xl, not lg. At 1024px the preview overlapped the sign-in column — the "Je n'en reviens pas" card landed on top of the heading. The column is 540px and the preview occupies 690px after its overhang, so the two only clear at 1230px. Below xl the column centres and keeps its 344px form width.

LoginBoardPreview and InlineNotice stay app-local, not in ui/. The design system's manifest lists 23 components including Toast, but no inline notice, callout or alert — so the notice is our composition of its tokens, not a primitive the design defines. Putting it in ui/ would invent public API the design system does not have. The board preview is login-only decoration. Same precedent as StPageHeader.vue: graduate on the second caller.

subturtle-ui

Additive only — no component changed:

  • 5 icons: logos:google-icon, solar:arrow-right-bold, solar:clock-circle-bold, solar:danger-triangle-bold, solar:moon-sleep-bold-duotone
  • 4 st- tokens the markup needed: ink-200, ink-700, red-600, shadow-xl

Deliberately untouched

login_with_token.vue, plugins/modular-rest.ts, layouts/auth.vue (still pilotui — the App wrapper, blue screen_loader and useAppStore), middleware/auth.ts, and pilotui everywhere. Dark stays light-only on migrated surfaces.

Verification

Checked in a real browser at 1440 / 1280 / 1024 / 390: idle, both notices, the redirect pill, waiting-with-retry, and the overlay. Console clean — no [subturtle-ui] unknown icon warnings, so all five icons resolve.

tests/e2e/specs/auth.spec.ts still passes its assertion — the button's accessible name is exactly "Sign in with Google", matching /sign in with google/i. The spec could not be executed locally because Playwright's browsers are not installed in this environment (pre-existing, unrelated); the condition was asserted directly against the running page instead.

Note for a follow-up

yarn format rewrites 88 unrelated files — the repo is not Prettier-clean at HEAD. Only the touched files were formatted here. Worth fixing as its own PR.

🤖 Generated with Claude Code

navidshad and others added 2 commits August 27, 2026 19:31
The redesign lands one screen at a time, so dev deliberately carries a
half-migrated UI: screens rebuilt on subturtle-ui sit beside screens still on
pilotui, and dark mode is light-only on the migrated ones. Merging dev into main
would ship that inconsistency to production.

Records the freeze under Branching, next to the dev -> main flow it overrides, and
adds a Design system migration section covering what is deliberately in a
half-finished state meanwhile — pilotui still being required, dark mode being
light-only, and subturtle-ui needing ui/ present wherever the frontend installs.

The standing dev -> main PR (#58) is closed for the same reason; a fresh one opens
once the last screen is migrated and pilotui is removed.
Replaces the admin-template login (skewed purple panel, five decorative
PNGs, pilotui Button, dark: variants) with the redesigned screen: a
sign-in column on warm paper with two ambient brand blobs, and a tilted,
blurred preview of Today's board off the right edge.

The script logic is unchanged. The ?redirect -> sessionStorage store, the
authentication.isLogin early replace, the anonymous-token priming and
triggerGoogleLoginProcess (timezone + redirect params, window.open with
_self) are byte-identical; the only additions inside them are two
phase.value assignments that drive the new views.

Three states, from one `phase` ref: the form, a "Waiting for Google..."
block with a retry link (window.open normally navigates away first, but
it earns its place on a slow connection), and a "Signing you in..."
overlay shown while an existing session is forwarded, so the form never
flashes at someone who is in fact signed in.

Two notice states -- session-ended and sign-in-failed -- render from
?notice=expired|failed. Nothing produces that param yet:
login_with_token.vue keeps its toastError and the 401/412 interceptor
still bounces here silently. Wiring either is a one-line change in those
files that needs no change to this page.

The two-column layout switches at xl, not lg. The column is 540px and the
preview occupies 690px after its overhang, so anything under 1230px put
the floating phrase cards on top of the heading. Below xl the column
centres and keeps its 344px form width.

LoginBoardPreview and InlineNotice stay app-local rather than moving into
subturtle-ui: the design system defines a Toast but no inline notice,
callout or alert, so the notice is our composition of its tokens and not
a library primitive, and the board preview is login-only decoration. Same
precedent as StPageHeader -- graduate on the second caller.

subturtle-ui gains five icons (logos:google-icon, solar:arrow-right-bold,
solar:clock-circle-bold, solar:danger-triangle-bold,
solar:moon-sleep-bold-duotone) and four st- tokens the markup needed
(ink-200, ink-700, red-600, shadow-xl). Both additive; no component
changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@SomiVista
SomiVista requested a review from navidshad August 29, 2026 09:45
@navidshad
navidshad merged commit 779a470 into dev Aug 29, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-dev.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants