Skip to content

Conversation

@dougfabris
Copy link
Member

@dougfabris dougfabris commented Aug 27, 2025

Proposed changes (including videos or screenshots)

Important

This change is under feature preview

Introduced here: #36049

Issue(s)

Steps to test or reproduce

Further comments

SIDE2-148

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Aug 27, 2025

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

@changeset-bot
Copy link

changeset-bot bot commented Aug 27, 2025

⚠️ No Changeset found

Latest commit: 76ff48e

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

@dougfabris dougfabris added this to the 7.10.0 milestone Aug 27, 2025
@codecov
Copy link

codecov bot commented Aug 27, 2025

Codecov Report

❌ Patch coverage is 14.92537% with 57 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release-7.10.0@edc96cd). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##             release-7.10.0   #36808   +/-   ##
=================================================
  Coverage                  ?   64.87%           
=================================================
  Files                     ?     3251           
  Lines                     ?   109452           
  Branches                  ?    20674           
=================================================
  Hits                      ?    71002           
  Misses                    ?    35924           
  Partials                  ?     2526           
Flag Coverage Δ
e2e 52.84% <7.69%> (?)
unit 71.44% <29.41%> (?)

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.

ggazzo and others added 4 commits August 28, 2025 21:29
…nused hook

- Added `useLocalStorage` to manage side panel filter state.
- Updated `useSidePanelFilter` to return the current filter, unread status, and a setter function.
- Removed the unused `useSidePanelFilters` hook.
- Adjusted `RoomsNavigationProvider` to utilize the new filter management approach.
@ggazzo ggazzo marked this pull request as ready for review August 29, 2025 03:08
Copilot AI review requested due to automatic review settings August 29, 2025 03:08
@ggazzo ggazzo requested a review from a team as a code owner August 29, 2025 03:08
ggazzo
ggazzo previously approved these changes Aug 29, 2025
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Aug 29, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This regression fix addresses an issue where the side panel filter selection was not being properly maintained when navigating to rooms. The PR reorganizes the layout structure and implements automatic filter selection based on the room type when opening rooms.

  • Refactors layout component structure to move sidebar components within feature preview sections
  • Adds automatic room-based filter selection logic that triggers when a room is opened
  • Consolidates filter management by removing useSidePanelFilters hook and integrating functionality into context

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
LayoutWithSidebarV2.tsx Restructures component layout to move MainLayoutStyleTags and sidebar components within feature preview sections
useChannelsChildrenList.ts Updates main room sorting logic to handle team-based filtering scenarios
SidebarItemWithData.tsx Simplifies room click handling by replacing custom logic with new useRedirectToFilter hook
RoomsNavigationProvider.tsx Adds room opening event listener and automatic filter selection logic based on room types
useSidePanelFilters.ts Removes entire file as functionality is moved to context
RoomsNavigationContext.ts Consolidates filter management and adds useRedirectToFilter hook for room navigation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}

if (room.teamId && currentFilter === 'teams') {
const teamRid = Rooms.use.getState().find((r) => Boolean(r.teamId === room.teamId && r.teamMain))?._id;
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

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

This code performs a linear search through all rooms on every room open event. Consider optimizing this by creating an index or using a more efficient lookup method, especially if the rooms collection is large.

Copilot uses AI. Check for mistakes.
}

if (room.prid) {
const prid = Rooms.use.getState().find((r) => Boolean(r._id === room.prid))?._id;
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

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

Another linear search through the rooms collection. Since you're looking up by _id (which should be unique), consider using a more efficient lookup method or indexing strategy.

Copilot uses AI. Check for mistakes.
switchSidePanelTab('directMessages', { parentRid: roomId });
return;
}

Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

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

The fallback logic room.prid || roomId could be confusing. Consider adding a comment explaining when room.prid would be undefined and why roomId is the appropriate fallback.

Copilot uses AI. Check for mistakes.
@ggazzo ggazzo merged commit 2248932 into release-7.10.0 Aug 29, 2025
36 of 40 checks passed
@ggazzo ggazzo deleted the reg/redirectToFilter branch August 29, 2025 03:56
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.

2 participants