Skip to content

fix: read correct session cookie for auth-aware nav - #16

Merged
makeitraina merged 1 commit into
mainfrom
claude/analytics-migration-gameplan-md1qrs
Aug 24, 2026
Merged

fix: read correct session cookie for auth-aware nav#16
makeitraina merged 1 commit into
mainfrom
claude/analytics-migration-gameplan-md1qrs

Conversation

@makeitraina

Copy link
Copy Markdown
Member

What

Changes the SESSION_COOKIE constant in src/lib/auth-script.ts from "assembly_session" (a placeholder) to "current-portal-session" (the cookie the dashboard actually sets).

Why

Now that the marketing site serves from assembly.com, the current-portal-session cookie set by the dashboard on .assembly.com is visible to the marketing site. The auth-aware UI (showing "Open Assembly" for signed-in users vs "Log in" + "Get started" for signed-out) was already fully built but never activated because the script was looking for a cookie name that nothing sets.

This also affects:

  • Pricing page — hides the Free tier for signed-in users
  • CTAs site-wideAuthLink components swap between "Get started" and "Open Assembly" / "Add app to workspace"

Screenshots

No visual changes to the components themselves — the auth-only / unauth-only CSS mechanism and nav markup are unchanged. The fix just makes the detection read the right cookie so the existing toggle actually fires.

To test on a preview URL (not on .assembly.com), append ?authed=1 to simulate signed-in or ?authed=0 for signed-out.

Checklist

  • npm run build passes
  • Tested on mobile and desktop
  • Preview deploy looks correct

Generated by Claude Code

The auth-detection script was looking for an `assembly_session` cookie
that nothing set. The dashboard actually writes `current-portal-session`
on the `.assembly.com` parent domain — now that the marketing site
serves from assembly.com the cookie is visible, so reading the right
name makes the "Open Assembly" / "Log in + Get started" toggle work.
@vercel

vercelBot commented Aug 24, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
assembly-studio-websiteReadyReadyPreviewAug 24, 2026 5:27pm

Request Review

@greptile-apps

Copy link
Copy Markdown

Greptile Summary

Updates the auth-aware presentation bridge to detect the session cookie currently set by the Assembly dashboard.

  • Replaces the placeholder assembly_session cookie name with current-portal-session.
  • Updates comments to describe the shared .assembly.com cookie contract and preview override behavior.

Confidence Score: 5/5

The PR appears safe to merge, with no actionable correctness or security issues identified.

The change is narrowly scoped to the cookie-name contract used by the existing auth-aware presentation logic, and the affected consumers continue to receive the same boolean auth-state signal.

Important Files Changed

FilenameOverview
src/lib/auth-script.tsAligns the client-side session-cookie lookup with the dashboard cookie name; no actionable defect was established.

Reviews (1): Last reviewed commit: "fix: read the correct session cookie for..." | Re-trigger Greptile

@makeitraina
makeitraina merged commit abc7072 into mainAug 24, 2026
3 checks passed
@makeitraina
makeitraina deleted the claude/analytics-migration-gameplan-md1qrs branch August 24, 2026 18:12
Sign up for freeto 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

@makeitraina@claude