[ENG-763] Allow plugins to add sections in user's profile page - #16575
[ENG-763] Allow plugins to add sections in user's profile page#16575rithviknishad wants to merge 2 commits into
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughChangesUser profile plugin integration
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Deploying care-preview with
|
| Latest commit: |
ebe2d19
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2b5af286.care-preview-a7w.pages.dev |
| Branch Preview URL: | https://eng-763-allow-plugins-to-add.care-preview-a7w.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pluginTypes.ts`:
- Around line 130-135: Replace the inline props object in
UserProfileSectionsComponentType with a named interface containing user,
isOwnProfile, and optional className, then reference that interface in the
React.FC type.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: ad7ec9d0-f14c-4e98-99df-5fab0f30ed19
📒 Files selected for processing (2)
src/components/Users/UserSummary.tsxsrc/pluginTypes.ts
There was a problem hiding this comment.
Pull request overview
Enables CARE plugins to inject additional UI sections into the user profile “Summary” view by exposing a new supported plugin component slot and rendering it in the existing profile summary page.
Changes:
- Adds a new supported plugin component type/key:
UserProfileSections. - Renders
<PLUGIN_Component __name="UserProfileSections" ... />withinUserSummaryso each loaded plugin can contribute profile sections.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/pluginTypes.ts |
Introduces UserProfileSectionsComponentType and registers it under SupportedPluginComponents so plugins can provide this component. |
src/components/Users/UserSummary.tsx |
Injects the new UserProfileSections plugin component into the user summary page with user and isOwnProfile props. |
Greptile SummaryThis PR exposes a new plugin extension point on the user profile summary page, allowing plugins to render additional sections via the existing
Confidence Score: 5/5This PR is safe to merge — it adds a narrow, well-typed plugin slot using the established PLUGIN_Component pattern, with no changes to data fetching, auth logic, or existing rendering paths. The change is minimal: a new type in pluginTypes.ts and a single component insertion in UserSummary.tsx. The userData type flows correctly as UserRead into the new plugin slot, isOwnProfile is derived correctly, and PLUGIN_Component already provides Suspense and PluginErrorBoundary isolation so a broken plugin cannot crash the profile page. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/components/Users/UserSummary.tsx | Adds a PLUGIN_Component call for UserProfileSections between the own-account sections and the superuser danger zone; also reorders imports (already flagged in previous thread). |
| src/pluginTypes.ts | Adds UserProfileSectionsComponentType (accepting UserRead, isOwnProfile, optional className) and registers it in SupportedPluginComponents. |
Reviews (2): Last reviewed commit: "Merge branch 'develop' into ENG-763-allo..." | Re-trigger Greptile
🎭 Playwright Test ResultsStatus: ✅ Passed
📊 Detailed results are available in the playwright-final-report artifact. Run: #10443 |
|
Hey @abhimanyurajeesh , to test this extension, the ABDM PR hasn't been pushed yet. @rithviknishad mentioned that you have another PR that injects data into this page. If that's ready, let me know and I can use it for testing. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/components/Users/UserSummary.tsx:26
- These 3rd-party imports are duplicated after reordering; they should be removed once they’ve been moved to the top of the file.
import { useAtom } from "jotai";
import { useState } from "react";
import { useTranslation } from "react-i18next";
| import { developerModeAtom } from "@/atoms/developerMode"; | ||
| import CareIcon from "@/CAREUI/icons/CareIcon"; | ||
|
|
||
| import LanguageSelector from "@/components/Common/LanguageSelector"; | ||
| import UserColumns, { userChildProps } from "@/components/Common/UserColumns"; | ||
| import { Button } from "@/components/ui/button"; |
Proposed Changes
Note
JIRA Ticket: ENG-763
Screenshot (Example)
Summary by CodeRabbit