Skip to content

Integrate auth/og fixes + dashboard redesign with origin/main - #4

Merged
shashank03-dev merged 6 commits into
mainfrom
integration/main-merge
Jun 21, 2026
Merged

shashank03-dev merged 6 commits into
mainfrom
integration/main-merge

Conversation

@shashank03-dev

Copy link
Copy Markdown
Owner

Summary

Lands the issues found during the live-site + code deep-dive, and integrates the 3-day divergence between origin/main and the unpushed dashboard-redesign work so production main has both.

Fixes

  • Open redirect in the auth flow (lib/auth/redirects.ts): normalizeAuthNextPath rejected a leading // but the URL parser collapsed /..//evil.com into a protocol-relative //evil.com pathname that survived the same-origin check, so /auth/callback?next=… (and /login?next=…) could redirect a user off-site after a legitimate sign-in. Now rejects any resolved path that is still protocol-relative, with regression tests for the ..//, ./..//, and /\ collapse cases.
  • Broken social-share image (app/layout.tsx): metadataBase pointed at the dead motioncode.vercel.app preview domain, so every OG/Twitter image URL 404'd. Now uses NEXT_PUBLIC_SITE_URL (fallback https://motioncode.live) and drops the redundant manual openGraph.images entry — the app/opengraph-image.tsx file convention is the single source.
  • Landing runtime guards: Aurora probes for a WebGL context before constructing the ogl Renderer (no more crash when WebGL is unavailable — headless browsers, GPU blocklist, HW accel off); a new hydrated reduced-motion hook returns a stable value through SSR + first client render, removing a matchMedia hydration mismatch.

Merge integration (origin/main ↔ dashboard redesign)

origin/main (Jun 11) had feat: route auth into app and gate free projects (free-project-cap migration + paidOnly dashboard gating) and fix: guard google oauth provider state. Local main (Jun 14, never pushed) had the dashboard redesign. This branch merges both. Conflict resolutions:

  • app/dashboard/page.tsx — kept origin's paidOnly: true gating.
  • components/dashboard/app-shell.tsx — kept the newer redesigned shell (header nav + dedicated /projects /workspaces routes).
  • auth-dashboard-pages.test.ts — kept origin's added callback test.
  • login-form.test.tsx — kept the redesign's test structure (the merged login-form has the Google provider check, so tests must settleProviderCheck(); origin's pre-redesign duplicate was dropped).
  • Remaining conflicts were prettier line-wrapping (took the formatted version).

Verification

  • npm run typecheck — clean
  • npm run lint — clean
  • npm test — 176 passed (27 files)
  • npm run build — succeeds (full route manifest generated)

🤖 Generated with Claude Code

codex and others added 5 commits June 14, 2026 16:41
# Conflicts:
#	launch-checklist.md
Aurora probes for a WebGL context before constructing the ogl Renderer so
the landing page no longer throws when WebGL is unavailable (headless
browsers, disabled HW acceleration, GPU blocklist). A new hydrated
reduced-motion hook returns a stable value through SSR and the first client
render, eliminating a matchMedia-driven hydration mismatch in the scroll
animation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
normalizeAuthNextPath rejected a leading '//' but the URL parser collapsed
'/..//evil.com' into a protocol-relative '//evil.com' pathname that survived
the same-origin check, letting /auth/callback?next=... redirect users
off-site after a legitimate sign-in. Reject any resolved path that is still
protocol-relative, with a regression test for the collapse cases.

Point metadataBase at NEXT_PUBLIC_SITE_URL (fallback https://motioncode.live)
instead of the dead motioncode.vercel.app preview domain, so the generated
Open Graph / Twitter image resolves on the live host. Drop the redundant
manual openGraph.images entry; the app/opengraph-image.tsx file convention
is the single source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts:
#	app/dashboard/page.tsx
#	components/dashboard/app-shell.tsx
#	components/dashboard/login-form.tsx
#	tests/e2e/app-smoke.spec.ts
#	tests/e2e/auth-dashboard.spec.ts
#	tests/unit/auth-dashboard-pages.test.ts
#	tests/unit/auth-redirects.test.ts
#	tests/unit/login-form.test.tsx
@vercel

vercel Bot commented Jun 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
motion-code Ready Ready Preview, Comment Jun 21, 2026 1:39pm

The marketing spec still asserted the pre-redesign landing: a "TRUSTED BY
DEVELOPERS AT" kicker and partner logos exposed via accessible img roles.
The redesigned strip uses the kicker "Fits beside the tools motion teams
already use" and renders logos as decorative (alt="" aria-hidden), so the
old assertions failed. Update the kicker assertion and match each brand by
its simpleicons CDN source instead of an accessible name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shashank03-dev
shashank03-dev merged commit 8e0d164 into main Jun 21, 2026
3 checks passed
@shashank03-dev
shashank03-dev deleted the integration/main-merge branch June 21, 2026 13:42

This branch was successfully deployed

1 active deployment
Preview — edc43463 Deployed Jun 21, 2026 by vercel[bot]
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