Skip to content

[ENG-763] Allow plugins to add sections in user's profile page - #16575

Open
rithviknishad wants to merge 2 commits into
developfrom
ENG-763-allow-plugins-to-add-sections-in-users-profile-page
Open

[ENG-763] Allow plugins to add sections in user's profile page#16575
rithviknishad wants to merge 2 commits into
developfrom
ENG-763-allow-plugins-to-add-sections-in-users-profile-page

Conversation

@rithviknishad

@rithviknishad rithviknishad commented Jul 16, 2026

Copy link
Copy Markdown
Member

Proposed Changes

  • Allow plugins to add sections in user's profile page

Note

JIRA Ticket: ENG-763

Screenshot (Example)

image

Summary by CodeRabbit

  • New Features
    • Added support for additional sections on user profile pages.
    • Profile sections can now adapt based on the displayed user and whether the profile belongs to the signed-in account.

@rithviknishad
rithviknishad requested review from a team and Copilot July 16, 2026 05:49
@github-actions

Copy link
Copy Markdown

⚠️ Merge Checklist Incomplete

Thank you for your contribution! To help us review your PR efficiently, please complete the merge checklist in your PR description.

Your PR will be reviewed once you have marked the appropriate checklist items.

To update the checklist:

  • Change - [ ] to - [x] for completed items
  • Only check items that are relevant to your PR
  • Leave items unchecked if they don't apply

The checklist helps ensure code quality, testing coverage, and documentation are properly addressed.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 02bbb0f6-b49d-4118-b0b0-e32dd4eb0653

📥 Commits

Reviewing files that changed from the base of the PR and between 504dd8c and ebe2d19.

📒 Files selected for processing (1)
  • src/pluginTypes.ts

Walkthrough

Changes

User profile plugin integration

Layer / File(s) Summary
Profile sections plugin contract
src/pluginTypes.ts
Adds the UserProfileSectionsComponentType props contract and registers UserProfileSections in SupportedPluginComponents.
User summary plugin rendering
src/components/Users/UserSummary.tsx
Imports PLUGIN_Component and renders UserProfileSections with userData and isOwnAccount.

Suggested labels: needs testing

Suggested reviewers: amjithtitus09, jacobjeevan

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description has the change summary and screenshot, but misses required template items like Fixes #issue_number, tagging, and checklist. Add the Fixes reference, the required Tagging line, and fill out the Merge Checklist items, including testing and docs updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: allowing plugins to add sections to a user's profile page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ENG-763-allow-plugins-to-add-sections-in-users-profile-page

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

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploying care-preview with  Cloudflare Pages  Cloudflare Pages

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

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between dd3299d and 504dd8c.

📒 Files selected for processing (2)
  • src/components/Users/UserSummary.tsx
  • src/pluginTypes.ts

Comment thread src/pluginTypes.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" ... /> within UserSummary so 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-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR exposes a new plugin extension point on the user profile summary page, allowing plugins to render additional sections via the existing PLUGIN_Component mechanism.

  • pluginTypes.ts: Adds UserProfileSectionsComponentType typed with user: UserRead, isOwnProfile: boolean, and optional className, then registers it in SupportedPluginComponents as UserProfileSections.
  • UserSummary.tsx: Renders <PLUGIN_Component __name="UserProfileSections" user={userData} isOwnProfile={isOwnAccount} /> between the own-account-only sections and the superuser danger zone, wrapped implicitly by the existing PluginErrorBoundary inside PLUGIN_Component.

Confidence Score: 5/5

This 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.

Important Files Changed

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

Comment thread src/components/Users/UserSummary.tsx
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

🎭 Playwright Test Results

Status: ✅ Passed
Test Shards: 3

Metric Count
Total Tests 334
✅ Passed 334
❌ Failed 0
⏭️ Skipped 0

📊 Detailed results are available in the playwright-final-report artifact.

Run: #10443

@nihal467 nihal467 added waiting for related PR a co-related detail PR is under construction Work in Progress and removed needs testing labels Jul 21, 2026
@nihal467

Copy link
Copy Markdown
Member

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.

Copilot AI review requested due to automatic review settings July 28, 2026 04:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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";

Comment on lines +1 to 5
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";
@rithviknishad rithviknishad added needs testing and removed Work in Progress waiting for related PR a co-related detail PR is under construction labels Jul 29, 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.

4 participants