Skip to content

perf(files): load the folder description editor only when needed - #9748

Merged
mejo- merged 1 commit into
mainfrom
perf/rich-workspace-lazy-reader
Dec 1, 2026
Merged

mejo- merged 1 commit into
mainfrom
perf/rich-workspace-lazy-reader

Conversation

@mejo-

@mejo- mejo- commented Nov 30, 2026

Copy link
Copy Markdown
Member

The files header for folder descriptions is active in every folder and imported the reader and editor eagerly, which pulled in the whole editor (about 1 MB gzipped, including the emoji data) even in folders without a Readme. Load both as async components so they are only fetched once a description is shown.

Assisted-by: ClaudeCode:claude-opus-5-5

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

@mejo-
mejo- requested review from skjnldsv and a balanced review from Copilot November 30, 2026 17:28
@mejo- mejo- self-assigned this Nov 30, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Nov 30, 2026
@mejo-

mejo- commented Nov 30, 2026

Copy link
Copy Markdown
Member Author

/backport to stable35

@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Nov 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the deferred folder-description loading change.

No open issues 🎉

What changed in this PR

Defers loading the folder-description reader and editor in Files, avoiding the editor bundle download in folders without a description.

Changes:

  • Registers the reader and editor as async Vue components.
  • Adds a Playwright test checking that the editor chunk loads only after creating a folder description.
File Description
src/​views/​RichWorkspace.vue Replaces eager reader and editor imports with async components.
playwright/​e2e/​folder-description/​create.spec.ts Adds network-request assertions for deferred editor loading.

Review effort: Balanced

@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

The test gets the job done. For an e2e test it contains a lot of knowledge about how our chunks are named. I think what you actually want to test is that only small assets from text are loaded initially and that the editor works later.
I'd imagine a fixture like getLoadedTextAssetsSize() that tracks the request to text assets and aggregates their size.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point. Adjusted now to your suggestion 😊

@max-nextcloud max-nextcloud 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.

Code changes look good. Minor comment about the test.

The files header for folder descriptions is active in every folder and
imported the reader and editor eagerly, which pulled in the whole editor
(about 1 MB gzipped, including the emoji data) even in folders without a
Readme. Load both as async components so they are only fetched once a
description is shown.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo-
mejo- force-pushed the perf/rich-workspace-lazy-reader branch from c4ac35c to c0b9ae0 Compare December 1, 2026 12:05
@mejo-
mejo- enabled auto-merge December 1, 2026 12:06
@mejo-
mejo- merged commit 983d9ff into main Dec 1, 2026
77 of 79 checks passed
@mejo-
mejo- deleted the perf/rich-workspace-lazy-reader branch December 1, 2026 12:46
@github-project-automation github-project-automation Bot moved this from 🧭 Planning evaluation (don't pick) to ☑️ Done in 📝 Productivity team Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits performance 🚀

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

5 participants