Skip to content

Conversation

@MartinSchoeler
Copy link
Member

@MartinSchoeler MartinSchoeler commented Oct 3, 2025

Proposed changes (including videos or screenshots)

Adds a new field on the User Info that displays the user's ABAC Attributes

For this PR, only the components are being created, later on we will add the property to the user object and filtering logic (the abacAttributes will not be exactly a string[])

Screenshot 2025-10-03 at 10 34 28 Screenshot 2025-10-03 at 10 34 12

Issue(s)

ABAC-46

Steps to test or reproduce

Further comments

Set the PR as chore since these components are not yet available without mocked data

Summary by CodeRabbit

  • New Features

    • User profiles now show a "Subject attributes" section when present, displaying ABAC attributes as tagged items with an explanatory description.
    • Added localized labels and description for the new attributes section.
  • Bug Fixes

    • Roles block now only appears when roles are present.
    • Local time/UTC indicator only shown when a valid offset is available.
  • Tests

    • Added snapshot and accessibility tests for the UserInfo component.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Oct 3, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 7.12.0, but it targets 7.11.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Oct 3, 2025

⚠️ No Changeset found

Latest commit: 40d8233

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Adds ABAC attributes UI: new Tag and Attributes components, UserInfo accepts optional abacAttributes and conditionally renders them with i18n labels, i18n keys added, Storybook includes a WithABACAttributes story, snapshot and a11y tests added, and a non-functional comment inserted in one data wrapper file.

Changes

Cohort / File(s) Summary of changes
UserInfo ABAC UI components
apps/meteor/client/components/UserInfo/UserInfo.tsx, apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx, apps/meteor/client/components/UserInfo/UserInfoABACAttribute.tsx
Added UserInfoABACAttribute (Tag) and UserInfoABACAttributes (wrapping list). UserInfo now accepts an optional abacAttributes prop (tracked with a ts-expect-error placeholder) and conditionally renders an InfoPanelField with i18n label/description when attributes exist. Adjusted roles rendering to use optional chaining and guarded UTCClock rendering by utcOffset.
Storybook and tests
apps/meteor/client/components/UserInfo/UserInfo.stories.tsx, apps/meteor/client/components/UserInfo/UserInfo.spec.tsx
Refactored stories to a Template with centralized defaultArgs, switched decorator to ContextualbarDialog, added WithABACAttributes story supplying abacAttributes. Added tests that snapshot-render all stories and run axe accessibility checks.
i18n additions
packages/i18n/src/locales/en.i18n.json
Added ABAC_Attributes ("Subject attributes") and ABAC_Attributes_description ("User characteristics ABAC uses to determine room access") localization keys.
ContextualBar data view
apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoWithData.tsx
Inserted an explanatory comment above the roles rendering line; no logic or signature changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Browser
  participant UserInfo as UserInfo component
  participant InfoPanel as InfoPanel
  participant I18N as i18n
  participant AttrList as UserInfoABACAttributes
  participant AttrTag as UserInfoABACAttribute

  Browser->>UserInfo: mount(props { abacAttributes?, roles?, utcOffset? })
  UserInfo->>InfoPanel: render base fields (name, username, etc.)
  UserInfo->>I18N: t('ABAC_Attributes_description'), t('ABAC_Attributes')
  alt abacAttributes present && abacAttributes.length > 0
    UserInfo->>AttrList: render(abacAttributes[])
    loop for each attribute
      AttrList->>AttrTag: render(attribute)
    end
  else
    UserInfo-->>InfoPanel: skip ABAC section
  end
  alt utcOffset is integer/truthy
    UserInfo->>InfoPanel: render UTCClock in InfoPanelText
  end
  alt roles?.length > 0
    UserInfo->>InfoPanel: render Roles block
  else
    UserInfo-->>InfoPanel: skip Roles block
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • aleksandernsilva
  • tassoevan

Poem

I hop through code with whiskered glee,
New tags sprout up—ABAC, whee!
In panels neat they take their place,
Stories, tests, all set to race.
Thump-thump! My carrot-shaped tags shine bright. 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning The pull request includes unrelated story refactoring such as switching to ContextualbarDialog wrappers, reorganizing defaultArgs, and adding tests for all UserInfo stories, as well as a comment-only change in UserInfoWithData, which are not directly related to displaying ABAC Attributes per the linked issue objectives. Consider splitting the unrelated story and test infrastructure changes into a separate refactoring pull request or clearly documenting why they are necessary for the ABAC Attributes UI to keep this PR focused on its primary objective.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly summarizes that a new ABAC Attributes field is being added to the user info panel and is concise, focused, and directly reflects the primary change in the pull request.
Linked Issues Check ✅ Passed The pull request fully implements the UI requirements of ABAC-46 by adding the new ABAC Attributes components, integrating them into the UserInfo panel, updating localization keys, and providing corresponding stories and tests to display the ABAC tags as specified.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/ABAC-user-attributes

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c626706 and dbe15ce.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/components/UserInfo/__snapshots__/UserInfo.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (2)
  • apps/meteor/client/components/UserInfo/UserInfo.stories.tsx (1 hunks)
  • apps/meteor/client/components/UserInfo/UserInfo.tsx (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/client/components/UserInfo/UserInfo.tsx
🔇 Additional comments (5)
apps/meteor/client/components/UserInfo/UserInfo.stories.tsx (5)

3-3: LGTM!

The import updates are appropriate for the new decorator structure and role rendering.

Also applies to: 6-6


14-20: LGTM!

The decorator structure is well-implemented with proper accessibility support via the aria-label attribute.


23-32: LGTM!

The centralized defaultArgs pattern improves maintainability. The long bio text effectively tests text overflow scenarios, and the roles array is properly structured with keyed components.


34-36: LGTM!

The Template pattern is correctly implemented with proper spread operator order, allowing story args to override defaults.


38-42: Verify type compatibility for future implementation.

The story correctly demonstrates the ABAC attributes UI. The ts-expect-error directive is appropriate for this mocked data phase.

However, the PR description notes that "abacAttributes will not be exactly a string[]" when integrated. Please verify that the UserInfo component implementation is flexible enough to handle the eventual type without requiring changes to this story.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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 and usage tips.

@codecov
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.50%. Comparing base (31a135c) to head (40d8233).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37135      +/-   ##
===========================================
+ Coverage    67.44%   67.50%   +0.06%     
===========================================
  Files         3289     3293       +4     
  Lines       111887   112426     +539     
  Branches     20442    20450       +8     
===========================================
+ Hits         75463    75894     +431     
- Misses       33741    33856     +115     
+ Partials      2683     2676       -7     
Flag Coverage Δ
e2e 57.31% <44.44%> (+0.01%) ⬆️
e2e-api 40.44% <ø> (-0.10%) ⬇️
unit 71.53% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MartinSchoeler MartinSchoeler marked this pull request as ready for review October 3, 2025 16:29
@MartinSchoeler MartinSchoeler requested a review from a team as a code owner October 3, 2025 16:29
Copy link
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: 2

🧹 Nitpick comments (2)
apps/meteor/client/components/UserCard/UserCardABACAttributes.tsx (1)

14-17: Consider using attribute value as key instead of index.

Using array index as a key is an anti-pattern when list items can be reordered, added, or removed, as it can cause React reconciliation issues and performance problems. Since ABAC attributes are typically unique strings, consider using the attribute value itself as the key.

If attributes are guaranteed to be unique, apply this diff:

 		{abacAttributes.map((attribute, index) => (
-			<Box m={2} fontScale='c2' key={index}>
+			<Box m={2} fontScale='c2' key={attribute}>
 				<UserCardABACAttribute attribute={attribute} />
 			</Box>
 		))}

If duplicate attributes are possible, use a composite key:

 		{abacAttributes.map((attribute, index) => (
-			<Box m={2} fontScale='c2' key={index}>
+			<Box m={2} fontScale='c2' key={`${attribute}-${index}`}>
 				<UserCardABACAttribute attribute={attribute} />
 			</Box>
 		))}
apps/meteor/client/components/UserInfo/UserInfo.tsx (1)

193-193: Simplify to self-closing tag.

The component has no children, so it can use a self-closing tag for cleaner syntax.

Apply this diff:

-							<UserCardABACAttributes abacAttributes={abacAttributes}></UserCardABACAttributes>
+							<UserCardABACAttributes abacAttributes={abacAttributes} />
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ae632f7 and 83e586e.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/components/UserCard/__snapshots__/UserCardABACAttributes.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (6)
  • apps/meteor/client/components/UserCard/UserCardABACAttribute.tsx (1 hunks)
  • apps/meteor/client/components/UserCard/UserCardABACAttributes.spec.tsx (1 hunks)
  • apps/meteor/client/components/UserCard/UserCardABACAttributes.stories.tsx (1 hunks)
  • apps/meteor/client/components/UserCard/UserCardABACAttributes.tsx (1 hunks)
  • apps/meteor/client/components/UserInfo/UserInfo.tsx (4 hunks)
  • packages/i18n/src/locales/en.i18n.json (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
apps/meteor/client/components/UserCard/UserCardABACAttributes.stories.tsx (1)
packages/mock-providers/src/index.ts (1)
  • mockAppRoot (3-3)
apps/meteor/client/components/UserCard/UserCardABACAttributes.spec.tsx (1)
packages/mock-providers/src/index.ts (1)
  • mockAppRoot (3-3)
🪛 Biome (2.1.2)
apps/meteor/client/components/UserCard/UserCardABACAttribute.tsx

[error] 9-9: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5) - Alpine (Official)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5) - Alpine (Official)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5) - Alpine (Official)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5) - Alpine (Official)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5) - Alpine (Official)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5) - Alpine (Official)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5) - Alpine (Official)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5) - Alpine (Official)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5) - Alpine (Official)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5) - Alpine (Official)
🔇 Additional comments (3)
apps/meteor/client/components/UserCard/UserCardABACAttributes.spec.tsx (1)

1-32: LGTM! Well-structured test coverage.

The test file appropriately covers:

  • Rendering with multiple attributes and snapshot testing
  • Individual attribute presence verification
  • Accessibility validation with jest-axe

The mock translations align with the component's i18n requirements.

apps/meteor/client/components/UserInfo/UserInfo.tsx (2)

74-75: LGTM! Appropriate temporary type suppression.

The @ts-expect-error annotation with explanatory comment is the right approach for this UI-only implementation. The default value of null and the conditional rendering (line 181) properly handle the absence of the property until it's added to the User object.


185-191: No change needed; ‘status-font-on-info’ is the established accent for info icons and is used consistently across multiple components.

Likely an incorrect or invalid review comment.

Copy link
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: 3

♻️ Duplicate comments (1)
apps/meteor/client/components/UserInfo/UserInfoABACAttributes.stories.tsx (1)

18-18: Translation key doesn't match UserInfo usage.

The translation key ABAC_attributes (lowercase 'a') doesn't match what UserInfo.tsx uses on line 184: ABAC_Attributes (capital 'A'). This will prevent the label from displaying correctly in Storybook.

Apply this diff:

-					ABAC_attributes: 'ABAC Attributes',
+					ABAC_Attributes: 'ABAC Attributes',
🧹 Nitpick comments (2)
apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (1)

13-16: Consider stable keys if attributes can be reordered.

Using array index as key is acceptable for static lists, but if abacAttributes can be reordered or modified, consider using the attribute value itself as the key to maintain component identity.

If attributes are unique, apply this diff:

-			{abacAttributes.map((attribute, index) => (
-				<Box m={2} fontScale='c2' key={index}>
+			{abacAttributes.map((attribute) => (
+				<Box m={2} fontScale='c2' key={attribute}>
 					<UserInfoABACAttribute attribute={attribute} />
 				</Box>
 			))}
apps/meteor/client/components/UserInfo/UserInfo.tsx (1)

181-195: Simplify self-closing tag syntax.

The component is rendered with an unnecessary self-closing tag pattern: <UserInfoABACAttributes></UserInfoABACAttributes>. Since there are no children, use the simpler self-closing syntax.

Apply this diff:

-							<UserInfoABACAttributes abacAttributes={abacAttributes}></UserInfoABACAttributes>
+							<UserInfoABACAttributes abacAttributes={abacAttributes} />
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 973e614 and 929a8a4.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/components/UserInfo/__snapshots__/UserInfoABACAttributes.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • apps/meteor/client/components/UserInfo/UserInfo.tsx (4 hunks)
  • apps/meteor/client/components/UserInfo/UserInfoABACAttribute.tsx (1 hunks)
  • apps/meteor/client/components/UserInfo/UserInfoABACAttributes.spec.tsx (1 hunks)
  • apps/meteor/client/components/UserInfo/UserInfoABACAttributes.stories.tsx (1 hunks)
  • apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
apps/meteor/client/components/UserInfo/UserInfoABACAttributes.spec.tsx (1)
packages/mock-providers/src/index.ts (1)
  • mockAppRoot (3-3)
apps/meteor/client/components/UserInfo/UserInfoABACAttributes.stories.tsx (1)
packages/mock-providers/src/index.ts (1)
  • mockAppRoot (3-3)
🪛 Biome (2.1.2)
apps/meteor/client/components/UserInfo/UserInfoABACAttribute.tsx

[error] 9-9: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (1)
apps/meteor/client/components/UserInfo/UserInfo.tsx (1)

74-75: LGTM! Temporary type annotation is documented.

The ts-expect-error annotation is clearly documented as temporary until the abacAttributes property is added to the User type. The default value of null works well with the conditional rendering below.

Copy link
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: 1

♻️ Duplicate comments (1)
apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (1)

6-8: The type name still doesn't match the component name.

This issue was flagged in a previous review but remains unresolved. The type is named UserCardABACAttributesProps but the component is UserInfoABACAttributes.

Apply this diff to align the type name:

-type UserCardABACAttributesProps = {
+type UserInfoABACAttributesProps = {
 	abacAttributes: string[];
 } & ComponentProps<typeof Box>;

And update the usage:

-const UserInfoABACAttributes = ({ abacAttributes }: UserCardABACAttributesProps): ReactElement => {
+const UserInfoABACAttributes = ({ abacAttributes }: UserInfoABACAttributesProps): ReactElement => {
🧹 Nitpick comments (4)
apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (2)

13-17: Prefer stable keys over array indices.

Using array index as key can cause issues if the list is reordered or filtered. Consider using the attribute value itself as the key if attributes are unique.

Apply this diff:

-			{abacAttributes.map((attribute, index) => (
-				<Box m={2} fontScale='c2' key={index}>
+			{abacAttributes.map((attribute) => (
+				<Box m={2} fontScale='c2' key={attribute}>
 					<UserInfoABACAttribute attribute={attribute} />
 				</Box>
 			))}

12-17: Remove redundant styling props. The UserInfoABACAttribute Tag uses its variant to apply its own fontScale and color, so drop the fontScale='p2' and color='hint' on the outer Box and the fontScale='c2' on the inner Box wrappers—retain only the layout props (e.g. m={2}, flexWrap, etc.).

apps/meteor/client/components/UserInfo/UserInfo.tsx (2)

74-76: Consider a more idiomatic default value.

The prop defaults to null, which is unusual for an optional array property. Consider using undefined or [] instead for consistency with TypeScript conventions.

Apply this diff to use undefined (removes the need for the length check):

 	// @ts-expect-error - abacAttributes is not yet implemented in Users properties
-	abacAttributes = null,
+	abacAttributes,

Or use an empty array (removes the need for the nullish check):

 	// @ts-expect-error - abacAttributes is not yet implemented in Users properties
-	abacAttributes = null,
+	abacAttributes = [],

Then simplify the conditional on Line 181:

-				{abacAttributes && abacAttributes.length > 0 && (
+				{abacAttributes?.length > 0 && (

183-186: Encapsulate the info icon and tooltip in InfoPanelLabel.

Inline Icon and title here stand out (no other usages include inline icons). Add a description prop (or similar) to InfoPanelLabel that renders the info icon with tooltip, then use:

<InfoPanelLabel description={t('ABAC_Attributes_description')}>
  {t('ABAC_Attributes')}
</InfoPanelLabel>

Remove the manual <Icon> and Palette import.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 929a8a4 and 8d8d1fc.

📒 Files selected for processing (2)
  • apps/meteor/client/components/UserInfo/UserInfo.tsx (4 hunks)
  • apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

@MartinSchoeler MartinSchoeler force-pushed the feat/ABAC-user-attributes branch from 8d8d1fc to d80b906 Compare October 8, 2025 17:07
Copy link
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: 0

🧹 Nitpick comments (1)
apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (1)

13-17: Consider using the attribute value as the key instead of index.

Using array indices as keys can lead to issues if the list order changes or items are added/removed. Since each attribute string should be unique, consider using the attribute value itself as the key.

Apply this diff:

 		{abacAttributes.map((attribute, index) => (
-			<Margins inline={2} key={index}>
+			<Margins inline={2} key={attribute}>
 				<UserInfoABACAttribute attribute={attribute} />
 			</Margins>
 		))}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d80b906 and 5acb08c.

📒 Files selected for processing (1)
  • apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (2)
apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (2)

12-12: Address the question about redundant Box styling props.

As noted in a previous comment, verify whether the fontScale='p2' and color='hint' props on the Box container are necessary, given that UserInfoABACAttribute is a Tag component that should have its own proper styling via the variant prop.

If the Tag component already handles text sizing and color through its variant, these container-level props may be redundant or could conflict with the Tag's styling. Please verify the rendered output and remove unnecessary props if they don't affect the layout.


12-12: Verify withTruncatedText with wrapped tags
withTruncatedText applies overflow:hidden and text-overflow:ellipsis; combined with flexWrap='wrap', it can hide tags on subsequent lines. Test with multiple ABAC attributes and remove withTruncatedText if wrapped tags must remain visible.

@MartinSchoeler MartinSchoeler force-pushed the feat/ABAC-user-attributes branch from 5acb08c to cdfcd48 Compare October 13, 2025 17:14
Copy link
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: 1

♻️ Duplicate comments (2)
apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (2)

6-8: Box props are declared but never forwarded.

The type includes ComponentProps<typeof Box> but the component doesn't accept or forward these props to the Box element. This creates a misleading API surface.

Option 1 (if Box customization is needed): Forward the props:

-const UserInfoABACAttributes = ({ abacAttributes }: UserCardABACAttributesProps): ReactElement => {
+const UserInfoABACAttributes = ({ abacAttributes, ...boxProps }: UserCardABACAttributesProps): ReactElement => {
 	return (
-		<Box flexWrap='wrap' display='flex'>
+		<Box flexWrap='wrap' display='flex' {...boxProps}>

Option 2 (simpler, if Box props aren't needed): Remove from type:

 type UserCardABACAttributesProps = {
 	abacAttributes: string[];
-} & ComponentProps<typeof Box>;
+};

6-8: Type name still doesn't match component name.

The type remains named UserCardABACAttributesProps but the component is UserInfoABACAttributes. This inconsistency should be addressed.

Apply this diff to align the type name:

-type UserCardABACAttributesProps = {
+type UserInfoABACAttributesProps = {
 	abacAttributes: string[];
 } & ComponentProps<typeof Box>;

Then update the component signature:

-const UserInfoABACAttributes = ({ abacAttributes }: UserCardABACAttributesProps): ReactElement => {
+const UserInfoABACAttributes = ({ abacAttributes }: UserInfoABACAttributesProps): ReactElement => {
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between cdfcd48 and 1653f8b.

📒 Files selected for processing (1)
  • apps/meteor/client/components/UserInfo/UserInfoABACAttributes.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

@dougfabris dougfabris added this to the 7.12.0 milestone Oct 14, 2025
@dougfabris dougfabris force-pushed the feat/ABAC-user-attributes branch from 2441885 to d476132 Compare October 14, 2025 22:42
dougfabris
dougfabris previously approved these changes Oct 14, 2025
Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

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

@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Oct 14, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Oct 14, 2025
Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

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

if it's not the last one, sacrifice is going on tonight

@kodiakhq kodiakhq bot merged commit 7a7d368 into develop Oct 15, 2025
49 checks passed
@kodiakhq kodiakhq bot deleted the feat/ABAC-user-attributes branch October 15, 2025 18:37
antm-rp pushed a commit to antm-rp/Rocket.Chat that referenced this pull request Oct 16, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants