Skip to content

fix(content-tree): apply filtered children during restructure#8011

Merged
alexander-akait merged 1 commit into
webpack:mainfrom
ryzrr:fix/content-tree-restructure-filter-assignment
Mar 14, 2026
Merged

fix(content-tree): apply filtered children during restructure#8011
alexander-akait merged 1 commit into
webpack:mainfrom
ryzrr:fix/content-tree-restructure-filter-assignment

Conversation

@ryzrr
Copy link
Copy Markdown
Member

@ryzrr ryzrr commented Mar 13, 2026

Summary
The content tree restructuring pipeline called item.children.filter(filter) but discarded the returned array and this made filtering a no-op and it could silently break future filter rules in navigation/content generation.
So this PR assigns the filtered result back to item.children before sorting, so the pipeline behavior matches its contract.

What kind of change does this PR introduce?
Bug fix

Did you add tests for your changes?
Yes

Does this PR introduce a breaking change?
No

If relevant, what needs to be documented once your changes are merged or what have you already documented?
No additional docs required.

Use of AI
Yes, I used an Ai collaborator to help review my initial logic and to assist in debugging the Jest ESM environment configuration but still, the identification of the no-op filter bug and the final implementation of the unit tests were manually verified and tested locally to ensure the pipeline correctness.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-js-org Ready Ready Preview, Comment Mar 13, 2026 9:38pm

Request Review

@alexander-akait alexander-akait merged commit 0966ee8 into webpack:main Mar 14, 2026
9 checks passed
@ryzrr
Copy link
Copy Markdown
Member Author

ryzrr commented Mar 14, 2026

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.

2 participants