Skip to content

fix: provide browser login snippet in dev-session - #179

Open
adi-IL wants to merge 3 commits into
trycompai:mainfrom
adi-IL:fix/dev-session-browser-usage
Open

fix: provide browser login snippet in dev-session#179
adi-IL wants to merge 3 commits into
trycompai:mainfrom
adi-IL:fix/dev-session-browser-usage

Conversation

@adi-IL

@adi-IL adi-IL commented Aug 21, 2026

Copy link
Copy Markdown

Fixes #100

When running bun run --filter=api dev:session in 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

  1. In apps/api/scripts/dev-session.ts: when process.stdout.isTTY is 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.
  2. In apps/app/app/(landing)/sign-in/page.tsx: added a reference to bun run --filter=api dev:session on the empty sign-in state when no OAuth provider is configured.
  3. In docs/setup.md and README.md: documented the console login snippet under local development setup.

Verification

  • bun run check-types across all 10 packages passed cleanly (FULL TURBO).
  • bun run lint passed with 0 errors.
  • apps/app unit tests (169 tests) all passed.
  • No code comments added; adheres strictly to repository guidelines.

Summary by cubic

Adds a DevTools-console login snippet to dev:session for 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:session prints the signed cookie to stdout; when process.stderr.isTTY it writes instructions and the browser snippet to stderr, deriving the app origin from the first APP_URL entry (default http://localhost:3000).
  • The empty sign-in state now points to bun run --filter=api dev:session; README.md and docs/setup.md document the browser snippet.
  • No production change; the command refuses to run with NODE_ENV=production.

Written for commit 1fa4496. Summary will update on new commits.

Review in cubic

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
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

@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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/api/scripts/dev-session.ts Outdated
Comment thread apps/api/scripts/dev-session.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread apps/api/scripts/dev-session.ts Outdated
Comment thread apps/api/scripts/dev-session.ts Outdated
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.

1 participant