Skip to content

migrate(admin): SDK admin and SDK app to Apsara v1 (rc.6)#1600

Merged
paanSinghCoder merged 17 commits into
mainfrom
chore/sdk-admin-apsara-v1
May 19, 2026
Merged

migrate(admin): SDK admin and SDK app to Apsara v1 (rc.6)#1600
paanSinghCoder merged 17 commits into
mainfrom
chore/sdk-admin-apsara-v1

Conversation

@paanSinghCoder
Copy link
Copy Markdown
Contributor

@paanSinghCoder paanSinghCoder commented May 12, 2026

Summary

  • Migrate sdk/admin/ (103 files) and apps/admin/src/ (22 files) from Apsara v0 → v1 (rc.6).
  • Swap host auth imports from @raystack/frontier/react (v0) → @raystack/frontier/client (v1). Trims ~680 KB JS / ~80 KB CSS from the admin bundle.
  • Patch AuthHeader to pass align="center" to the inner Headline (was defaulting to left).

Scope

  • v1 changes: Sheet→Drawer, DropdownMenu→Menu, InputField→Field+Input, Tabs.Trigger→Tabs.Tab, Tooltip rewrites, asChild→render, toast()→toastManager, Dialog overlay/aria props, Text/Headline size+weight tokens, Flex/Grid numeric gaps, Command compound rewrite.
  • Host <Toast.Provider> mounted in main.tsx; v0 ToastContainer and sonner removed.
  • sdk/react/views/ left on v0 intentionally (out of scope); views-new/ is already on v1 and surfaced via the /client export.

Test plan

  • pnpm vite build succeeds; bundle smaller than main
  • pnpm exec tsc --noEmit is clean for apps/admin; SDK matches pre-migration baseline (30 pre-existing, 0 net new)
  • Visual: login + magic-link verify pages render with v1 styling
  • Visual: org details page side panel scrolls to last row (Profile: Stripe)
  • Visual: org/user navbar Chips show active highlight on click
  • Toasts fire from SDK admin and host code paths

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

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

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment May 19, 2026 10:27am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Review Change Stack

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

Large-scale migration to @raystack/apsara-v1: UI imports swapped, Sheet→Drawer, DropdownMenu→Menu, Tooltip/Tabs composition updated, Toast.Provider + toastManager adopted, Frontier React → client imports, small CSS tweaks, and convertFilterValue widened.

Changes

Apsara v1 and Frontier client migration

Layer / File(s) Summary
End-to-end migration changes
web/apps/*, web/sdk/*, web/sdk/react/*
All UI imports moved to @raystack/apsara-v1; toast usage consolidated to Toast.Provider + toastManager.add; overlays migrated from SheetDrawer/AlertDialog; menus migrated from DropdownMenuMenu/Menu.Submenu; Tooltip/Tabs composition updated; Frontier React imports switched to client views; minor CSS rule removals/additions; convertFilterValue widened to unknown with safer string conversion.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • raystack/frontier#1594 — Also bumps @raystack/apsara to 1.0.0-rc.6 and changes convertFilterValue to accept unknown with safe string conversion.
  • raystack/frontier#1451 — Similar tooltip refactor in tokens columns, overlapping the Tooltip composition updates here.
  • raystack/frontier#1577 — Updates FrontierProvider usage consistent with this PR’s switch to @raystack/frontier/client.

Suggested reviewers

  • rsbh
  • rohanchkrabrty

@coveralls
Copy link
Copy Markdown

coveralls commented May 12, 2026

Coverage Report for CI Build 26091377587

Coverage remained the same at 42.472%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 37907
Covered Lines: 16100
Line Coverage: 42.47%
Coverage Strength: 11.91 hits per line

💛 - Coveralls

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: 11

Caution

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

⚠️ Outside diff range comments (3)
web/sdk/admin/components/multiselect/multiselect/index.tsx (1)

77-84: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add data-test-id attribute for the Clear action.

Consistent with the options above, the Clear button should also have a data-test-id attribute for test automation.

🧪 Proposed fix
-<Command.Item onClick={onClear}>
+<Command.Item onClick={onClear} data-test-id="admin-multiselect-clear">
   <Flex
     justify="center"
web/sdk/admin/views/organizations/details/edit/organization.tsx (1)

127-127: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Review the watch default value for better UX.

The watch call uses "other" as the default value: when type is undefined (which it is initially since defaultValues is {}), watch returns "other", causing showOtherTypeField to be true and the "industry (other)" field to display before the user selects an industry.

Consider removing the default parameter so the field only appears after the user explicitly selects "Other":

Proposed fix
-  const showOtherTypeField = watch("type", "other") === "other";
+  const showOtherTypeField = watch("type") === "other";
web/sdk/admin/views/users/details/security/sessions/revoke-session-final-confirm.tsx (1)

23-31: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Await onConfirm to handle async operations properly.

At line 25, onConfirm() is not awaited inside the async try/catch. If the callback is ever async, promise rejections will not be caught and error handling will be bypassed. While the current call sites pass synchronous functions, the component should support async callbacks for better flexibility.

Proposed fix
 interface RevokeSessionFinalConfirmProps {
   isOpen: boolean;
   onOpenChange: (isOpen: boolean) => void;
-  onConfirm: () => void;
+  onConfirm: () => void | Promise<void>;
   isLoading?: boolean;
 }
@@
   const handleConfirm = async () => {
     try {
-      onConfirm();
+      await onConfirm();
       onOpenChange(false);
     } catch (error: any) {
       toastManager.add({
♻️ Duplicate comments (1)
web/sdk/admin/components/SheetHeader.tsx (1)

3-3: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Verify the apsara-v1 Text API usage.

Same verification concern as in web/apps/admin/src/components/sheet/header.tsx: confirm that size="regular" and weight="medium" are valid apsara-v1 Text props and produce the expected visual output.

Also applies to: 14-16

🧹 Nitpick comments (1)
web/sdk/admin/views/organizations/details/layout/invite-users-dialog.tsx (1)

129-139: 💤 Low value

Type assertion could be avoided.

The as string cast suggests TypeScript can't infer the type. Since the zod transform (line 36) runs only at validation time, field.value should always be a string during rendering. The defensive Array.isArray() check is likely unnecessary.

♻️ Simplify by removing defensive logic
 render={({ field }) => {
-  const { value, ...rest } = field;
   return (
     <TextArea
-      {...rest}
-      value={Array.isArray(value) ? value.join(", ") : (value ?? "") as string}
+      {...field}
+      value={field.value ?? ""}
       placeholder="abc@example.com, xyz@example.com"
       className={styles['invite-users-emails-textarea']}
     />
   );
 }}

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3dfe76d2-419d-425d-b9d0-5016a365c7d8

📥 Commits

Reviewing files that changed from the base of the PR and between f4d3398 and c4beddf.

⛔ Files ignored due to path filters (1)
  • web/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (126)
  • web/apps/admin/package.json
  • web/apps/admin/src/App.tsx
  • web/apps/admin/src/components/Layout.tsx
  • web/apps/admin/src/components/Price.tsx
  • web/apps/admin/src/components/Sidebar/index.tsx
  • web/apps/admin/src/components/Sidebar/sidebar.module.css
  • web/apps/admin/src/components/assign-role.tsx
  • web/apps/admin/src/components/collapsable-search/index.tsx
  • web/apps/admin/src/components/dialog/header.tsx
  • web/apps/admin/src/components/error-boundary.tsx
  • web/apps/admin/src/components/page-header.tsx
  • web/apps/admin/src/components/sheet/header.tsx
  • web/apps/admin/src/components/states/Loading.tsx
  • web/apps/admin/src/components/states/Unauthorized.tsx
  • web/apps/admin/src/configs/theme.tsx
  • web/apps/admin/src/containers/login.tsx
  • web/apps/admin/src/containers/magiclink.tsx
  • web/apps/admin/src/hooks/useRQL.tsx
  • web/apps/admin/src/layout/auth.tsx
  • web/apps/admin/src/main.tsx
  • web/apps/admin/src/routes.tsx
  • web/apps/admin/src/utils/transform-query.ts
  • web/sdk/admin/components/AssignRole.tsx
  • web/sdk/admin/components/CustomField.tsx
  • web/sdk/admin/components/PageHeader.tsx
  • web/sdk/admin/components/SheetFooter.tsx
  • web/sdk/admin/components/SheetHeader.tsx
  • web/sdk/admin/components/multiselect/multiselect/index.tsx
  • web/sdk/admin/views/admins/columns.tsx
  • web/sdk/admin/views/admins/index.tsx
  • web/sdk/admin/views/audit-logs/actor-cell.tsx
  • web/sdk/admin/views/audit-logs/columns.tsx
  • web/sdk/admin/views/audit-logs/index.tsx
  • web/sdk/admin/views/audit-logs/navbar.tsx
  • web/sdk/admin/views/audit-logs/sidepanel-details.tsx
  • web/sdk/admin/views/audit-logs/sidepanel-list-id.tsx
  • web/sdk/admin/views/audit-logs/sidepanel-list-link.tsx
  • web/sdk/admin/views/audit-logs/sidepanel-log-dialog.tsx
  • web/sdk/admin/views/invoices/columns.tsx
  • web/sdk/admin/views/invoices/index.tsx
  • web/sdk/admin/views/invoices/navbar.tsx
  • web/sdk/admin/views/organizations/details/apis/columns.tsx
  • web/sdk/admin/views/organizations/details/apis/details-dialog.tsx
  • web/sdk/admin/views/organizations/details/apis/index.tsx
  • web/sdk/admin/views/organizations/details/edit/billing.tsx
  • web/sdk/admin/views/organizations/details/edit/kyc.tsx
  • web/sdk/admin/views/organizations/details/edit/organization.tsx
  • web/sdk/admin/views/organizations/details/invoices/columns.tsx
  • web/sdk/admin/views/organizations/details/invoices/index.tsx
  • web/sdk/admin/views/organizations/details/layout/add-tokens-dialog.tsx
  • web/sdk/admin/views/organizations/details/layout/index.tsx
  • web/sdk/admin/views/organizations/details/layout/invite-users-dialog.tsx
  • web/sdk/admin/views/organizations/details/layout/navbar.tsx
  • web/sdk/admin/views/organizations/details/members/columns.tsx
  • web/sdk/admin/views/organizations/details/members/index.tsx
  • web/sdk/admin/views/organizations/details/members/remove-member.tsx
  • web/sdk/admin/views/organizations/details/pat/columns.tsx
  • web/sdk/admin/views/organizations/details/pat/components/pat-details-dialog.tsx
  • web/sdk/admin/views/organizations/details/pat/index.tsx
  • web/sdk/admin/views/organizations/details/projects/columns.tsx
  • web/sdk/admin/views/organizations/details/projects/index.tsx
  • web/sdk/admin/views/organizations/details/projects/members/add-members-dropdown.tsx
  • web/sdk/admin/views/organizations/details/projects/members/assign-role.tsx
  • web/sdk/admin/views/organizations/details/projects/members/columns.tsx
  • web/sdk/admin/views/organizations/details/projects/members/index.tsx
  • web/sdk/admin/views/organizations/details/projects/members/remove-member.tsx
  • web/sdk/admin/views/organizations/details/projects/rename-project.tsx
  • web/sdk/admin/views/organizations/details/projects/use-add-project-members.tsx
  • web/sdk/admin/views/organizations/details/security/block-organization.tsx
  • web/sdk/admin/views/organizations/details/security/domains-list.tsx
  • web/sdk/admin/views/organizations/details/security/index.tsx
  • web/sdk/admin/views/organizations/details/side-panel/billing-details-section.tsx
  • web/sdk/admin/views/organizations/details/side-panel/index.tsx
  • web/sdk/admin/views/organizations/details/side-panel/kyc-section.tsx
  • web/sdk/admin/views/organizations/details/side-panel/org-details-section.tsx
  • web/sdk/admin/views/organizations/details/side-panel/plan-details-section.tsx
  • web/sdk/admin/views/organizations/details/side-panel/tokens-details-section.tsx
  • web/sdk/admin/views/organizations/details/tokens/columns.tsx
  • web/sdk/admin/views/organizations/details/tokens/index.tsx
  • web/sdk/admin/views/organizations/list/columns.tsx
  • web/sdk/admin/views/organizations/list/create.tsx
  • web/sdk/admin/views/organizations/list/index.tsx
  • web/sdk/admin/views/organizations/list/navbar.tsx
  • web/sdk/admin/views/plans/columns.tsx
  • web/sdk/admin/views/plans/details.tsx
  • web/sdk/admin/views/plans/header.tsx
  • web/sdk/admin/views/plans/index.tsx
  • web/sdk/admin/views/preferences/PreferencesView.tsx
  • web/sdk/admin/views/preferences/columns.tsx
  • web/sdk/admin/views/preferences/details.tsx
  • web/sdk/admin/views/preferences/index.tsx
  • web/sdk/admin/views/products/columns.tsx
  • web/sdk/admin/views/products/details.tsx
  • web/sdk/admin/views/products/header.tsx
  • web/sdk/admin/views/products/index.tsx
  • web/sdk/admin/views/products/prices/columns.tsx
  • web/sdk/admin/views/products/prices/index.tsx
  • web/sdk/admin/views/roles/columns.tsx
  • web/sdk/admin/views/roles/details.tsx
  • web/sdk/admin/views/roles/header.tsx
  • web/sdk/admin/views/roles/index.tsx
  • web/sdk/admin/views/users/details/layout/layout.tsx
  • web/sdk/admin/views/users/details/layout/membership-dropdown.tsx
  • web/sdk/admin/views/users/details/layout/navbar.tsx
  • web/sdk/admin/views/users/details/layout/side-panel-details.tsx
  • web/sdk/admin/views/users/details/layout/side-panel-membership.tsx
  • web/sdk/admin/views/users/details/layout/side-panel.tsx
  • web/sdk/admin/views/users/details/layout/suspend-user.tsx
  • web/sdk/admin/views/users/details/security/block-user.tsx
  • web/sdk/admin/views/users/details/security/security.tsx
  • web/sdk/admin/views/users/details/security/sessions/index.tsx
  • web/sdk/admin/views/users/details/security/sessions/revoke-session-confirm.tsx
  • web/sdk/admin/views/users/details/security/sessions/revoke-session-final-confirm.tsx
  • web/sdk/admin/views/users/details/security/sessions/session-skeleton.tsx
  • web/sdk/admin/views/users/details/user-details.tsx
  • web/sdk/admin/views/users/list/columns.tsx
  • web/sdk/admin/views/users/list/invite-users.tsx
  • web/sdk/admin/views/users/list/list.tsx
  • web/sdk/admin/views/users/list/navbar.tsx
  • web/sdk/admin/views/webhooks/webhooks/columns.tsx
  • web/sdk/admin/views/webhooks/webhooks/create/index.tsx
  • web/sdk/admin/views/webhooks/webhooks/delete/index.tsx
  • web/sdk/admin/views/webhooks/webhooks/header.tsx
  • web/sdk/admin/views/webhooks/webhooks/index.tsx
  • web/sdk/admin/views/webhooks/webhooks/update/index.tsx
  • web/sdk/react/components/auth-header/auth-header.tsx
💤 Files with no reviewable changes (1)
  • web/apps/admin/src/routes.tsx

Comment thread web/apps/admin/src/components/Sidebar/sidebar.module.css Outdated
Comment thread web/sdk/admin/components/multiselect/multiselect/index.tsx Outdated
Comment thread web/sdk/admin/components/multiselect/multiselect/index.tsx Outdated
Comment thread web/sdk/admin/components/multiselect/multiselect/index.tsx Outdated
Comment thread web/sdk/admin/views/audit-logs/sidepanel-log-dialog.tsx Outdated
Comment thread web/sdk/admin/views/organizations/details/security/index.tsx
Comment thread web/sdk/admin/views/users/details/layout/membership-dropdown.tsx
Comment thread web/sdk/admin/views/users/details/layout/suspend-user.tsx
Comment thread web/sdk/admin/views/webhooks/webhooks/columns.tsx
@paanSinghCoder paanSinghCoder changed the title chore(admin): migrate SDK admin and host app to Apsara v1 (rc.6) chore(admin): migrate SDK admin and SDK app to Apsara v1 (rc.6) May 13, 2026
@paanSinghCoder paanSinghCoder changed the title chore(admin): migrate SDK admin and SDK app to Apsara v1 (rc.6) migrate(admin): SDK admin and SDK app to Apsara v1 (rc.6) May 13, 2026
@paanSinghCoder paanSinghCoder self-assigned this May 13, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…gle (CLD-3132)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… dialog (CLD-3147)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…g stacks correctly

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread web/apps/admin/src/components/dialog/header.tsx Outdated
Comment thread web/apps/admin/src/components/page-header.tsx Outdated
Comment thread web/apps/admin/package.json Outdated
Comment thread web/sdk/admin/components/multiselect/multiselect/index.tsx Outdated
Comment thread web/sdk/admin/components/PageHeader.tsx Outdated
Comment thread web/sdk/admin/views/organizations/details/security/block-organization.tsx Outdated
Comment thread web/sdk/admin/views/organizations/details/security/domains-list.tsx Outdated
Comment thread web/sdk/admin/views/organizations/details/side-panel/billing-details-section.tsx Outdated
Comment thread web/sdk/admin/views/preferences/details.tsx Outdated
Comment thread web/sdk/admin/views/users/details/security/block-user.tsx Outdated
paanSinghCoder and others added 2 commits May 19, 2026 09:06
…ws (#1606)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread web/sdk/admin/components/PageHeader.tsx Outdated
Comment thread docker-compose.yml
Comment thread web/apps/admin/src/components/Sidebar/index.tsx
Comment thread web/apps/admin/src/components/Sidebar/sidebar.module.css Outdated
@paanSinghCoder paanSinghCoder merged commit adb9deb into main May 19, 2026
8 checks passed
@paanSinghCoder paanSinghCoder deleted the chore/sdk-admin-apsara-v1 branch May 19, 2026 10:36
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.

4 participants