fix: provide browser login snippet in dev-session - #179
Open
adi-IL wants to merge 3 commits into
Open
Conversation
Print a DevTools console one-liner when dev:session runs interactively, and document the workflow on the sign-in empty state and setup docs. Fixes trycompai#100
|
@adi-IL is attempting to deploy a commit to the Comp AI - PoC Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
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.
Fixes #100
When running
bun run --filter=api dev:sessionin local development without Google/Microsoft OAuth credentials, the script now prints a one-line DevTools Console snippet to immediately set the cookie and navigate to the app.What changed
apps/api/scripts/dev-session.ts: whenprocess.stdout.isTTYis true, prints a one-liner (document.cookie = "...; path=/; max-age=..."; location.href = "/";) for the browser DevTools console while keeping the raw cookie string intact on stdout for scripts.apps/app/app/(landing)/sign-in/page.tsx: added a reference tobun run --filter=api dev:sessionon the empty sign-in state when no OAuth provider is configured.docs/setup.mdandREADME.md: documented the console login snippet under local development setup.Verification
bun run check-typesacross all 10 packages passed cleanly (FULL TURBO).bun run lintpassed with 0 errors.apps/appunit tests (169 tests) all passed.Summary by cubic
Adds a DevTools-console login snippet to
dev:sessionfor local development without OAuth, without breaking script usage. Previously only the raw cookie printed to stdout; now, when interactive, the script prints guidance to stderr and keeps stdout machine-readable.dev:sessionprints the signed cookie to stdout; whenprocess.stderr.isTTYit writes instructions and the browser snippet to stderr, deriving the app origin from the firstAPP_URLentry (defaulthttp://localhost:3000).bun run --filter=api dev:session;README.mdanddocs/setup.mddocument the browser snippet.NODE_ENV=production.Written for commit 1fa4496. Summary will update on new commits.