mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6206] [MERGED] refactor(frontend): remove unused legacy utilities #6168
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#6168
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/6206
Author: @n0ctal
Created: 8/12/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @MHSanaei
Base:
main← Head:codex/upstream-remove-unused-legacy-utils📝 Commits (2)
894464brefactor(frontend): remove unused legacy utilities2f9daabMerge branch 'main' into codex/upstream-remove-unused-legacy-utils📊 Changes
1 file changed (+0 additions, -42 deletions)
View changed files
📝
frontend/src/utils/index.ts(+0 -42)📄 Description
Summary
Utils,ArrayUtils,URLBuilderandBuildURLOptionsinfrontend/src/utils/index.tshave no callers. This removes them, 42 lines out of the 974-line module.Why
These are leftovers rather than a public surface:
Utilsholds a singledebounce,ArrayUtilsa singledoAllItemsExist, andURLBuilder.buildURLbuilds panel URLs fromwindow.location. The frontend is a bundled application, not a published library, so an export with no importer has no external consumer to protect.URLBuilder.buildURLin particular is the kind of helper someone reaches for when adding a new absolute-URL feature, and it encodes assumptions (implicitwindow.locationfallbacks, port elision) that are no longer exercised or tested by anything.Scope
frontend/src/utils/index.ts: removeUtils,ArrayUtils,URLBuilder,BuildURLOptions.Everything else in the module is untouched, including
Msg,HttpUtil,SizeFormatter,NumberFormatter,ColorUtilsandLanguageManager.Validation
Utils(whole word),ArrayUtils,URLBuilder,BuildURLOptions,doAllItemsExist,buildURLanddebounce: zero matches outside the removed block.knipno longer reports the symbols.tsc --noEmit,eslint src,vitest run(1065 tests in 112 files), productionvite build: all pass.make gen-checkclean.Risk
Low. If a future feature wants debouncing or URL building, it should get a helper with tests rather than inherit these; nothing in the current tree depends on them.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.