Ship bestcodes screencast UX fixes: OAuth redirect URI, onboarding, verify-email CTA, logos, connector toggles - #744
Conversation
…uide against localhost guesses Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
📝 WalkthroughWalkthroughThe PR tightens OAuth origin and redirect URI guidance, adds a copyable redirect URI card and provider setup checklist, expands provider icons, updates integration and connector controls, and adds onboarding and verification UI changes. ChangesIntegration setup flow
Account and onboarding interface
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant ConnectOAuth
participant OAuthProvider
User->>ConnectOAuth: Open live-origin /connect/oauth
ConnectOAuth->>User: Display exact redirect URI and copy control
User->>OAuthProvider: Register copied redirect URI
User->>ConnectOAuth: Enter provider client credentials
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🔎 Preview deployed: https://kody-pr-744.kody-a99.workers.dev Worker: Mocks:
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
packages/worker/client/routes/onboarding.tsx (1)
302-307: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract a shared "primary button as link" style instead of redefining it per-route.
Both new CTAs spread
getPrimaryButtonCss(...)and re-add the samedisplay: 'inline-flex'/textDecoration: 'none'overrides needed to use a primary button style on an<a>tag. A shared helper (e.g.getPrimaryLinkButtonCss(options?)) instyle-primitives.tswould remove the duplication and keep future link-styled buttons consistent (this same pattern already exists, unchanged, for "Reconnect OAuth" inaccount-integrations.tsx).
packages/worker/client/routes/onboarding.tsx#L302-L307: replacecommunityCtaCss's manual spread with the shared helper.packages/worker/client/routes/verify-email.tsx#L100-L105: replacectaButtonCss's manual spread (keeping thesize: 'lg', weight: 'semibold'options) with the shared helper.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/worker/client/routes/onboarding.tsx` around lines 302 - 307, The primary-button-as-link styles are duplicated across both CTA routes. Add a shared getPrimaryLinkButtonCss(options?) helper in style-primitives.ts that applies getPrimaryButtonCss options plus the inline-flex and text-decoration overrides, then update communityCtaCss in packages/worker/client/routes/onboarding.tsx at lines 302-307 and ctaButtonCss in packages/worker/client/routes/verify-email.tsx at lines 100-105 to use it; preserve the verify-email size: 'lg' and weight: 'semibold' options.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/worker/client/routes/connect-oauth.tsx`:
- Around line 788-809: Update the checklist text in renderProviderInstructions
so confidential flows with hasStoredClientSecret true do not tell users to paste
an already-saved secret; change the wording to instruct them to enter a client
secret only if one is not already saved, while preserving the existing client-ID
wording and public-flow behavior.
In `@packages/worker/client/routes/verify-email.tsx`:
- Around line 68-82: Update the success-link rendering in the verify-email route
so the fallback CTA and the separate Account link are not both shown when
handling email-change success. Reuse the existing ctaHref/ctaLabel state or
email-change condition to hide the duplicate /account link while preserving the
CTA and account-link behavior for other verification outcomes.
In `@packages/worker/src/mcp/capabilities/coding/kody-official-guide.ts`:
- Line 48: Clarify the OAuth guidance string in the coding capability so MCP
OAuth is explicitly presented as distinct from the PKCE and confidential
client-flow choices. Update the phrase near “PKCE vs confidential” to state that
it explains how those flows differ from, or are not, MCP OAuth.
---
Nitpick comments:
In `@packages/worker/client/routes/onboarding.tsx`:
- Around line 302-307: The primary-button-as-link styles are duplicated across
both CTA routes. Add a shared getPrimaryLinkButtonCss(options?) helper in
style-primitives.ts that applies getPrimaryButtonCss options plus the
inline-flex and text-decoration overrides, then update communityCtaCss in
packages/worker/client/routes/onboarding.tsx at lines 302-307 and ctaButtonCss
in packages/worker/client/routes/verify-email.tsx at lines 100-105 to use it;
preserve the verify-email size: 'lg' and weight: 'semibold' options.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c4e47375-6364-4a3c-9323-79de2dca4578
📒 Files selected for processing (10)
docs/guides/integration-bootstrap.mddocs/guides/oauth.mdpackages/worker/client/provider-icons.tsxpackages/worker/client/routes/account-integrations.tsxpackages/worker/client/routes/account-remote-connectors.tsxpackages/worker/client/routes/connect-oauth.tsxpackages/worker/client/routes/onboarding.tsxpackages/worker/client/routes/verify-email.tsxpackages/worker/src/app/onboarding-data.tspackages/worker/src/mcp/capabilities/coding/kody-official-guide.ts
Replace negative localhost warnings with the literal https://heykody.dev/connect/oauth redirect URI in the oauth and integration-bootstrap guides, the coding_guide_get summary, and the /connect/oauth redirect URI card. Also clarify the MCP OAuth distinction and stop asking for a client secret that is already stored (review feedback). Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
…ts there Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
…rets flows Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
UX/product fixes from the bestcodes screencast review: OAuth redirect URI correctness, onboarding prompt + community CTA, verify-email CTA, integration logos, and remote connector toggle design.
What changed
A. OAuth redirect URI correctness (P0)
/connect/oauthnow shows a prominent Redirect URI card with the exact URI for the current origin (window.location.origin + pathname) and a copy button, plus a generic provider setup checklist (create app → register this exact redirect → enable APIs/scopes → paste client id/secret — the secret step is skipped when one is already stored).docs/guides/oauth.md,docs/guides/integration-bootstrap.md, and thecoding_guide_getoauth summary now literally state the redirect URI ishttps://heykody.dev/connect/oauthand connect URLs usehttps://heykody.dev/...(self-hosted deployments use their own origin plus/connect/oauth). No negative "don't use localhost" framing anywhere.B. Onboarding starter prompt + community CTA
buildOnboardingSetupPrompt()now steers agents to: briefly explain → use search + official guides (coding_guide_get) → connect one integration via the connect/secrets flows and verify with an ad hoc execute smoke test → no packages until the integration works (ad hoc execute first, package after)./onboardingwith a primary Browse community packages button to/community.C. Verify-email success CTA
/account(email-change success).D. Integrations page logos
provider-icons.tsxso all six example integrations show a logo; the "Something else" card gets a neutral plug icon.E. Remote connectors toggle design
remix/ui/togglemixin (hardcoded light-mode green/white styling) with a theme-aware switch built from the shared design tokens: primary-colored track when on, token-based track/thumb, focus-visible ring, disabled and reduced-motion states. Looks clean in both light and dark mode.role="switch"preserved.Testing
npm run validatefully green (format, lint, typecheck, unit, Playwright E2E, MCP E2E) — re-run after the positive-framing docs rewrite and review-feedback fixes.System recap — composes existing primitives (low risk)
Mode: recap · Base:
main@18f67ce3· Head:96c5e62bClassification: composes — UI copy/styling, onboarding prompt text, and docs guidance only; no primitive contracts, routes, storage, or auth flows changed.
Primitives touched
app-uicapability-registrycoding_guide_getoauth guide summary wording (docs guides also updated)System map
All app-ui changes are page-internal (five routes); the only cross-primitive path is agents fetching the updated oauth guide through
coding_guide_get.Legend: green = composes (wiring only) · amber = extended by this PR · red = new primitive · gray = context (unchanged, included only when an edge crosses it).
Invariants
Per-user isolation untouched: all changes are client UI rendering, static prompt/doc text, and CSS.
Summary by CodeRabbit
https://heykody.dev/connect/oauthredirect URI.