Skip to content

fix: load indirect shares in editors - #3313

Open
fredrikblau wants to merge 1 commit into
opencloud-eu:mainfrom
fredrikblau:fix/3298-editor-indirect-shares
Open

fix: load indirect shares in editors#3313
fredrikblau wants to merge 1 commit into
opencloud-eu:mainfrom
fredrikblau:fix/3298-editor-indirect-shares

Conversation

@fredrikblau

@fredrikblau fredrikblau commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Description

Editor routes load files without the folder loader, so ancestor metadata stays empty. The sharing sidebar then has no ancestor IDs from which to load indirect shares.

Load ancestor metadata when the share loader runs inside an editor. The regression test covers both search and editor routes.

Related Issue

How Has This Been Tested?

  • test environment: Node 24.20.0, pnpm 11.25.0
  • test case 1: FileSideBar unit suite (19 passed)
  • test case 2: full unit suite (3,916 passed, 6 skipped, 11 todo)
  • test case 3: type checks, lint, formatting, and production build

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@fredrikblau
fredrikblau force-pushed the fix/3298-editor-indirect-shares branch from 9b73947 to 0249e75 Compare September 5, 2026 13:10

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

Thanks! One nitpick from my side, plus it needs a rebase.

}

if (isLocationCommonActive(router, 'files-common-search')) {
if (isLocationCommonActive(router, 'files-common-search') || unref(isAppActive)) {

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.

I think we should check for the absence of resourcesStore.currentFolder here. If that is missing, that's an indicator that ancestor meta data needs to be loaded.

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.

Done — the condition now checks !resourcesStore.currentFolder instead of the app-active flag, and the branch is rebased on current main (kept the new includeInheritedShares short-circuit in front of it).

The test now covers three cases: ancestor metadata is loaded on the search page, loaded when no current folder is set, and not loaded when one is. The middle case fails without the new clause.

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.

You can remove the check for isLocationCommonActive(router, 'files-common-search') now though, it's covered by !resourcesStore.currentFolder already.

@fredrikblau
fredrikblau force-pushed the fix/3298-editor-indirect-shares branch from 0249e75 to de75a68 Compare September 8, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor doesn't show indirect shares in sidebar

2 participants