Skip to content

Data-grid overhaul + session-replays / team-payments dashboard surfaces#1424

Draft
mantrakp04 wants to merge 5 commits intodevfrom
refactor/data-grid-and-dashboard-surfaces
Draft

Data-grid overhaul + session-replays / team-payments dashboard surfaces#1424
mantrakp04 wants to merge 5 commits intodevfrom
refactor/data-grid-and-dashboard-surfaces

Conversation

@mantrakp04
Copy link
Copy Markdown
Collaborator

@mantrakp04 mantrakp04 commented May 8, 2026

Summary

Refactors the dashboard data-grid into a smaller, URL-state-aware primitive and lands several new dashboard surfaces around it: per-user session replays, team-level analytics and payments, and pagination for permission definitions. Also moves session replays out from under /analytics to a top-level surface and adds a project_user.last_active_at index that the new weekly-active metrics depend on.

Base: devHead: refactor/data-grid-and-dashboard-surfaces
Scope: 91 files, +5,644 / −1,858. Assets in this gist.

Screenshots

Captured from a local dev server (dashboard at :8101, dummy project seeded with 26 users). Standard viewport 1920×1200, widescreen 2560×1440.

Users list — data-grid overhaul in context

Light Dark
users-list-light users-list-dark

Widescreen:

Light Dark
users-list-light-wide users-list-dark-wide

User detail — new session-replays card + weekly metrics

Light Dark
user-detail-light user-detail-dark

Widescreen:

Light Dark
user-detail-light-wide user-detail-dark-wide

Session replays — moved out of /analytics

Light Dark
session-replays-light session-replays-dark

Widescreen:

Light Dark
session-replays-light-wide session-replays-dark-wide

Project permissions — new pagination

Light Dark
project-permissions-light project-permissions-dark

Widescreen:

Light Dark
project-permissions-light-wide project-permissions-dark-wide

Other migrated surfaces

Page Light Dark
Project picker projects-light projects-dark
Overview / setup overview-light overview-dark
Teams list teams-list-light teams-list-dark
Team permissions team-permissions-light team-permissions-dark
API keys api-keys-light api-keys-dark

Scroll behaviour — new data-grid on the users list

Light Dark
users-list-scroll-light users-list-scroll-dark

What's new

  • packages/dashboard-ui-components/src/components/data-grid — rewritten. Trimmed data-grid.tsx from ~1.7k LOC, split sizing logic into data-grid-sizing.ts, added use-url-state.ts for URL-synced state, and added data-grid.test.tsx.
  • Session replays moved from …/analytics/replays to …/session-replays (top-level surface). New user-session-replays.tsx card on the user detail page; new internal route.tsx to feed it.
  • Teams detail page gains team-analytics.tsx and team-payments.tsx.
  • Permissions — new shared permission-definitions-pagination.ts consumed by both project and team permission CRUD routes.
  • Backend — Prisma migration add_project_user_last_active_at_idx + a lastActiveAt index that backs the new weekly-active metrics.
  • Polisheditable-input, inline-save-discard, settings.tsx, walkthrough steps, and several data-table components touched in line with the data-grid rewrite.

Notes for reviewers

  • The data-grid rewrite changes the shape of state (now URL-synced), not just internals. Consumers in apps/dashboard/src/components/data-table/* were updated to match — please scan those for any missed knobs.
  • The analytics/replayssession-replays rename is git-tracked as renames; diffs should be small in those files.
  • New SDK surface in packages/template/src/lib/stack-app/session-replays/index.ts and additions in admin-app-impl.ts / server-app-impl.ts mean OpenAPI specs (docs-mintlify/openapi/{admin,client}.json) regenerate; the diff is mostly mechanical.

Test plan

  • pnpm typecheck clean
  • pnpm lint clean
  • Data-grid unit tests pass (packages/dashboard-ui-components)
  • Manual: users list — column resize, sort, filter, paginate; URL state reflects each change and survives reload
  • Manual: user detail — session-replays card lists replays; weekly-metrics card renders without lastActiveAt index migration applied (i.e. on a fresh DB) and after applying it
  • Manual: project + team permissions — pagination cursor advances and stays consistent under search
  • Manual: session-replays top-level page loads; old /analytics/replays/... URL path is no longer expected to be linked anywhere

…ents surfaces

- Rewrite data-grid with URL-synced state, new sizing logic, tests
- Move analytics/replays → session-replays; add per-user session replays card
- Add team-analytics and team-payments to team detail page
- Add project_user.last_active_at index + permission-definitions pagination
- Various editable-input / inline-save-discard / settings polish
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 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 8, 2026 11:48pm
stack-auth-mcp Ready Ready Preview, Comment May 8, 2026 11:48pm
stack-backend Ready Ready Preview, Comment May 8, 2026 11:48pm
stack-dashboard Ready Ready Preview, Comment May 8, 2026 11:48pm
stack-demo Ready Ready Preview, Comment May 8, 2026 11:48pm
stack-docs Ready Ready Preview, Comment May 8, 2026 11:48pm
stack-preview-backend Ready Ready Preview, Comment May 8, 2026 11:48pm
stack-preview-dashboard Ready Ready Preview, Comment May 8, 2026 11:48pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3f6d83f7-d360-4ee7-bdea-7ac8681925d5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/data-grid-and-dashboard-surfaces

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.

…sion handling

- Introduced pagination for teams in the dashboard, allowing for efficient data retrieval and display.
- Updated permission definitions to include cursor-based pagination, improving user experience when navigating through permissions.
- Refactored various components to utilize the new paginated API, ensuring consistency across the application.
- Added error handling for pagination and improved loading states in user session replays and team member tables.
- Enhanced the data grid to support URL-synced state for column widths and visibility, improving user customization options.

This update significantly enhances the dashboard's performance and usability, particularly for users managing large teams and permissions.
- Updated the ProjectUser model to simplify indexing on lastActiveAt.
- Refactored permission definitions pagination to utilize a unified schema, improving consistency across project and team permissions.
- Enhanced error handling in pagination logic for better user feedback.
- Improved loading states and data retrieval efficiency in various components, including session replays and team permissions.

These changes streamline the permission management experience and optimize data handling in the dashboard.
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.

1 participant