From e4888592c7acbbed8e13f54b273bd40a87d8daef Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Sat, 24 Oct 2026 16:08:32 -0700 Subject: [PATCH] fix(dashboard): show every folder when a drag springs into Shared Dragging an item out of a shared folder and holding it over Up, Back or the Shared crumb opens Shared to drop into a folder there. The people filter, which now lasts while browsing shared items, could hide those folders, and its chips can't be pressed mid-drag. A drag arriving in Shared now sees everyone's folders. --- src/gui/src/UI/Dashboard/TabFiles.js | 7 +++++-- src/gui/src/UI/Dashboard/TabFiles.test.js | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/gui/src/UI/Dashboard/TabFiles.js b/src/gui/src/UI/Dashboard/TabFiles.js index d403cab3c..33f8da040 100644 --- a/src/gui/src/UI/Dashboard/TabFiles.js +++ b/src/gui/src/UI/Dashboard/TabFiles.js @@ -2911,8 +2911,11 @@ const TabFiles = { } this.loadingFolder = false; // The people filter lasts while the user browses what was shared with - // them, so Back out of a shared folder finds it still set. - if ( is_owned_by_me(this.currentPath) ) this.sharerFilter = null; + // them, so Back out of a shared folder finds it still set. A drag + // springing into Shared sees every folder: chips can't be pressed mid-drag. + if ( is_owned_by_me(this.currentPath) || (window.an_item_is_being_dragged && ! isSameDirRefresh) ) { + this.sharerFilter = null; + } this.syncSharedViewChrome(); // Update browser URL to reflect current file path (only when Files tab is active) diff --git a/src/gui/src/UI/Dashboard/TabFiles.test.js b/src/gui/src/UI/Dashboard/TabFiles.test.js index 4cd0bc06f..302397cf0 100644 --- a/src/gui/src/UI/Dashboard/TabFiles.test.js +++ b/src/gui/src/UI/Dashboard/TabFiles.test.js @@ -647,6 +647,22 @@ describe('TabFiles people filter across navigation', () => { expect($('.files .row.selected').attr('data-name')).toBe('b'); }); + it('shows every folder to a drag that springs into Shared', async () => { + await TabFiles.renderDirectory(SHARED); + await TabFiles.setSharerFilter('bob'); + await TabFiles.renderDirectory('/bob/b-uid/b'); + + window.an_item_is_being_dragged = true; + try { + await TabFiles.renderDirectory(SHARED); + } finally { + window.an_item_is_being_dragged = false; + } + + expect(TabFiles.sharerFilter).toBeNull(); + expect(listed()).toEqual(['a', 'b']); + }); + it("clears once the user goes back to their own files", async () => { await TabFiles.renderDirectory(SHARED); await TabFiles.setSharerFilter('bob');