mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6205] [MERGED] refactor(frontend): remove unreachable barrel modules #6166
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6166
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6205
Author: @n0ctal
Created: 8/12/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @MHSanaei
Base:
main← Head:codex/upstream-remove-unused-frontend-barrels📝 Commits (2)
1e72cearefactor(frontend): remove unreachable barrel modulesd53dccdMerge branch 'main' into codex/upstream-remove-unused-frontend-barrels📊 Changes
7 files changed (+0 additions, -20 deletions)
View changed files
➖
frontend/src/components/feedback/index.ts(+0 -2)➖
frontend/src/components/ui/notifications/index.ts(+0 -8)➖
frontend/src/pages/inbounds/clients/index.ts(+0 -4)➖
frontend/src/pages/inbounds/form/index.ts(+0 -1)➖
frontend/src/pages/inbounds/info/index.ts(+0 -1)➖
frontend/src/schemas/index.ts(+0 -2)➖
frontend/src/schemas/protocols/shared/index.ts(+0 -2)📄 Description
Summary
Seven barrel modules re-export symbols that nothing imports through them. Every consumer already imports the concrete module directly. This removes the seven files.
Why
A barrel that nobody imports is not neutral. It creates a second, equally plausible import path for the same symbol, so two files that use the same component can end up importing it two different ways. It also keeps modules alive for tools such as
knip, which masks genuinely unused code behind an unused re-export.None of the seven is imported as a directory (
from '@/schemas'and friends), which is the usual reason to keep a barrel around.Scope
Deleted, 20 lines total:
frontend/src/components/feedback/index.tsfrontend/src/components/ui/notifications/index.tsfrontend/src/pages/inbounds/clients/index.tsfrontend/src/pages/inbounds/form/index.tsfrontend/src/pages/inbounds/info/index.tsfrontend/src/schemas/index.tsfrontend/src/schemas/protocols/shared/index.tsNo import statement anywhere is rewritten, because no import went through these files.
Validation
knipoutput after the change no longer lists them.tsc --noEmit,eslint src,vitest run(1065 tests in 112 files), productionvite build: all pass.make gen-checkclean.Risk
Low, and it is the kind of change
tscis good at catching: a missed consumer becomes a compile error rather than a runtime surprise. Storybook entries andsrc/test/*were treated as live entry points and not touched.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.