Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughSummary by CodeRabbit
WalkthroughIntroduces a new Profile feature to the client-demo settings section. Adds routing and navigation for a profile management page, creates the ProfileView component in the SDK with form handling for user updates, adds CSS styling, and includes necessary UI dependencies. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 10
🧹 Nitpick comments (4)
web/apps/client-demo/package.json (1)
22-22: Consider removing@types/react-router-dom.
react-router-domv7+ includes built-in TypeScript definitions. The@types/react-router-dompackage (v5.3.3) is for older versions and is unnecessary here—it may even cause type conflicts.♻️ Suggested removal
"devDependencies": { "@types/node": "^22.10.0", "@types/react": "^19.2.2", "@types/react-dom": "^19.2.2", - "@types/react-router-dom": "^5.3.3", "@types/uuid": "^10.0.0",web/sdk/tsup.config.ts (1)
41-43: Consider externalizingreact-domfor Hooks APIs for consistency, but it's not currently required.The React APIs build (line 25) externalizes
react-domalongsidereact, but the Hooks APIs build (line 42) only externalizesreact. However, analysis shows the hooks code currently has noreact-domimports, so there's no actual risk of bundling duplicate instances. Adding'react-dom'to the Hooks APIsexternallist (line 42) would be a consistency measure rather than addressing an existing issue.web/apps/client-demo/src/pages/Home.tsx (1)
63-68: Preferorg.idfor the settings URL and test-id key.Using
org.namemakes this path/selector more fragile (renames/encoding).org.idis the safer canonical identifier.♻️ Suggested change
- <Link - to={`/${org.name}/settings`} - data-test-id={`[organization-new-ui-link-${org.name}]`} - > + <Link + to={`/${org.id}/settings`} + data-test-id={`[organization-new-ui-link-${org.id}]`} + > {org.title} (NEW UI) </Link>web/sdk/react/views-new/general/general-view.tsx (1)
286-293: Make the delete opener an explicit non-submit button.If
Buttonkeeps native button semantics, omittingtypehere turns the delete opener into a submit control because it sits inside the update form.type="button"avoids accidentally submitting the form when the dialog is opened.Minimal fix
<Button + type="button" variant="solid" color="danger" onClick={() => setShowDeleteDialog(true)} disabled={!canDeleteWorkspace}
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b5c09c1c-9df2-4153-ac28-26648adadc75
⛔ Files ignored due to path filters (1)
web/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (30)
web/apps/client-demo/package.jsonweb/apps/client-demo/src/App.tsxweb/apps/client-demo/src/Router.tsxweb/apps/client-demo/src/pages/Home.tsxweb/apps/client-demo/src/pages/Settings.tsxweb/apps/client-demo/src/pages/settings/General.tsxweb/apps/client-demo/src/pages/settings/Preferences.tsxweb/apps/client-demo/src/styles.cssweb/sdk/admin/components/SheetFooter.tsxweb/sdk/package.jsonweb/sdk/react/components/image-upload/image-upload.module.cssweb/sdk/react/components/image-upload/image-upload.tsxweb/sdk/react/components/image-upload/index.tsweb/sdk/react/components/view-container/index.tsweb/sdk/react/components/view-container/view-container.module.cssweb/sdk/react/components/view-container/view-container.tsxweb/sdk/react/components/view-header/index.tsweb/sdk/react/components/view-header/view-header.tsxweb/sdk/react/index.tsweb/sdk/react/views-new/general/components/delete-organization-dialog.module.cssweb/sdk/react/views-new/general/components/delete-organization-dialog.tsxweb/sdk/react/views-new/general/general-view.module.cssweb/sdk/react/views-new/general/general-view.tsxweb/sdk/react/views-new/general/index.tsweb/sdk/react/views-new/preferences/components/preference-row.tsxweb/sdk/react/views-new/preferences/components/preferences-row.module.cssweb/sdk/react/views-new/preferences/index.tsweb/sdk/react/views-new/preferences/preferences-view.module.cssweb/sdk/react/views-new/preferences/preferences-view.tsxweb/sdk/tsup.config.ts
web/sdk/react/views-new/general/components/delete-organization-dialog.tsx
Show resolved
Hide resolved
web/sdk/react/views-new/general/components/delete-organization-dialog.tsx
Show resolved
Hide resolved
Pull Request Test Coverage Report for Build 24019201719Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Summary
ProfileViewcomponent inviews-new/profile/using@raystack/apsara-v1primitivesImageUpload, form fields for full name and (read-only) email, and an Update button with dirty-state guarduseFrontier,useMutation,FrontierServiceQueries) — no business logic rewrittenViewContainer/ViewHeaderlayout pattern established by the general and preferences revamps/:orgId/settings/profileand a sidebar nav item