[PER-10476] Skip folder fetches for synthetic folders without a folderId#1087
Open
aasandei-vsp wants to merge 1 commit into
Open
[PER-10476] Skip folder fetches for synthetic folders without a folderId#1087aasandei-vsp wants to merge 1 commit into
aasandei-vsp wants to merge 1 commit into
Conversation
Opening /app/shares triggered GET /api/v2/folder?folderIds[]=undefined (500): the sidebar fetched the current folder to get its displayTime, but the Shares workspace is a synthetic FolderVO with no folderId. Guard the sidebar fetch so only folders with a real folderId are requested, and filter invalid ids in FolderRepo.getStelaFolders, skipping the request entirely when none remain. Issue: PER-10476
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1087 +/- ##
==========================================
+ Coverage 52.13% 52.19% +0.06%
==========================================
Files 354 354
Lines 12085 12089 +4
Branches 2181 2182 +1
==========================================
+ Hits 6300 6310 +10
- Misses 5555 5556 +1
+ Partials 230 223 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening /app/shares triggered GET /api/v2/folder?folderIds[]=undefined (500): the sidebar fetched the current folder to get its displayTime, but the Shares workspace is a synthetic FolderVO with no folderId. Guard the sidebar fetch so only folders with a real folderId are requested, and filter invalid ids in FolderRepo.getStelaFolders, skipping the request entirely when none remain.
This is just a small bug that I found, not the full story.
Issue: PER-10476
Subtask: PER-10676
Manual test cases — Shares page
folderIds[]=undefinedfix needSetup: log in with an account that has items shared with it, open dev tools (Console + Network tabs).
EXPECTED: no
GET /api/v2/folder?folderIds[]=undefinedrequest and no "Handled unknown error" in the console at any point below.Shares page load
/app/sharesand filter the Network tab byv2/folder.folderIds[]=undefinedis sent, no 500 response, and no "Handled unknown error" appears in the console.Sidebar on the Shares page
/app/shares, open the sidebar.folderIds[]=149939— neverundefined.v2/folderrequest at all.Regression — My Files
/app/private, open any folder, and leave nothing selected so the sidebar shows the current folder.folderIds[].Regression — Apps page (also a synthetic root folder)
/app/appswith the Network tab filtered byv2/folder.folderIds[]=undefinedrequest and no "Handled unknown error" in the console.