[PR #6204] [MERGED] refactor(frontend): remove unused response envelope schema #6167

Closed
opened 2026-11-02 04:06:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6204
Author: @n0ctal
Created: 8/12/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @MHSanaei

Base: main ← Head: codex/upstream-remove-unused-envelope


📝 Commits (3)

  • 80f1ab4 refactor(frontend): remove unused response envelope schema
  • 820f29a Merge branch 'main' into codex/upstream-remove-unused-envelope
  • 9a83e4d Merge branch 'main' into codex/upstream-remove-unused-envelope

📊 Changes

1 file changed (+0 additions, -10 deletions)

View changed files

➖ frontend/src/schemas/_envelope.ts (+0 -10)

📄 Description

Summary

frontend/src/schemas/_envelope.ts exports msgSchema and MsgOf. Neither is referenced anywhere in the repository. This removes the file.

Why

The module arrived in 3f787ae1 ("complete Zod migration of frontend"). The response-envelope concept was then re-implemented independently in frontend/src/utils/index.ts, which declares its own local RespEnvelope type and uses that instead. _envelope.ts was left behind and has had no consumer since.

Dead schema modules are worse than dead helpers: the next person adding response validation finds two envelope definitions and has to work out which one is authoritative.

Scope

  • Delete frontend/src/schemas/_envelope.ts (10 lines).

Nothing else changes. There is no barrel re-export of this module in frontend/src/schemas/index.ts, and it is not produced by code generation.

Validation

  • Repository-wide search for msgSchema, MsgOf and _envelope across .ts, .tsx, .html, .go and .json: zero matches outside the deleted file.
  • knip no longer reports the file or its symbols.
  • tsc --noEmit, eslint src, vitest run (1065 tests in 112 files) and the production vite build all pass.
  • make gen-check clean.

Risk

Low. The only way this breaks a consumer is a fully dynamic, string-built import of the module path; the import.meta.glob patterns in the tree were checked by hand and none match src/schemas/_envelope.ts.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6204 **Author:** [@n0ctal](https://github.com/n0ctal) **Created:** 8/12/2026 **Status:** ✅ Merged **Merged:** 8/13/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `codex/upstream-remove-unused-envelope` --- ### 📝 Commits (3) - [`80f1ab4`](https://github.com/MHSanaei/3x-ui/commit/80f1ab4b72624b87d0a8406b0a8e0c70f85ccd13) refactor(frontend): remove unused response envelope schema - [`820f29a`](https://github.com/MHSanaei/3x-ui/commit/820f29a020ffb315c1c3264eb7d4d71b1ead7849) Merge branch 'main' into codex/upstream-remove-unused-envelope - [`9a83e4d`](https://github.com/MHSanaei/3x-ui/commit/9a83e4df346ecfa396dba9d262bc022ca943a54d) Merge branch 'main' into codex/upstream-remove-unused-envelope ### 📊 Changes **1 file changed** (+0 additions, -10 deletions) <details> <summary>View changed files</summary> ➖ `frontend/src/schemas/_envelope.ts` (+0 -10) </details> ### 📄 Description ## Summary `frontend/src/schemas/_envelope.ts` exports `msgSchema` and `MsgOf`. Neither is referenced anywhere in the repository. This removes the file. ## Why The module arrived in 3f787ae1 ("complete Zod migration of frontend"). The response-envelope concept was then re-implemented independently in `frontend/src/utils/index.ts`, which declares its own local `RespEnvelope` type and uses that instead. `_envelope.ts` was left behind and has had no consumer since. Dead schema modules are worse than dead helpers: the next person adding response validation finds two envelope definitions and has to work out which one is authoritative. ## Scope - Delete `frontend/src/schemas/_envelope.ts` (10 lines). Nothing else changes. There is no barrel re-export of this module in `frontend/src/schemas/index.ts`, and it is not produced by code generation. ## Validation - Repository-wide search for `msgSchema`, `MsgOf` and `_envelope` across `.ts`, `.tsx`, `.html`, `.go` and `.json`: zero matches outside the deleted file. - `knip` no longer reports the file or its symbols. - `tsc --noEmit`, `eslint src`, `vitest run` (1065 tests in 112 files) and the production `vite build` all pass. - `make gen-check` clean. ## Risk Low. The only way this breaks a consumer is a fully dynamic, string-built import of the module path; the `import.meta.glob` patterns in the tree were checked by hand and none match `src/schemas/_envelope.ts`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:06:50 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6167
No description provided.