Skip to content

feat: export admin page as a component and consume it in apps/admin#1375

Open
paanSinghCoder wants to merge 57 commits intomainfrom
feat/export-admins-page
Open

feat: export admin page as a component and consume it in apps/admin#1375
paanSinghCoder wants to merge 57 commits intomainfrom
feat/export-admins-page

Conversation

@paanSinghCoder
Copy link
Contributor

@paanSinghCoder paanSinghCoder commented Feb 10, 2026

Summary

  • Moved the Admins (Super Admins) page from apps/admin/src/containers/super_admins/ to lib/admin/views/admins/ using git mv to preserve history.
  • Exported AdminsView from @raystack/frontier/admin as a router-agnostic view (same behavior: list platform users + service users, client-side table, "Super Admins" header).
  • Added a thin AdminsPage wrapper in apps/admin that renders <AdminsView />.
  • Updated the super-admins route to use AdminsPage; route path and behavior unchanged.

Test plan

  • Super Admins list loads with platform users and service users.
  • Table sorting/filtering works (client-side).
  • Organization link in table navigates to /organizations/:orgId.
  • Lib build: pnpm build in web/lib.
  • App build: pnpm build in web/apps/admin.

Base automatically changed from feat/export-audit-logs-page to feat/export-products-page February 16, 2026 06:23
Base automatically changed from feat/export-products-page to feat/export-invoices-page February 16, 2026 06:23
Base automatically changed from feat/export-invoices-page to refactor/admin-ui-child February 16, 2026 06:24
Base automatically changed from refactor/admin-ui-child to main February 16, 2026 06:45
Copy link

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

Caution

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

⚠️ Outside diff range comments (1)
web/apps/admin/vite.config.ts (1)

3-41: ⚠️ Potential issue | 🟡 Minor

Resolve react-router-dom via Node resolution to avoid workspace layout coupling.

The hard-coded node_modules/react-router-dom path assumes a specific install layout; with pnpm's symlink-based resolution, this can be fragile across different setups. The similar vite config in web/apps/client-demo doesn't use this alias and resolves the package without issue—consider whether the alias is necessary. If it must be retained, use dynamic resolution (e.g., createRequire(...).resolve) instead of relying on a hard-coded path.

💡 Suggested fix (portable alias resolution)
import react from "@vitejs/plugin-react-swc";
import dotenv from "dotenv";
import path from "path";
import { fileURLToPath } from "url";
+import { createRequire } from "module";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import svgr from "vite-plugin-svgr";
dotenv.config();

const __dirname = path.dirname(fileURLToPath(import.meta.url));
+const require = createRequire(import.meta.url);
+const reactRouterDomPath = path.dirname(
+  require.resolve("react-router-dom/package.json")
+);

 resolve: {
   alias: {
-    "react-router-dom": path.resolve(__dirname, "node_modules/react-router-dom"),
+    "react-router-dom": reactRouterDomPath,
   },
 },

@paanSinghCoder paanSinghCoder removed the Do not merge Label to indicate that the PR is not ready to be merged even though might be (or not) approvals. label Feb 16, 2026
@paanSinghCoder paanSinghCoder added Do not merge Label to indicate that the PR is not ready to be merged even though might be (or not) approvals. labels Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do not merge Label to indicate that the PR is not ready to be merged even though might be (or not) approvals.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments