feat(login): gh-auth-token tip for preview auth + WONTFIX custom preview domain#537
Merged
Merged
Conversation
Renders the login page with dev auto-login disabled, reveals the PAT section, and asserts an info-icon tooltip pointing at `gh auth token` appears next to the field. Fails at this commit (product code not yet added): TestingLibraryElementError: Unable to find an accessible element with the role "button" and name /Tip: paste the output of gh auth token/i Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ew domain
Adds an accessible info-icon tooltip next to the Personal Access Token
field on the login page: "Tip: paste the output of gh auth token".
The PAT field already accepts gho_ tokens, so the gh CLI token works
verbatim — handy on PR previews, where OAuth can't complete.
Why: Cloudflare hard-locks preview URLs to *.workers.dev and won't map a
custom *.codjiflo.net preview domain (migration task 2.6 WONTFIX). On a
workers.dev origin the cross-subdomain OAuth flow can't complete (host-only
PKCE cookies + isValidReturnOrigin rejects the origin). The PAT field is
origin-independent (validateToken only hits api.github.com), so it is the
supported preview-auth path.
- Re-export Tooltip/TooltipTrigger from @/components/ui (react-aria)
- .label-with-tip / .field-tip(-trigger) styles in controls.css
- Document the PAT preview-auth path in authentication/architecture.md
(new "Preview-Environment Auth" section; correct the stale
pr-{n}.codjiflo.net claim) and resolve task 2.6 + design.md notes
Test from the prior commit now passes (red→green).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CodjiFlo Iteration TrackingIterations captured: 1 What is this?This comment is automatically updated by the CodjiFlo GitHub Action to enable force-push resilient code review with iteration tracking. The artifact referenced above contains iteration data that the CodjiFlo frontend uses to:
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
codjiflo | faed7a9 | Commit Preview URL Branch Preview URL |
Jun 02 2026, 04:30 AM |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
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.
What
gh auth token". The PAT field already acceptsgho_tokens, so the GitHub CLI token works pasted verbatim, no PAT to mint.Why
Cloudflare hard-locks preview URLs to
*.workers.devand won't map a custom*.codjiflo.netpreview domain. On aworkers.devorigin the cross-subdomain OAuth flow can't complete (host-only PKCE cookies +isValidReturnOrigin()rejects the origin). The PAT field is origin-independent (validateTokenonly callsapi.github.com/rate_limit), so it's the clean way to authenticate on a preview — andgh auth tokenoutput drops straight in.Files
src/app/login/page.tsx—TooltipTrigger+Infoicon next to the PAT labelsrc/components/ui/index.ts— re-exportTooltip/TooltipTriggersrc/styles/shared/controls.css—.label-with-tip/.field-tip*openspec/specs/authentication/architecture.md— new "Preview-Environment Auth (PAT path)" section; corrected the stalepr-{n}.codjiflo.netclaimopenspec/changes/migrate-deploy-to-cloudflare/{tasks,design}.md— 2.6 WONTFIX + resolved notessrc/app/login/page.integration.test.tsx— new test (red→green across the two commits)Test
Two commits: the first adds the test (fails — tip button not found), the second adds the code (passes).
npm run test:allgreen locally (1534 unit, 121 e2e mock, 31 storybook).🤖 Generated with Claude Code
🔍 Review in CodjiFlo