Skip to content

regression: Prevent saving license with non-plausible value - #41306

Merged
ggazzo merged 5 commits into
developfrom
reg/manage-license-accept-invalid
Jul 15, 2026
Merged

regression: Prevent saving license with non-plausible value#41306
ggazzo merged 5 commits into
developfrom
reg/manage-license-accept-invalid

Conversation

@dougfabris

@dougfabris dougfabris commented Jul 10, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

  • Prevent applying a license when the input isn't plausible (isPlausible guard on the Apply button)
  • Keep the deprecated manual license setting input visible in the Enterprise settings group, labeled "Manual license management (deprecated)"
  • Hide license details from users without the edit-privileged-setting permission
  • Use useClipboardWithToast for copy actions and guard against duplicate copies

Issue(s)

Steps to test or reproduce

Further comments

CORE-2403
CORE-2404

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • License-management settings now render as a dynamic accordion, with support for custom section titles and updated “deprecated manual license management” terminology.
    • Subscription plan license UI is streamlined into a single permission-gated “Manage license” flow.
  • Bug Fixes
    • License validation now runs only for plausible inputs, with tighter handling of “current” licenses and improved status/feedback behavior (including keeping “Apply license” disabled after clearing a validated entry).
  • Accessibility & Tests
    • Improved license-status semantics for assistive technologies and expanded Storybook/Jest coverage for the modal.

@dionisio-bot

dionisio-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b0e44da

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

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The PR updates enterprise settings to render editable license-management sections, changes subscription license controls and permissions, tightens license validation and current-license handling, adds accessibility and regression coverage, and updates English locale keys.

Changes

Manual license management

Layer / File(s) Summary
Enterprise settings section rendering
apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.tsx, apps/meteor/client/views/admin/settings/groups/EnterpriseGroupPage.tsx, packages/i18n/src/locales/en.i18n.json
Enterprise settings render editable sections in an accordion, pass reset and tab state to each section, and support translated or explicitly provided section titles.
Subscription license management controls
apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardLicenseDetails.tsx, packages/i18n/src/locales/en.i18n.json
License details require edit-privileged-setting, use toast-enabled clipboard actions, guard repeated copies, and expose a single Manage_license link.
License validation, accessibility, and coverage
apps/meteor/client/views/admin/subscription/hooks/useValidateLicense.ts, apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/*
Validation is gated by plausible, non-current license content; status callouts receive explicit roles; stories and tests cover validation states, accessibility, snapshots, and clearing validated input.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ManageLicenseModal
  participant useValidateLicense
  participant LicenseValidationAPI
  ManageLicenseModal->>useValidateLicense: provide license and enabled state
  useValidateLicense->>LicenseValidationAPI: validate plausible non-current license
  LicenseValidationAPI-->>useValidateLicense: return validation result
  useValidateLicense-->>ManageLicenseModal: expose validation state
Loading

Possibly related PRs

Suggested labels: type: bug

Suggested reviewers: ggazzo, juliajforesti, abhinavkrin

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: blocking license saving when the input is not plausible.
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.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • CORE-2404: Request failed with status code 401

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.

@dougfabris dougfabris added this to the 8.7.0 milestone Jul 10, 2026
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.13043% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.17%. Comparing base (edbaeef) to head (b0e44da).
⚠️ Report is 19 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41306      +/-   ##
===========================================
- Coverage    69.04%   68.17%   -0.87%     
===========================================
  Files         3757     3969     +212     
  Lines       147735   154820    +7085     
  Branches     26395    27893    +1498     
===========================================
+ Hits        102000   105556    +3556     
- Misses       41234    44468    +3234     
- Partials      4501     4796     +295     
Flag Coverage Δ
e2e 59.22% <33.33%> (-0.05%) ⬇️
e2e-api 44.04% <ø> (-5.32%) ⬇️
unit 70.58% <93.02%> (+0.08%) ⬆️

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.

@dougfabris
dougfabris marked this pull request as ready for review July 13, 2026 14:07
@dougfabris
dougfabris requested a review from a team as a code owner July 13, 2026 14:07

@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

🧹 Nitpick comments (1)
apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardLicenseDetails.tsx (1)

41-41: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Redundant !hasCopied* guard in copy button onClick handlers.

The ternary on lines 38–42 (and 51–55) already ensures the clipboard IconButton only renders when hasCopied is false. The !hasCopiedSiteURL && / !hasCopiedHashed && guards inside the onClick are therefore always true at render time and can be simplified to direct calls.

♻️ Simplify onClick handlers
-						<IconButton title={t('Copy')} icon='clipboard' mini onClick={() => !hasCopiedSiteURL && copySiteURL()} />
+						<IconButton title={t('Copy')} icon='clipboard' mini onClick={() => copySiteURL()} />
-						<IconButton title={t('Copy')} icon='clipboard' mini onClick={() => !hasCopiedHashed && copyHashed()} />
+						<IconButton title={t('Copy')} icon='clipboard' mini onClick={() => copyHashed()} />

Also applies to: 54-54

🤖 Prompt for 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.

In
`@apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardLicenseDetails.tsx`
at line 41, In PlanCardLicenseDetails, simplify the clipboard IconButton onClick
handlers by removing the redundant !hasCopiedSiteURL and !hasCopiedHashed guards
and directly invoking copySiteURL() and copyHashed(). Keep the existing
conditional rendering based on each hasCopied state unchanged.
🤖 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 `@apps/meteor/client/views/admin/settings/groups/EnterpriseGroupPage.tsx`:
- Line 49: Update the section key in EnterpriseGroupPage’s
useEditableSettingsGroupSections rendering so unnamed sections receive unique,
stable keys rather than all falling back to an empty string; preserve
sectionName as the key when it is present.

---

Nitpick comments:
In
`@apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardLicenseDetails.tsx`:
- Line 41: In PlanCardLicenseDetails, simplify the clipboard IconButton onClick
handlers by removing the redundant !hasCopiedSiteURL and !hasCopiedHashed guards
and directly invoking copySiteURL() and copyHashed(). Keep the existing
conditional rendering based on each hasCopied state unchanged.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d2428fe7-fc3c-4f18-a824-b10b9dcab055

📥 Commits

Reviewing files that changed from the base of the PR and between 5f21093 and 7a15725.

📒 Files selected for processing (6)
  • apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.tsx
  • apps/meteor/client/views/admin/settings/groups/EnterpriseGroupPage.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardLicenseDetails.tsx
  • packages/i18n/src/locales/en.i18n.json
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.tsx
  • apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardLicenseDetails.tsx
  • apps/meteor/client/views/admin/settings/groups/EnterpriseGroupPage.tsx
🧠 Learnings (3)
📚 Learning: 2026-03-06T18:10:15.268Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 39397
File: packages/gazzodown/src/code/CodeBlock.spec.tsx:47-68
Timestamp: 2026-03-06T18:10:15.268Z
Learning: In tests (especially those using testing-library/dom/jsdom) for Rocket.Chat components, the HTML <code> element has an implicit ARIA role of 'code'. Therefore, screen.getByRole('code') or screen.findByRole('code') will locate <code> elements even without a role attribute. Do not flag findByRole('code') as invalid in reviews; prefer using the implicit role instead of adding role="code" unless necessary for accessibility.

Applied to files:

  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.

Applied to files:

  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.tsx
  • apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardLicenseDetails.tsx
  • apps/meteor/client/views/admin/settings/groups/EnterpriseGroupPage.tsx
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.tsx
  • apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardLicenseDetails.tsx
  • apps/meteor/client/views/admin/settings/groups/EnterpriseGroupPage.tsx
🔇 Additional comments (5)
apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.tsx (1)

54-54: LGTM!

apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx (1)

114-127: LGTM!

packages/i18n/src/locales/en.i18n.json (1)

491-492: No remaining Add_license references.

apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.tsx (1)

16-23: LGTM!

Also applies to: 78-78

apps/meteor/client/views/admin/settings/groups/EnterpriseGroupPage.tsx (1)

53-53: 📐 Maintainability & Code Quality

Manual_license_management_deprecated is defined in packages/i18n/src/locales/en.i18n.json.

@cubic-dev-ai cubic-dev-ai 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.

Review completed against the latest diff

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

yash-rajpal
yash-rajpal previously approved these changes Jul 13, 2026

@yash-rajpal yash-rajpal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@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

🧹 Nitpick comments (1)
apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.stories.tsx (1)

71-74: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove unnecessary await before expect.

The expect assertion and its matcher toBeInTheDocument() are synchronous. Only the findByText query is asynchronous and requires await.

♻️ Proposed refactor
 	play: async () => {
 		await enterLicense(SAMPLE_LICENSE);
-		await expect(await screen.findByText('Invalid_license')).toBeInTheDocument();
+		expect(await screen.findByText('Invalid_license')).toBeInTheDocument();
 	},
🤖 Prompt for 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.

In
`@apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.stories.tsx`
around lines 71 - 74, In the play function, update the assertion using
screen.findByText so only the asynchronous query is awaited; remove the
unnecessary await from the synchronous expect(...).toBeInTheDocument() chain.
🤖 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
`@apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx`:
- Around line 38-43: Update the accessibility test around the parameterized test
in ManageLicenseModal.spec.tsx to destructure baseElement from render and pass
it to axe instead of container. Keep the existing Story rendering, wrapper, and
no-violations assertion unchanged so portaled modal content is included in the
audit.

---

Nitpick comments:
In
`@apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.stories.tsx`:
- Around line 71-74: In the play function, update the assertion using
screen.findByText so only the asynchronous query is awaited; remove the
unnecessary await from the synchronous expect(...).toBeInTheDocument() chain.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bbedcd48-11b0-4673-8068-da5244fb309c

📥 Commits

Reviewing files that changed from the base of the PR and between 2cbf199 and b0e44da.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/__snapshots__/ManageLicenseModal.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (4)
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/LicenseStatus.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.stories.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
⚠️ CI failures not shown inline (4)

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.stories.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/LicenseStatus.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx
🧠 Learnings (3)
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.

Applied to files:

  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.stories.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/LicenseStatus.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.stories.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/LicenseStatus.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.tsx
  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx
📚 Learning: 2026-03-06T18:10:15.268Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 39397
File: packages/gazzodown/src/code/CodeBlock.spec.tsx:47-68
Timestamp: 2026-03-06T18:10:15.268Z
Learning: In tests (especially those using testing-library/dom/jsdom) for Rocket.Chat components, the HTML <code> element has an implicit ARIA role of 'code'. Therefore, screen.getByRole('code') or screen.findByRole('code') will locate <code> elements even without a role attribute. Do not flag findByRole('code') as invalid in reviews; prefer using the implicit role instead of adding role="code" unless necessary for accessibility.

Applied to files:

  • apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.spec.tsx
🔇 Additional comments (2)
apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/LicenseStatus.tsx (1)

13-32: LGTM!

apps/meteor/client/views/admin/subscription/components/cards/PlanCard/ManageLicenseModal/ManageLicenseModal.tsx (1)

51-51: 🚀 Performance & Scalability

No additional guard neededuseValidateLicense already skips requests for non-plausible input via enabled && isPlausibleLicense(trimmedLicense).

			> Likely an incorrect or invalid review comment.

@jessicaschelly jessicaschelly added the stat: QA assured Means it has been tested and approved by a company insider label Jul 14, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 14, 2026
@dougfabris dougfabris removed the stat: QA assured Means it has been tested and approved by a company insider label Jul 14, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label Jul 14, 2026
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Jul 14, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 14, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jul 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 14, 2026
@dougfabris dougfabris removed the stat: QA assured Means it has been tested and approved by a company insider label Jul 14, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label Jul 14, 2026
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Jul 14, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 14, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jul 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 15, 2026
@dougfabris dougfabris removed the stat: QA assured Means it has been tested and approved by a company insider label Jul 15, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label Jul 15, 2026
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Jul 15, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 15, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jul 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 15, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jul 15, 2026
@ggazzo
ggazzo removed this pull request from the merge queue due to a manual request Jul 15, 2026
@ggazzo
ggazzo merged commit 012dd32 into develop Jul 15, 2026
84 of 86 checks passed
@ggazzo
ggazzo deleted the reg/manage-license-accept-invalid branch July 15, 2026 15:07
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 type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants