Skip to content

Onboarding app redesign#1370

Open
Developing-Gamer wants to merge 25 commits into
devfrom
onboarding-app-redesign
Open

Onboarding app redesign#1370
Developing-Gamer wants to merge 25 commits into
devfrom
onboarding-app-redesign

Conversation

@Developing-Gamer
Copy link
Copy Markdown
Contributor

@Developing-Gamer Developing-Gamer commented Apr 22, 2026

Summary by CodeRabbit

  • New Features

    • DesignDialog modal with configurable sizes, variants, header/footer, trigger and close-button options
    • Onboarding: require-email-verification toggle with preview and confirmation flow
    • New public "roids" skill documentation
  • Improvements

    • Dashboard pages migrated to Design* components (auth methods, provider flows, sign-up rules)
    • Playground: dialog demos and generated code for dialog variants
    • Confirmation dialogs can block outside-dismiss interactions
  • Documentation

    • Design guide and component docs expanded with DesignDialog usage and examples
  • Chores

    • Added skills lockfile and a new app icon mapping entry

Introduce a canonical dialog surface with structured header/body/footer slots and styling controls so feature pages can reuse a consistent modal foundation.

Made-with: Cursor
Expose the new dialog component and related helper types from the package root so dashboard pages can import the shared modal API consistently.

Made-with: Cursor
Add guidance for when and how to use DesignDialog so modal redesign work follows a single documented pattern across dashboard routes.

Made-with: Cursor
Replace the hand-wired trigger history dialog chrome with the shared DesignDialog wrapper while preserving the existing summary header and trigger list behavior.

Made-with: Cursor
Show confirmation, rich-header, tester, and parity examples so agents and developers can copy the shared modal patterns directly.

Made-with: Cursor
Introduce a dedicated dialog playground entry with shape presets and generated snippets to make modal experimentation and reuse easier.

Made-with: Cursor
Introduce a compact settings-row layout for the require-email-verification toggle, intended as the main onboarding control surface.

Made-with: Cursor
Replace the legacy card/ActionDialog flow with the shared DesignDialog, DesignButton close affordances, and the settings-strip control component.

Made-with: Cursor
Use singular/plural description text; move the total count next to the affected accounts label; shorten the list footer to “+ N more”.

Made-with: Cursor
@Developing-Gamer Developing-Gamer self-assigned this Apr 22, 2026
Copilot AI review requested due to automatic review settings April 22, 2026 20:17
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stack-auth-hosted-components Ready Ready Preview, Comment May 14, 2026 8:19pm
stack-auth-mcp Ready Ready Preview, Comment May 14, 2026 8:19pm
stack-backend Ready Ready Preview, Comment May 14, 2026 8:19pm
stack-dashboard Ready Ready Preview, Comment May 14, 2026 8:19pm
stack-demo Ready Ready Preview, Comment May 14, 2026 8:19pm
stack-docs Ready Ready Preview, Comment May 14, 2026 8:19pm
stack-preview-backend Ready Ready Preview, Comment May 14, 2026 8:19pm
stack-preview-dashboard Ready Ready Preview, Comment May 14, 2026 8:19pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new DesignDialog component and exports, integrates it into playground preview/codegen and design docs, migrates multiple dashboard pages to Design* UI and dialog-driven flows, introduces an email-verification onboarding component and local confirmation dialog, and adds a small roids skill doc plus a skills lockfile.

Changes

Design dialog surface, integration, and page migrations

Layer / File(s) Summary
DesignDialog implementation & API
packages/dashboard-ui-components/src/components/dialog.tsx
Adds DesignDialog component, region class overrides, props (size, variant, icon, title, description, headerContent/customHeader, footer, trigger, hideTopCloseButton, noBodyPadding), exports primitive aliases and related types.
Package public re-exports
packages/dashboard-ui-components/src/index.ts
Re-exports DesignDialog, DesignDialogRoot/Trigger/Close/Title/Description and dialog types.
ActionDialog dismissal API
apps/dashboard/src/components/ui/action-dialog.tsx
Adds keepOpenOnOutsideInteraction?: boolean and contentClassName?: string; centralizes block-dismiss logic for outside/pointer/focus handlers.
Playground: controls, preview, codegen
apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/playground/page-client.tsx
Adds "dialog" component option, per-dialog control state (shape/size/variant/title/description/headerIcon/footer/hideTopCloseButton), renders shape-specific DesignDialog preview, and extends getComponentCode() to emit TSX for DesignDialog.
Design docs & guide updates
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/design-language/page-client.tsx, apps/dashboard/DESIGN-GUIDE.md
Adds “Dialog” documentation with four demo variants and props table; updates DESIGN-GUIDE to mandate DesignDialog for focus-trapping modals and adds §4.14 DesignDialog contract and usage examples.
Auth methods: provider settings & UI refactor
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx, .../auth-methods/page-client.tsx
Replaces legacy primitives with Design* components; introduces OAuthProviderSettingsForm, ProviderHeader, credential subcomponents, ProviderIcon(size?), DesignMenu action model, and an in-file email-verification toggle flow (useEmailVerificationToggle) with confirmation ActionDialog.
Onboarding: email verification setting & dialog
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/onboarding/onboarding-email-verification-setting.tsx, .../onboarding/page-client.tsx
Adds OnboardingEmailVerificationSetting component and local EnableEmailVerificationDialog (uses DesignDialog) that previews affected users and confirms enabling; simplifies PendingChange shape and preview flow.
Sign-up rules: UI refactor & editor extraction
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sign-up-rules/page-client.tsx
Large refactor to Design* components: extracts useRuleEditorState, PageBody; rebuilds trigger-history dialog with tiles/charts; rewrites test-rules UI to TestRulesPanel/dialog; updates DnD handling, kebab DesignMenu actions, and save/discard flows.
sequenceDiagram
  participant Dev as Developer
  participant DialogPkg as DesignDialog\n(package)
  participant Playground as Playground UI
  participant Pages as Dashboard Pages
  participant Docs as Design Docs

  Dev->>DialogPkg: implement DesignDialog & export types
  Dev->>Playground: add dialog controls + codegen
  Playground->>DialogPkg: render DesignDialog preview (trigger/header/footer)
  Dev->>Pages: migrate pages to Design* components and dialog flows
  Pages->>DialogPkg: instantiate DesignDialog for confirm/rich/wide modals
  Dev->>Docs: add docs + DESIGN-GUIDE examples referencing DesignDialog
Loading

Skills & documentation (separate artifact)

Layer / File(s) Summary
Skill doc and lockfile
.agents/skills/roids/SKILL.md, skills-lock.json
Adds .agents/skills/roids/SKILL.md (frontmatter v1.0.0) describing the roids preview-only skill and runtime/markup wiring (https://tryroids.com/roid-tool.js, data-roid-* attributes); adds skills-lock.json entry recording the skill source and computed hash.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • nams1570
  • N2D4

"I hop through modals, tiny and grand,
Triggers and headers cupped in my hand.
From playground preview to docs that sing,
I celebrate dialogs and the joy they bring. 🥕"

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is empty aside from a boilerplate comment about reading CONTRIBUTING.md. It lacks any explanation of what was changed, why, or how it impacts the codebase. Provide a detailed description explaining the key changes, motivations, and impact. Include sections for what was added/modified, why these changes were made, and any breaking changes or migration notes if applicable.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Onboarding app redesign' is partially related to the changeset. While several files involve onboarding-related changes, the PR encompasses significantly broader changes including new DesignDialog component implementation, auth-methods page refactoring, sign-up-rules page modernization, and unrelated app-card documentation updates. Consider a more comprehensive title that reflects the full scope, such as 'Introduce DesignDialog component and modernize dashboard pages with design system' or split into separate, more focused PRs.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch onboarding-app-redesign

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Redesigns multiple dashboard surfaces to the new design language, introducing a canonical DesignDialog wrapper and migrating several pages/components to the updated visual patterns.

Changes:

  • Added DesignDialog to @stackframe/dashboard-ui-components and documented it as the standard modal surface for the dashboard.
  • Refactored sign-up rules UI (rules list, trigger-history dialog, tester UI scaffolding) to use design-components and improved layout/atoms.
  • Updated onboarding + auth methods pages/components to new card/setting patterns, plus added local UX helpers (menus, badges, alerts, etc.).

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
skills-lock.json Adds a skills lock entry (roids).
packages/dashboard-ui-components/src/index.ts Re-exports new DesignDialog components/types.
packages/dashboard-ui-components/src/components/dialog.tsx Introduces the canonical DesignDialog wrapper around dialog primitives.
apps/dashboard/src/components/ui/action-dialog.tsx Adds outside-interaction dismissal controls + content class override.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sign-up-rules/page-client.tsx Major redesign of the sign-up rules page; adopts design-components and new dialog usage in parts.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/onboarding/page-client.tsx Migrates onboarding email-verification confirmation UX to DesignDialog and extracts setting UI.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/onboarding/onboarding-email-verification-setting.tsx New compact “setting strip” component for email verification toggle.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/design-language/page-client.tsx Adds DesignDialog demos and props documentation to design-language page.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx Redesigns provider configuration dialog content + provider tile UI using design-components.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/page-client.tsx Redesigns auth methods settings layout (cards/rows/menus) and adds email verification toggle flow.
apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/playground/page-client.tsx Adds a playground section for testing DesignDialog variants/sizes/props.
apps/dashboard/DESIGN-GUIDE.md Documents DesignDialog as the canonical dashboard modal surface and when to use it.
.agents/skills/roids/SKILL.md Adds the roids skill documentation file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 22, 2026

Greptile Summary

Introduces a new DesignDialog component as the canonical glassmorphic modal surface for the dashboard, then migrates the auth-methods, onboarding, and sign-up-rules pages to use it alongside a broader visual redesign.

  • DesignDialog: New reusable modal surface with configurable size, variant, header/footer regions, and icon chip. Correctly uses Map for style lookups and includes a11y fallback title in dev.
  • Auth-methods page redesign: Extracts useEmailVerificationToggle hook with a confirmation dialog that now correctly wraps pendingChange.onConfirm() with runAsynchronouslyWithAlert, resolving the P1 from the previous review cycle.
  • Sign-up-rules page refactor: RuleTriggerHistoryDialog and TestRulesDialog migrated from hand-wired Dialog + DialogContent to DesignDialog; RuleEditor state extracted into useRuleEditorState + SaveCancelButtons.

Confidence Score: 5/5

Safe to merge. All changed paths are UI-layer dashboard components with no changes to API routes, auth logic, or data schemas.

The previous cycle's concern about the confirmation dialog's async handler is now correctly addressed. The remaining comments are about a missing concurrency guard on a toggle and a pre-existing pattern in a refactored component.

auth-methods/page-client.tsx (rapid-toggle race) and sign-up-rules/page-client.tsx (SaveCancelButtons async handler).

Important Files Changed

Filename Overview
packages/dashboard-ui-components/src/components/dialog.tsx New canonical DesignDialog surface. Correctly uses Map for size/surface/overlay classes, includes a11y fallback title, and delegates to the existing stack-ui Dialog primitives.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/page-client.tsx Major redesign with useEmailVerificationToggle hook. The confirmation okButton.onClick now correctly wraps pendingChange.onConfirm() with runAsynchronouslyWithAlert. Hook has no concurrency guard against rapid toggling.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/onboarding/page-client.tsx Migrated to DesignDialog. Enable button correctly uses runAsynchronouslyWithAlert; isConfirming state properly prevents re-entrant confirms.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sign-up-rules/page-client.tsx Dialogs migrated to DesignDialog; RuleEditor extracted into useRuleEditorState + SaveCancelButtons. SaveCancelButtons calls onClick without runAsynchronouslyWithAlert.
apps/dashboard/src/components/ui/action-dialog.tsx Adds keepOpenOnOutsideInteraction and contentClassName props correctly.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx Provider settings form redesigned with Design* components. Logic unchanged, visual migration only.
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 3
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/page-client.tsx:441-443
The `useEmailVerificationToggle` hook has no guard against concurrent invocations. `onCheckedChange` fires `runAsynchronouslyWithAlert(handleChange(next))` on every toggle click; if the user rapidly toggles, two `handleChange` calls can race — both read the same `projectConfig.onboarding.requireEmailVerification` snapshot, and the one that lands last wins regardless of order. Add a simple in-flight guard so a second toggle is ignored until the first completes.

```suggestion
  const [isChanging, setIsChanging] = useState(false);
  const onCheckedChange = (next: boolean) => {
    if (isChanging) return;
    setIsChanging(true);
    runAsynchronouslyWithAlert(handleChange(next).finally(() => setIsChanging(false)));
  };
```

### Issue 2 of 3
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/page-client.tsx:789-800
**Duplicate type definitions across pages**

`AffectedUser` and `PendingChange` are defined identically here and in `onboarding/page-client.tsx`. If the shape of either type evolves, both files must be updated in sync. Consider extracting to a shared module.

### Issue 3 of 3
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sign-up-rules/page-client.tsx:632-636
**`SaveCancelButtons` async `onClick` not wrapped with `runAsynchronouslyWithAlert`**

`state.handleSave` is an async function whose internal try/finally only resets `isSaving` — it does not catch network or API errors. Calling it directly from `onClick` means a failure in `onSave(ruleId, ...)` becomes an unhandled promise rejection with no user feedback. Per the team's convention, async button handlers should go through `runAsynchronouslyWithAlert`.

Reviews (4): Last reviewed commit: "fix(dashboard): address remaining PR rev..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sign-up-rules/page-client.tsx (1)

416-439: ⚠️ Potential issue | 🟠 Major

Remove the return from finally.

Line 437 can suppress errors from the try/catch path and is already flagged by Biome’s noUnsafeFinally.

Proposed fix
     } finally {
-      if (nextRequestId !== latestRequestIdRef.current) return;
-      if (reset) setIsInitialLoading(false);
-      else setIsLoadingMore(false);
+      if (nextRequestId === latestRequestIdRef.current) {
+        if (reset) setIsInitialLoading(false);
+        else setIsLoadingMore(false);
+      }
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/sign-up-rules/page-client.tsx
around lines 416 - 439, The finally block currently uses "if (nextRequestId !==
latestRequestIdRef.current) return;" which can suppress errors from the
try/catch; remove the return and instead guard only the side-effects: replace
the early-return in the finally with a conditional that only skips the
state-updating calls (use "if (nextRequestId === latestRequestIdRef.current) {
if (reset) setIsInitialLoading(false); else setIsLoadingMore(false); }" or
equivalent), keeping the same check used earlier (nextRequestId vs
latestRequestIdRef.current) so you no longer return from finally and errors are
not swallowed; update the finally in the function that contains
latestRequestIdRef, nextRequestId, setIsInitialLoading, and setIsLoadingMore
accordingly.
🧹 Nitpick comments (2)
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx (1)

140-146: Encode provider IDs when building URLs.

These URL/path strings interpolate providerId directly. Prefer encodeURIComponent() for consistency with the repo URL-construction rule.

Suggested cleanup
 function RedirectInline({ providerId }: { providerId: string }) {
+  const encodedProviderId = encodeURIComponent(providerId);
   return (
@@
-        <InlineCode>{`${getPublicEnvVar('NEXT_PUBLIC_STACK_API_URL')}/api/v1/auth/oauth/callback/${providerId}`}</InlineCode>
+        <InlineCode>{`${getPublicEnvVar('NEXT_PUBLIC_STACK_API_URL')}/api/v1/auth/oauth/callback/${encodedProviderId}`}</InlineCode>
@@
 function DocsTextLink({ providerId }: { providerId: string }) {
+  const docsProviderSlug = providerId === "x" ? "x-twitter" : providerId;
   return (
     <Link
-      href={`https://docs.stack-auth.com/docs/concepts/auth-providers/${providerId === "x" ? "x-twitter" : providerId}`}
+      href={`https://docs.stack-auth.com/docs/concepts/auth-providers/${encodeURIComponent(docsProviderSlug)}`}

As per coding guidelines, Use urlString`` or encodeURIComponent() instead of normal string interpolation for URLs, for consistency even if it's not strictly necessary.

Also applies to: 246-250

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx
around lines 140 - 146, The RedirectInline component builds a callback URL by
interpolating providerId directly; update this to encode the providerId (e.g.,
via encodeURIComponent or the repo's urlString helper) so paths are safe —
modify the string construction inside RedirectInline (where
getPublicEnvVar('NEXT_PUBLIC_STACK_API_URL') and InlineCode are used) to encode
providerId before concatenation, and apply the same change to the other
occurrences noted around lines 246-250.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/page-client.tsx (1)

602-606: Avoid any for the config update payload.

This can be typed precisely without bypassing the type system.

Proposed fix
-    const configUpdate: Record<string, any> = { 'auth.allowSignUp': newAllowSignUp };
+    const configUpdate: Record<string, boolean | OAuthAccountMergeStrategy> = {
+      'auth.allowSignUp': newAllowSignUp,
+    };

As per coding guidelines, Try to avoid the any type. Whenever you need to use any, leave a comment explaining why you're using it.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/auth-methods/page-client.tsx
around lines 602 - 606, The configUpdate is typed as Record<string, any>;
replace this with a precise type (e.g., an interface or existing
ConfigUpdate/Partial<Config> type) that reflects the known keys and value types:
'auth.allowSignUp' should be boolean and 'auth.oauth.accountMergeStrategy'
should be the specific enum/string type used by your auth config (use the same
type as localMergeStrategy). Update the declaration of configUpdate (and any
helper types) to use that concrete type and pass it to updateConfig({ adminApp:
stackAdminApp, configUpdate, pushable: true }) so you avoid any and keep
type-safety for config updates.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/skills/roids/SKILL.md:
- Around line 14-16: Add an explicit production boundary to the implementation
instructions: state clearly that the TryRoids hosted runtime
(https://tryroids.com/roid-tool.js) and any wiring described in SKILL.txt are
intended only for sandboxed previews and must never be included in production
dashboard or app code; update the text near the "How it works" section to say
"preview-only / not for production." Also reconcile the loading contradiction by
clarifying that "wire" refers to using the inline markup pattern and data
attributes (e.g., data-roid-*) per SKILL.txt as documentation, and that agents
should not inject or rely on a <script src="https://tryroids.com/roid-tool.js">
in production — if needed for previews only reference the URL in docs or load it
in a sandboxed preview runner, not in app code.

In `@apps/dashboard/DESIGN-GUIDE.md`:
- Line 67: Update the stale section reference that currently points to "§22" to
the correct new section "§4.14" in the sentence that instructs using
DesignDialog (the line mentioning "DesignDialog" and "§22"); replace only the
section number so the sentence reads that DesignDialog is the canonical dialog
surface — see §4.14.

In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/design-language/page-client.tsx:
- Around line 1237-1245: Update the props table to match the real API: change
the "trigger" prop type to React.ReactElement to match DesignDialogProps, and
rename/document the close helper as DesignDialogClose (the exported re-export
used in examples) so the docs reflect the actual symbols; keep existing
descriptions but ensure the type cell for "trigger" shows "React.ReactElement"
and any reference to the close helper uses the identifier DesignDialogClose.

In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/onboarding/page-client.tsx:
- Around line 66-72: The Enable button handler currently calls
pendingChange.onConfirm() directly making the button remain clickable and
swallowing errors; update the DesignButton onClick to set a local loading state
(e.g., isConfirming) while awaiting the operation and use
runAsynchronouslyWithAlert (or runAsynchronously) to execute
pendingChange.onConfirm() so errors are surfaced to the alert helper and the UI
is disabled during the call; specifically, reference the DesignButton,
pendingChange, and its onConfirm method to wrap the call with
runAsynchronouslyWithAlert(...) and toggle the loading boolean so the button
shows a loading/disabled state and prevents double submits.

In `@packages/dashboard-ui-components/src/components/dialog.tsx`:
- Around line 60-78: The props type allows creating an unnamed modal; update the
API to enforce an accessible name by either making title required on
DesignDialogProps or adding a runtime guard in the DesignDialog component that
throws or logs an error when neither the standard title prop nor a custom
accessible header is provided (i.e., when title is falsy and customHeader does
not include a DialogTitle accessible element). Reference the DesignDialogProps
type (title, customHeader) and the DesignDialog component render path to
implement the change so the dialog always has a programmatic accessible name.

---

Outside diff comments:
In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/sign-up-rules/page-client.tsx:
- Around line 416-439: The finally block currently uses "if (nextRequestId !==
latestRequestIdRef.current) return;" which can suppress errors from the
try/catch; remove the return and instead guard only the side-effects: replace
the early-return in the finally with a conditional that only skips the
state-updating calls (use "if (nextRequestId === latestRequestIdRef.current) {
if (reset) setIsInitialLoading(false); else setIsLoadingMore(false); }" or
equivalent), keeping the same check used earlier (nextRequestId vs
latestRequestIdRef.current) so you no longer return from finally and errors are
not swallowed; update the finally in the function that contains
latestRequestIdRef, nextRequestId, setIsInitialLoading, and setIsLoadingMore
accordingly.

---

Nitpick comments:
In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/auth-methods/page-client.tsx:
- Around line 602-606: The configUpdate is typed as Record<string, any>; replace
this with a precise type (e.g., an interface or existing
ConfigUpdate/Partial<Config> type) that reflects the known keys and value types:
'auth.allowSignUp' should be boolean and 'auth.oauth.accountMergeStrategy'
should be the specific enum/string type used by your auth config (use the same
type as localMergeStrategy). Update the declaration of configUpdate (and any
helper types) to use that concrete type and pass it to updateConfig({ adminApp:
stackAdminApp, configUpdate, pushable: true }) so you avoid any and keep
type-safety for config updates.

In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx:
- Around line 140-146: The RedirectInline component builds a callback URL by
interpolating providerId directly; update this to encode the providerId (e.g.,
via encodeURIComponent or the repo's urlString helper) so paths are safe —
modify the string construction inside RedirectInline (where
getPublicEnvVar('NEXT_PUBLIC_STACK_API_URL') and InlineCode are used) to encode
providerId before concatenation, and apply the same change to the other
occurrences noted around lines 246-250.
🪄 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

Run ID: a77a4007-1f1d-4de3-86c2-7d436b0964ee

📥 Commits

Reviewing files that changed from the base of the PR and between f89b97b and 28ac2bf.

📒 Files selected for processing (13)
  • .agents/skills/roids/SKILL.md
  • apps/dashboard/DESIGN-GUIDE.md
  • apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/playground/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/design-language/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/onboarding/onboarding-email-verification-setting.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/onboarding/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sign-up-rules/page-client.tsx
  • apps/dashboard/src/components/ui/action-dialog.tsx
  • packages/dashboard-ui-components/src/components/dialog.tsx
  • packages/dashboard-ui-components/src/index.ts
  • skills-lock.json

Comment thread .agents/skills/roids/SKILL.md Outdated
Comment thread apps/dashboard/DESIGN-GUIDE.md Outdated
Comment thread packages/dashboard-ui-components/src/components/dialog.tsx
Addresses PR #1370 review comment: React was not imported, so React.ReactNode
caused a TypeScript error. Use named ReactNode import instead.
…eneration

- Updated the confirmation button in the email verification toggle to handle pending changes more robustly by using `runAsynchronouslyWithAlert`.
- Replaced static switch ID with a dynamic ID generated using `useId` in the onboarding email verification setting for better accessibility and uniqueness.
- Ensured consistent handling of pending changes across components to enhance user experience.
Copy link
Copy Markdown

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

Critical security vulnerability: Email validation removed from team invitation acceptance handler, allowing any authenticated user with an invitation code to accept it as themselves regardless of intended recipient email

Fix on Vercel

- Updated the app-card component to include the Film icon for the "session-replays" app.
- Adjusted the import statement to include the new icon from lucide-react.
- sign-up-rules: replace unsafe return-in-finally with conditional state updates
- sign-up-rules: replace unsafe `as ActionType` / `as 'allow'|'reject'` casts with type guards
- sign-up-rules: migrate RuleTriggerHistoryDialog and TestRulesDialog from hand-wired Dialog* primitives to DesignDialog
- onboarding: guard Enable email-verification dialog against double-submit while confirming
- design-language: align DesignDialog props table with actual API (ReactElement trigger, DesignDialogClose)
- DesignDialog: warn in dev and render an sr-only DialogTitle fallback when no accessible name is provided
@mantrakp04
Copy link
Copy Markdown
Collaborator

@greptile-ai review

- Updated ConditionsPanel and NumberedStep components for better visual consistency with a white background and improved ring styles.
- Refactored SortableRuleRow to use a grid layout, enhancing the display of rule entries and adding an order label.
- Adjusted DefaultActionRow to improve layout and styling, ensuring a more cohesive design.
- Replaced DesignMenu with DesignSelectorDropdown for better functionality in action selection.
- General improvements to class names and structure for better responsiveness and accessibility.
- Updated the app-card component to exclude the Film icon for the "session-replays" app.
- Adjusted the import statement to reflect the removal of the icon from lucide-react.
- Modified the confirmation button in the email verification toggle to use an async function for handling pending changes, ensuring proper execution of the confirmation process.
- This change enhances the user experience by preventing potential issues with double submissions.
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.

3 participants