Skip to content

fix: cross-cutting SDK fixes#1577

Merged
rohanchkrabrty merged 11 commits intomainfrom
fix-cross-cuting
Apr 30, 2026
Merged

fix: cross-cutting SDK fixes#1577
rohanchkrabrty merged 11 commits intomainfrom
fix-cross-cuting

Conversation

@rohanchkrabrty
Copy link
Copy Markdown
Contributor

Summary

  • Fix column-width layout shift between loading and loaded state on members, projects, project details, and team details tables (apply table-layout: fixed and explicit header widths matching the service-accounts pattern).
  • Fix billing and plans pages: invoices loading state, plans table overflow, plan card and feature table styling, and confirm-cycle/plan-change dialogs.
  • Refactor service accounts view: details view, projects cell, project-access dialog, token hook (useServiceUserTokens), and column/dialog styling.
  • Add optional toast and theme support to the SDK provider; fix billing permission hook and view-container CSS.
  • Misc cleanup: update import paths, fix copy button usage, remove a stray console log, and tidy tsconfig/shared types.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

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

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Apr 30, 2026 6:13am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@rohanchkrabrty has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 15 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5be91b40-b312-4c5a-9701-fb81a1caea76

📥 Commits

Reviewing files that changed from the base of the PR and between 926a20b and ab75698.

📒 Files selected for processing (1)
  • web/sdk/react/views-new/tokens/tokens-view.tsx
📝 Walkthrough

Walkthrough

The PR introduces conditional provider rendering in FrontierProvider via new boolean props, standardizes table layouts across multiple views by adding fixed table-layout CSS rules, constrains column widths in data table column definitions, refines billing component UI logic, updates loading state conditions to account for missing activeOrganization, and removes a debug console.log statement.

Changes

Cohort / File(s) Summary
Provider Configuration
web/sdk/react/contexts/FrontierProvider.tsx, web/sdk/shared/types.ts
Adds renderThemeProvider and renderToastProvider boolean props to FrontierProvider, introduces OptionalProvider generic helper component for conditional provider wrapping, and extends FrontierProviderProps interface with the two new optional properties.
Table Layout Standardization
web/sdk/react/views-new/members/members-view.module.css, web/sdk/react/views-new/members/members-view.tsx, web/sdk/react/views-new/projects/project-details-view.module.css, web/sdk/react/views-new/projects/project-details-view.tsx, web/sdk/react/views-new/projects/projects-view.module.css, web/sdk/react/views-new/projects/projects-view.tsx, web/sdk/react/views-new/teams/team-details-view.module.css, web/sdk/react/views-new/teams/team-details-view.tsx
Introduces .table CSS class with table-layout: fixed across multiple views and applies it to DataTable.Content components to standardize table column width calculation behavior.
Column Width Constraints
web/sdk/react/views-new/members/components/member-columns.tsx, web/sdk/react/views-new/projects/components/member-columns.tsx, web/sdk/react/views-new/projects/components/project-columns.tsx, web/sdk/react/views-new/teams/components/member-columns.tsx
Adds explicit width constraints (maxWidth, width) to column definitions for role/member columns (300px) and action column headers (32-48px) to match cell sizing.
Billing Component Updates
web/sdk/react/views-new/billing/components/billing-details-card.tsx, web/sdk/react/views-new/billing/components/invoices.tsx
Refactors billing-details-card tooltip/button gating logic to decouple isActionLoading from tooltip state; restructures invoices table layout from toolbar-based to custom header with virtualized content, updates column styling, and broadens loading state to include missing activeOrganization.id.
Loading State Enhancements
web/sdk/react/views-new/tokens/tokens-view.tsx
Extends isLoading flag to become true when activeOrganization?.id is absent, ensuring dependent UI elements reflect missing organization as a loading condition.
Cleanup
web/sdk/react/views-new/preferences/preferences-view.tsx
Removes debug console.log(theme) statement.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • rsbh
  • paanSinghCoder
🚥 Pre-merge checks | ✅ 2
✅ 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.


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
Review rate limit: 0/1 reviews remaining, refill in 13 minutes and 15 seconds.

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

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 28, 2026

Coverage Report for CI Build 25150391793

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage remained the same at 42.353%

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: 37074
Covered Lines: 15702
Line Coverage: 42.35%
Coverage Strength: 11.76 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: 6

Caution

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

⚠️ Outside diff range comments (3)
web/sdk/react/views-new/tokens/tokens-view.tsx (1)

82-90: ⚠️ Potential issue | 🟠 Major

Avoid indefinite loading when there is no active organization.

With the new !activeOrganization?.id clause, the view can stay in loading mode forever after org resolution completes but no org exists, which keeps skeletons and disables actions indefinitely.

💡 Proposed fix
-  const isLoading =
-    !activeOrganization?.id ||
-    isActiveOrganizationLoading ||
-    isBillingAccountLoading ||
-    isTokensLoading ||
-    isPermissionsFetching;
+  const hasActiveOrganization = Boolean(activeOrganization?.id);
+  const isLoading =
+    isActiveOrganizationLoading ||
+    (hasActiveOrganization &&
+      (isBillingAccountLoading || isTokensLoading || isPermissionsFetching));

-  const isTxnDataLoading = isLoading || isTransactionsListLoading;
+  const isTxnDataLoading =
+    isLoading || (hasActiveOrganization && isTransactionsListLoading);
web/sdk/react/views-new/billing/components/payment-method-card.tsx (1)

116-126: ⚠️ Potential issue | 🟡 Minor

Don't show the auth tooltip while the action is loading.

Inside this branch the user is already allowed, so isBtnDisabled only reflects the pending mutation. Wrapping the loading button with AuthTooltipMessage tells authorized users they lack access immediately after clicking.

Proposed fix
-        {!isLoading && isAllowed ? (
-          isBtnDisabled ? (
-            <Tooltip>
-              <Tooltip.Trigger render={<span />}>
-                {actionBtn}
-              </Tooltip.Trigger>
-              <Tooltip.Content>
-                {AuthTooltipMessage}
-              </Tooltip.Content>
-            </Tooltip>
-          ) : actionBtn
-        ) : null}
+        {!isLoading && isAllowed ? actionBtn : null}
web/sdk/react/views-new/billing/components/invoices.tsx (1)

195-222: ⚠️ Potential issue | 🟠 Major

Keep incremental pagination out of the table loading flag.

Line 195 treats isFetchingNextPage as a full-table load. With onLoadMore wired up, every pagination request can push the table back into its loading state and hide already rendered invoices instead of appending smoothly.

Proposed fix
-  const loading = (!activeOrganization?.id || isLoading || isFetchingNextPage) && !isError;
+  const loading = (!activeOrganization?.id || isLoading) && !isError;
🧹 Nitpick comments (2)
web/sdk/react/views-new/service-accounts/components/projects-cell.module.css (1)

9-11: Prevent tooltip overflow on long unbroken names.

max-width alone may still overflow when a project name has no natural breakpoints. Add wrapping behavior for safer rendering.

Suggested patch
 .tooltipContent {
   max-width: 550px;
+  overflow-wrap: anywhere;
 }
web/sdk/react/views-new/service-accounts/hooks/useServiceUserTokens.ts (1)

123-129: Consider exposing query error state.

The hook currently only exposes isLoading, but the underlying useQuery also provides error and isError. Consumers might benefit from being able to display error states when the token fetch fails.

💡 Optional enhancement to expose error state
-  const { data: tokensData, isLoading } = useQuery(
+  const { data: tokensData, isLoading, error, isError } = useQuery(
     FrontierServiceQueries.listServiceUserTokens,
     ...
   );
   
   return {
     tokens,
     isLoading,
+    error,
+    isError,
     addToken,
     removeToken,
     clearFreshTokens
   };

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a572a24e-1ee7-4664-8240-6126253bc949

📥 Commits

Reviewing files that changed from the base of the PR and between d11eb4e and 9668eef.

📒 Files selected for processing (51)
  • web/apps/client-demo/src/pages/settings/Billing.tsx
  • web/sdk/react/components/view-container/view-container.module.css
  • web/sdk/react/contexts/FrontierProvider.tsx
  • web/sdk/react/hooks/useBillingPermission.ts
  • web/sdk/react/views-new/billing/billing-view.module.css
  • web/sdk/react/views-new/billing/billing-view.tsx
  • web/sdk/react/views-new/billing/components/billing-details-card.tsx
  • web/sdk/react/views-new/billing/components/billing-details-dialog.tsx
  • web/sdk/react/views-new/billing/components/confirm-cycle-switch-dialog.tsx
  • web/sdk/react/views-new/billing/components/invoices.tsx
  • web/sdk/react/views-new/billing/components/payment-issue.tsx
  • web/sdk/react/views-new/billing/components/payment-method-card.tsx
  • web/sdk/react/views-new/billing/components/upcoming-billing-cycle.tsx
  • web/sdk/react/views-new/billing/components/upcoming-plan-change-banner.tsx
  • web/sdk/react/views-new/members/components/member-columns.tsx
  • web/sdk/react/views-new/members/members-view.module.css
  • web/sdk/react/views-new/members/members-view.tsx
  • web/sdk/react/views-new/plans/components/confirm-plan-change-dialog.tsx
  • web/sdk/react/views-new/plans/components/feature-table.tsx
  • web/sdk/react/views-new/plans/components/plan-card.module.css
  • web/sdk/react/views-new/plans/components/plan-card.tsx
  • web/sdk/react/views-new/plans/plans-view.tsx
  • web/sdk/react/views-new/preferences/preferences-view.tsx
  • web/sdk/react/views-new/projects/components/member-columns.tsx
  • web/sdk/react/views-new/projects/components/project-columns.tsx
  • web/sdk/react/views-new/projects/project-details-view.module.css
  • web/sdk/react/views-new/projects/project-details-view.tsx
  • web/sdk/react/views-new/projects/projects-view.module.css
  • web/sdk/react/views-new/projects/projects-view.tsx
  • web/sdk/react/views-new/service-accounts/components/add-service-account-dialog.tsx
  • web/sdk/react/views-new/service-accounts/components/add-token-form.tsx
  • web/sdk/react/views-new/service-accounts/components/delete-service-account-dialog.module.css
  • web/sdk/react/views-new/service-accounts/components/delete-service-account-dialog.tsx
  • web/sdk/react/views-new/service-accounts/components/manage-project-access-dialog.tsx
  • web/sdk/react/views-new/service-accounts/components/projects-cell.module.css
  • web/sdk/react/views-new/service-accounts/components/projects-cell.tsx
  • web/sdk/react/views-new/service-accounts/components/revoke-token-dialog.module.css
  • web/sdk/react/views-new/service-accounts/components/revoke-token-dialog.tsx
  • web/sdk/react/views-new/service-accounts/components/service-account-columns.module.css
  • web/sdk/react/views-new/service-accounts/components/service-account-columns.tsx
  • web/sdk/react/views-new/service-accounts/hooks/useServiceUserTokens.ts
  • web/sdk/react/views-new/service-accounts/service-account-details-view.module.css
  • web/sdk/react/views-new/service-accounts/service-account-details-view.tsx
  • web/sdk/react/views-new/service-accounts/service-accounts-view.module.css
  • web/sdk/react/views-new/service-accounts/service-accounts-view.tsx
  • web/sdk/react/views-new/teams/components/member-columns.tsx
  • web/sdk/react/views-new/teams/team-details-view.module.css
  • web/sdk/react/views-new/teams/team-details-view.tsx
  • web/sdk/react/views-new/tokens/tokens-view.tsx
  • web/sdk/shared/types.ts
  • web/sdk/tsconfig.json
💤 Files with no reviewable changes (3)
  • web/sdk/react/views-new/plans/components/confirm-plan-change-dialog.tsx
  • web/sdk/react/views-new/preferences/preferences-view.tsx
  • web/sdk/react/views-new/billing/components/billing-details-dialog.tsx

Comment thread web/apps/client-demo/src/pages/settings/Billing.tsx
Comment thread web/sdk/react/views-new/billing/billing-view.tsx
Comment thread web/sdk/react/views-new/billing/components/billing-details-card.tsx Outdated
Comment thread web/sdk/react/views-new/plans/plans-view.tsx
@rohanchkrabrty rohanchkrabrty changed the title fix: cross-cutting SDK fixes for billing, plans, and tables fix: cross-cutting SDK fixes Apr 28, 2026
@rohanchkrabrty rohanchkrabrty changed the base branch from main to fix-billing-pages April 28, 2026 10:31
Base automatically changed from fix-billing-pages to main April 28, 2026 16:51
@rohanchkrabrty rohanchkrabrty enabled auto-merge (squash) April 30, 2026 06:12
@rohanchkrabrty rohanchkrabrty merged commit 43ffd03 into main Apr 30, 2026
8 checks passed
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