fix: cross-cutting SDK fixes#1577
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ 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. Review rate limit: 0/1 reviews remaining, refill in 13 minutes and 15 seconds.Comment |
Coverage Report for CI Build 25150391793Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 42.353%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
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 | 🟠 MajorAvoid indefinite loading when there is no active organization.
With the new
!activeOrganization?.idclause, 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 | 🟡 MinorDon't show the auth tooltip while the action is loading.
Inside this branch the user is already allowed, so
isBtnDisabledonly reflects the pending mutation. Wrapping the loading button withAuthTooltipMessagetells 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 | 🟠 MajorKeep incremental pagination out of the table loading flag.
Line 195 treats
isFetchingNextPageas a full-table load. WithonLoadMorewired 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-widthalone 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 underlyinguseQueryalso provideserrorandisError. 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
📒 Files selected for processing (51)
web/apps/client-demo/src/pages/settings/Billing.tsxweb/sdk/react/components/view-container/view-container.module.cssweb/sdk/react/contexts/FrontierProvider.tsxweb/sdk/react/hooks/useBillingPermission.tsweb/sdk/react/views-new/billing/billing-view.module.cssweb/sdk/react/views-new/billing/billing-view.tsxweb/sdk/react/views-new/billing/components/billing-details-card.tsxweb/sdk/react/views-new/billing/components/billing-details-dialog.tsxweb/sdk/react/views-new/billing/components/confirm-cycle-switch-dialog.tsxweb/sdk/react/views-new/billing/components/invoices.tsxweb/sdk/react/views-new/billing/components/payment-issue.tsxweb/sdk/react/views-new/billing/components/payment-method-card.tsxweb/sdk/react/views-new/billing/components/upcoming-billing-cycle.tsxweb/sdk/react/views-new/billing/components/upcoming-plan-change-banner.tsxweb/sdk/react/views-new/members/components/member-columns.tsxweb/sdk/react/views-new/members/members-view.module.cssweb/sdk/react/views-new/members/members-view.tsxweb/sdk/react/views-new/plans/components/confirm-plan-change-dialog.tsxweb/sdk/react/views-new/plans/components/feature-table.tsxweb/sdk/react/views-new/plans/components/plan-card.module.cssweb/sdk/react/views-new/plans/components/plan-card.tsxweb/sdk/react/views-new/plans/plans-view.tsxweb/sdk/react/views-new/preferences/preferences-view.tsxweb/sdk/react/views-new/projects/components/member-columns.tsxweb/sdk/react/views-new/projects/components/project-columns.tsxweb/sdk/react/views-new/projects/project-details-view.module.cssweb/sdk/react/views-new/projects/project-details-view.tsxweb/sdk/react/views-new/projects/projects-view.module.cssweb/sdk/react/views-new/projects/projects-view.tsxweb/sdk/react/views-new/service-accounts/components/add-service-account-dialog.tsxweb/sdk/react/views-new/service-accounts/components/add-token-form.tsxweb/sdk/react/views-new/service-accounts/components/delete-service-account-dialog.module.cssweb/sdk/react/views-new/service-accounts/components/delete-service-account-dialog.tsxweb/sdk/react/views-new/service-accounts/components/manage-project-access-dialog.tsxweb/sdk/react/views-new/service-accounts/components/projects-cell.module.cssweb/sdk/react/views-new/service-accounts/components/projects-cell.tsxweb/sdk/react/views-new/service-accounts/components/revoke-token-dialog.module.cssweb/sdk/react/views-new/service-accounts/components/revoke-token-dialog.tsxweb/sdk/react/views-new/service-accounts/components/service-account-columns.module.cssweb/sdk/react/views-new/service-accounts/components/service-account-columns.tsxweb/sdk/react/views-new/service-accounts/hooks/useServiceUserTokens.tsweb/sdk/react/views-new/service-accounts/service-account-details-view.module.cssweb/sdk/react/views-new/service-accounts/service-account-details-view.tsxweb/sdk/react/views-new/service-accounts/service-accounts-view.module.cssweb/sdk/react/views-new/service-accounts/service-accounts-view.tsxweb/sdk/react/views-new/teams/components/member-columns.tsxweb/sdk/react/views-new/teams/team-details-view.module.cssweb/sdk/react/views-new/teams/team-details-view.tsxweb/sdk/react/views-new/tokens/tokens-view.tsxweb/sdk/shared/types.tsweb/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
Summary
table-layout: fixedand explicit header widths matching the service-accounts pattern).useServiceUserTokens), and column/dialog styling.