Skip to content

refactor: server actions to trpc#353

Draft
sarimrmalik wants to merge 4 commits into
mainfrom
refactor/server-actions-to-trpc
Draft

refactor: server actions to trpc#353
sarimrmalik wants to merge 4 commits into
mainfrom
refactor/server-actions-to-trpc

Conversation

@sarimrmalik
Copy link
Copy Markdown
Collaborator

No description provided.

- Introduced `killSandbox` method in the `SandboxesRepository` to handle sandbox deletion.
- Removed the deprecated `sandbox-actions.ts` file and migrated the kill action to the TRPC router.
- Updated the `KillButton` component to use `useMutation` from React Query for improved state management and error handling.
- Enhanced user feedback with toast notifications for success and error scenarios.

This change streamlines the sandbox management process and aligns with the new API structure.
- Removed the deprecated `getUserAccessTokenAction` from user-actions.
- Introduced a new `accountRouter` with a `getUserAccessToken` mutation to handle access token retrieval.
- Updated the `UserAccessToken` component to use `useMutation` from React Query for improved state management and error handling.

This change enhances the API structure and aligns with the new TRPC approach for user actions.
…or handling

- Replaced the deprecated `getUsage` function with a TRPC call to `billing.getUsage` for fetching usage data.
- Updated the `UsagePage` component to handle errors more gracefully, providing clearer error messages.
- Removed the obsolete `get-usage.ts` file to streamline the codebase.

This change aligns the usage data retrieval with the new TRPC architecture and improves the user experience during data loading failures.
…deprecated functions

- Deleted the `getTeamMetrics` and `getTeamMetricsMax` functions in favor of TRPC calls.
- Updated components to utilize the new TRPC structure for fetching team metrics.
- Enhanced error handling in the UI to provide clearer feedback during data loading failures.

This change aligns the metrics retrieval process with the new TRPC architecture, improving maintainability and user experience.
@cla-bot cla-bot Bot added the cla-signed label Jun 4, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 4, 2026

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

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 4, 2026 7:42pm
web-juliett Ready Ready Preview, Comment Jun 4, 2026 7:42pm

Request Review

@sarimrmalik sarimrmalik changed the title Refactor/server actions to trpc (refactor) server actions to trpc Jun 4, 2026
@sarimrmalik sarimrmalik changed the title (refactor) server actions to trpc refactor: server actions to trpc Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant