Skip to content

refactor: migrate SidePanelInternal to Virtua - #41255

Open
srijnabhargav wants to merge 5 commits into
RocketChat:feat/GSoC-2026-virtual-list-projectfrom
srijnabhargav:gsoc/sidepanel-internal-virtua-migration
Open

refactor: migrate SidePanelInternal to Virtua#41255
srijnabhargav wants to merge 5 commits into
RocketChat:feat/GSoC-2026-virtual-list-projectfrom
srijnabhargav:gsoc/sidepanel-internal-virtua-migration

Conversation

@srijnabhargav

@srijnabhargav srijnabhargav commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

This PR migrates SidePanelInternal from react-virtuoso to Virtua while preserving the existing behavior as closely as possible.

Changes included

  • Replaces the react-virtuoso implementation with a local Virtua implementation.
  • Preserves the existing SidepanelListWrapper and keyboard navigation behavior.
  • Preserves the current list, listitem, and link semantics used by the side panel.
  • Preserves existing room rendering, selection, and navigation behavior.
  • Keeps the current scrollbar behavior without introducing shared abstractions.
  • Adds focused unit tests covering:
    • Virtua rendering
    • Preserved list/listitem/link semantics
    • SidepanelListWrapper usage
    • Selected room state
    • Filtering of Virtua-only props from the DOM

This migration is intentionally scoped to replacing the virtualization layer only, avoiding unrelated behavioral or architectural changes.

Issue(s)

Part of the GSoC Virtua migration effort.

Steps to test or reproduce

  1. Open the side panel.
  2. Verify the room list renders correctly.
  3. Verify keyboard navigation still works.
  4. Verify the selected room is highlighted correctly.
  5. Verify scrolling behaves as before.
  6. Verify room navigation still works.

Further comments

Following the project's migration strategy, this implementation replaces only the virtualization layer while preserving the existing behavior.

Since this component is not paginated, it uses a local Virtua implementation instead of PaginatedVirtualList, following the guidance provided during the project discussion. The existing SidepanelListWrapper, keyboard navigation, and DOM semantics have been preserved to minimize behavioral changes and keep the migration isolated to this component.

Review in cubic

Summary by CodeRabbit

  • Improvements

    • Updated Side Panel room-list rendering with more consistent virtualization and custom scrolling behavior.
    • Preserved room-row interactions, list accessibility, and opened-room highlighting.
    • Added support for displaying both populated and empty room-list states.
  • Tests

    • Added coverage for room rendering, list semantics, item indexing, and current-room link state across Side Panel scenarios.

@dionisio-bot

dionisio-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bcfd3a4

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 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

SidePanelInternal now uses virtua for room-list virtualization. New stories and tests cover populated and empty states, list semantics, item indexes, and selected-room links.

Changes

Sidepanel virtua migration

Layer / File(s) Summary
Sidepanel virtualization wiring
apps/meteor/client/views/navigation/sidepanel/SidepanelListWrapper.tsx, apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.tsx, apps/meteor/client/views/navigation/sidepanel/SidePanelVirtualItem.tsx
Replaces Virtuoso with Virtualizer and CustomVirtuaScrollbars. Adds a ref-forwarding virtual item wrapper. Updates list wrapper props to standard DOM attribute types.
Story-driven rendering validation
apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.stories.tsx, apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx
Adds populated and empty stories. Tests compose each story, mock virtualization dependencies, and verify panel rendering, room indexes, selected-room links, and the empty state.

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

Sequence Diagram(s)

sequenceDiagram
  participant SidePanelInternal
  participant CustomVirtuaScrollbars
  participant Virtualizer
  participant SidePanelVirtualItem
  participant SidepanelListItem

  SidePanelInternal->>CustomVirtuaScrollbars: render scroll viewport
  CustomVirtuaScrollbars->>Virtualizer: provide virtualized room list
  Virtualizer->>SidePanelVirtualItem: render indexed room item
  SidePanelVirtualItem->>SidepanelListItem: forward room props and styles
Loading

Possibly related PRs

Suggested labels: type: chore

Suggested reviewers: martinschoeler

🚥 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 clearly and concisely describes the main change: migrating SidePanelInternal from react-virtuoso to Virtua.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

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.

@srijnabhargav
srijnabhargav marked this pull request as ready for review July 8, 2026 16:18
@srijnabhargav
srijnabhargav requested a review from a team as a code owner July 8, 2026 16:18

@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/navigation/sidepanel/SidePanelInternal.spec.tsx (1)

125-136: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add edge-case tests for empty and undefined rooms.

The current test only covers the happy path with two rooms. Consider adding tests for:

  • rooms={[]} — verifies SidePanelNoResults renders and the empty Virtualizer doesn't crash.
  • rooms={undefined} (if applicable per SidePanelProps) — verifies no TypeError from rooms.map().

This is especially important given the rooms?.length optional chaining on Line 77 of SidePanelInternal.tsx, which suggests undefined is a valid input.

🤖 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/navigation/sidepanel/SidePanelInternal.spec.tsx`
around lines 125 - 136, The current SidePanelInternal.spec.tsx test only covers
the populated rooms path; add coverage for empty and undefined rooms to match
the optional handling in SidePanelInternal. Add a test for SidePanel with rooms
as an empty array to verify SidePanelNoResults renders and Virtua still mounts
without crashing, and if SidePanelProps allows it, add a test for rooms being
undefined to ensure the component does not throw from any rooms.map usage. Use
the existing SidePanel and SidePanelNoResults behavior as the anchor points for
locating the relevant assertions.
🤖 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/navigation/sidepanel/SidePanelInternal.spec.tsx`:
- Around line 11-43: The SidePanel spec is missing the focus/navigation context
required by SidepanelListWrapper, so the test can fail when
useSidebarListNavigation() calls useFocusManager(). Fix this by either wrapping
the rendered SidePanel in the same FocusScope-backed context used by the real
navigation tree or by mocking useSidebarListNavigation in this spec. Use the
existing SidepanelListWrapper and useSidebarListNavigation symbols to locate the
setup and keep the mock/context consistent with the component tree.

---

Nitpick comments:
In `@apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx`:
- Around line 125-136: The current SidePanelInternal.spec.tsx test only covers
the populated rooms path; add coverage for empty and undefined rooms to match
the optional handling in SidePanelInternal. Add a test for SidePanel with rooms
as an empty array to verify SidePanelNoResults renders and Virtua still mounts
without crashing, and if SidePanelProps allows it, add a test for rooms being
undefined to ensure the component does not throw from any rooms.map usage. Use
the existing SidePanel and SidePanelNoResults behavior as the anchor points for
locating the relevant assertions.
🪄 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: fe15597f-3f80-4b8e-a526-1c646a2da0ca

📥 Commits

Reviewing files that changed from the base of the PR and between bec8300 and 9a07ae6.

📒 Files selected for processing (3)
  • apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidepanelListWrapper.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: cubic · AI code reviewer
🧰 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/navigation/sidepanel/SidepanelListWrapper.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.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/navigation/sidepanel/SidepanelListWrapper.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.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/navigation/sidepanel/SidepanelListWrapper.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.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/navigation/sidepanel/SidePanelInternal.spec.tsx
🔇 Additional comments (4)
apps/meteor/client/views/navigation/sidepanel/SidepanelListWrapper.tsx (1)

3-17: LGTM!

apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.tsx (2)

14-33: LGTM!


77-91: 🩺 Stability & Availability

rooms.map() is safe here. SidePanelProps.rooms is required (R[]), so this path can’t receive undefined.

			> Likely an incorrect or invalid review comment.
apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx (1)

78-102: LGTM!

Comment thread apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx Outdated

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

No issues found across 3 files

Re-trigger cubic

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (feat/GSoC-2026-virtual-list-project@ec76efd). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@                          Coverage Diff                           @@
##             feat/GSoC-2026-virtual-list-project   #41255   +/-   ##
======================================================================
  Coverage                                       ?   69.18%           
======================================================================
  Files                                          ?     3468           
  Lines                                          ?   135829           
  Branches                                       ?    23721           
======================================================================
  Hits                                           ?    93968           
  Misses                                         ?    38458           
  Partials                                       ?     3403           
Flag Coverage Δ
unit 70.04% <100.00%> (?)

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.

…al items

react-virtuoso previously forwarded index as data-item-index onto each
rendered SidepanelListItem, which the feature-preview E2E spec asserts
on directly (data-item-index="1"). The Virtua migration silently
dropped this attribute; restore it so the item wrapper keeps parity
with the old DOM output.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx Outdated
Comment thread apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx Outdated
ref,
) {
return (
<SidepanelListItem ref={ref} data-item-index={index} style={style} {...props}>

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.

Suggested change
<SidepanelListItem ref={ref} data-item-index={index} style={style} {...props}>
<SidepanelListItem ref={ref} style={style} {...props}>

We should avoid adding data-* attributes whenever we can, and from what I can see this is only used by the test right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, Martin! I wanted to double-check this one before removing it. I originally added data-item-index because one of the existing E2E tests (feature-preview.spec.ts) relies on it to verify the room ordering after the Virtua migration. Removing it would make that test fail again. Would you prefer updating the E2E test to use a different selector, or should we keep this attribute for compatibility?

Comment thread apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.tsx Outdated
Comment thread apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.tsx Outdated
Addresses review feedback from Martin Schoeler on PR RocketChat#41255:
- Remove the unnecessary @rocket.chat/fuselage jest mock from
  SidePanelInternal.spec.tsx; fuselage components render fine unmocked.
- Extract the inline sidePanelVirtualItem wrapper into its own
  SidePanelVirtualItem.tsx, matching the RoomMembers/BannedUsers
  convention, removing the now-unneeded react/no-multi-comp disable.
- Add SidePanelInternal.stories.tsx and rework the spec to use the
  composeStories + toMatchSnapshot pattern established by BannedUsers/
  RoomMembers/RoomFiles, while preserving the existing list-semantics,
  data-item-index, and aria-current assertions.

data-item-index is intentionally left untouched pending Martin's
response, since apps/meteor/tests/e2e/feature-preview.spec.ts relies
on it to verify room ordering.

Co-authored-by: Cursor <cursoragent@cursor.com>

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

All reported issues were addressed across 5 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx Outdated
Whole-tree baseElement snapshots baked in the useId() output for the
unread toggle label, which shifts with render order/count (e.g.
running a single story in isolation) rather than reflecting the tree
itself. Replace the snapshot with semantic assertions, matching the
existing behavioral test style in this file.

Co-authored-by: Cursor <cursoragent@cursor.com>

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

🧹 Nitpick comments (1)
apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx (1)

74-77: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the implementation comments.

Lines 74-77 add a four-line implementation comment. The *.tsx guideline says to avoid code comments in implementation. Keep the semantic assertion. Move the snapshot rationale to the PR description if it must remain documented.

🤖 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/navigation/sidepanel/SidePanelInternal.spec.tsx`
around lines 74 - 77, Remove the four-line implementation comment explaining why
baseElement is not snapshot-tested in SidePanelInternal.spec.tsx, while
preserving the existing semantic assertions and story-specific tests unchanged.

Source: Coding guidelines

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

Nitpick comments:
In `@apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx`:
- Around line 74-77: Remove the four-line implementation comment explaining why
baseElement is not snapshot-tested in SidePanelInternal.spec.tsx, while
preserving the existing semantic assertions and story-specific tests unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 84bc8999-1233-43c6-9153-edb4fbdc76d1

📥 Commits

Reviewing files that changed from the base of the PR and between edf3af0 and bcfd3a4.

📒 Files selected for processing (1)
  • apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: cubic · AI code reviewer
⚠️ CI failures not shown inline (1)

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** — This PR is missing the required 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/navigation/sidepanel/SidePanelInternal.spec.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/navigation/sidepanel/SidePanelInternal.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/navigation/sidepanel/SidePanelInternal.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/navigation/sidepanel/SidePanelInternal.spec.tsx
🔇 Additional comments (4)
apps/meteor/client/views/navigation/sidepanel/SidePanelInternal.spec.tsx (4)

1-69: LGTM!


78-80: LGTM!


83-98: LGTM!


100-107: LGTM!

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.

2 participants