Skip to content

fix(filemanager): fix invalid uri when using scrolling triggers cursor pagination#330

Merged
HFO4 merged 1 commit into
cloudreve:masterfrom
YUDONGLING:fix-filemanager-invalid-uri-20260317.1
Mar 18, 2026
Merged

fix(filemanager): fix invalid uri when using scrolling triggers cursor pagination#330
HFO4 merged 1 commit into
cloudreve:masterfrom
YUDONGLING:fix-filemanager-invalid-uri-20260317.1

Conversation

@YUDONGLING

Copy link
Copy Markdown
Member

Copilot AI 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.

Pull request overview

This PR updates the FileManager explorer views to generate loading-placeholder items with a cloudreve://-prefixed path (instead of a plain /<id> path), aiming to make placeholder entries compatible with code paths that parse file URIs.

Changes:

  • Add CrUriPrefix usage for loading-placeholder path generation across List, Grid, and Gallery views.
  • Simplify placeholder id assignment by reusing the local id variable.

Reviewed changes

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

File Description
src/component/FileManager/Explorer/ListView/ListBody.tsx Updates list-view loading placeholder path/id generation to use CrUriPrefix.
src/component/FileManager/Explorer/GridView/GridView.tsx Updates grid-view loading placeholder path/id generation to use CrUriPrefix.
src/component/FileManager/Explorer/GalleryView/GalleryView.tsx Updates gallery-view loading placeholder path/id generation to use CrUriPrefix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 35 to 40
const id = `loadingPlaceholder-${pagination.next_token}-${i}`;
list.push({
...files[0],
path: "/" + id,
id: `loadingPlaceholder-${pagination.next_token}-${i}`,
path: `${CrUriPrefix}${id}`,
id: id,
first: i == 0,
Comment on lines 97 to 103
file={{
...files[0],
path: "/" + id,
id: `loadingPlaceholder-${pagination.next_token}-${i}`,
path: `${CrUriPrefix}${id}`,
id: id,
first: i == 0,
placeholder: true,
}}
Comment on lines 53 to 58
const id = `loadingPlaceholder-${pagination.next_token}-${i}`;
list.push({
...files[0],
path: "/" + id,
id: `loadingPlaceholder-${pagination.next_token}-${i}`,
path: `${CrUriPrefix}${id}`,
id: id,
first: i == 0,
@HFO4 HFO4 merged commit b28d138 into cloudreve:master Mar 18, 2026
4 of 5 checks passed
@HFO4

HFO4 commented Mar 18, 2026

Copy link
Copy Markdown
Member

Thanks!

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.

Using cursor pagination causes frontend errors, while traditional pagination does not

3 participants