Repository navigation
Split nemar.org and app.nemar.org surfaces (#47) - #48
Merged
Merged
Conversation
8 tasks
Deploying nemar-website with
|
| Latest commit: |
294e370
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6005ec68.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-issue-47-app-subdoma.nemar-website.pages.dev |
Contributor
Author
/review-pr outcomesFour reviewers ran in parallel: code-reviewer, pr-test-analyzer, comment-analyzer, type-design-analyzer. Addressed in 294e370
Skipped (with reasoning)
|
This was referenced May 23, 2026
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.
Closes #47.
Summary
src/middleware.tsreadsAstro.url.hostnameand 301-redirects mismatched paths betweennemar.organdapp.nemar.org. Anything else (localhost,*.pages.dev) runs in single-host mode so QA against one preview URL stays cheap.nemar.org) skips the/auth/meround-trip entirely. The session cookie is intended to be host-only onapp.nemar.org, so a stale wildcard cookie can never personalize a cacheable response here.https://app.nemar.org/login; app collapses to UserMenu + "Explore datasets" cross-host link; dev/preview keeps the full nav./uploadon home,/loginon/signup+/docs/getting-started,/dashboardon/docs/managing-datasets) now build absolutehttps://app.nemar.org/...URLs viaappUrl(...)so they don't trigger an extra redirect hop.src/lib/host.tsis the single place that knows the host map and the app-route list;src/components/Nav.astro,src/middleware.ts, and a few page files all import from it.Test plan
bun run typecheck(0 errors)bun run test(342/342 passing, +41 new tests)bun run lint(clean)bun run devand confirm/dashboard,/login, etc. all still render in single-host modeapp.nemar.orgis attached on the Pages project, deploy and confirm/dashboardonnemar.org301s toapp.nemar.org/dashboard, and/discoveronapp.nemar.org301s back tonemar.org/discover/auth/mecalls (network panel on anemar.orgpage)Follow-ups (not in this PR)
app.nemar.orgas a second custom domain to thenemar-websitePages project (Cloudflare dashboard, Settings -> Custom domains).nemarOrg/nemar-cli#569that the backendSet-Cookiewill useDomain=app.nemar.org(host-only) and CORS allowshttps://app.nemar.org. Full contract is captured on the localfeature/auth-backend-pendingbranch's.context/handoff-auth-backend.md.