mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5830] [MERGED] chore(common): deprecate legacy interceptor system #5368
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5368
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/hoppscotch/hoppscotch/pull/5830
Author: @CuriousCorrelation
Created: 2/4/2026
Status: ✅ Merged
Merged: 2/21/2026
Merged by: @jamesgeorge007
Base:
next← Head:fix-common-remove-deprecated-interceptor-code📝 Commits (2)
2d5cf80fix(common): deprecate legacy interceptor system8ab77bafix(common): use has() to handle falsy values📊 Changes
30 files changed (+23 additions, -3186 deletions)
View changed files
📝
packages/hoppscotch-common/src/components.d.ts(+1 -7)📝
packages/hoppscotch-common/src/components/app/spotlight/index.vue(+0 -4)➖
packages/hoppscotch-common/src/components/interceptors/ExtensionSubtitle.vue(+0 -39)➖
packages/hoppscotch-common/src/components/interceptors/agent/ModalNativeCACertificates.vue(+0 -181)➖
packages/hoppscotch-common/src/components/interceptors/agent/ModalNativeClientCertificates.vue(+0 -153)➖
packages/hoppscotch-common/src/components/interceptors/agent/ModalNativeClientCertsAdd.vue(+0 -288)➖
packages/hoppscotch-common/src/components/interceptors/agent/RegistrationModal.vue(+0 -146)➖
packages/hoppscotch-common/src/components/interceptors/agent/RootExt.vue(+0 -100)📝
packages/hoppscotch-common/src/components/settings/InterceptorErrorPlaceholder.vue(+8 -13)📝
packages/hoppscotch-common/src/helpers/actions.ts(+0 -1)➖
packages/hoppscotch-common/src/modules/interceptors.ts(+0 -47)📝
packages/hoppscotch-common/src/newstore/settings.ts(+9 -8)📝
packages/hoppscotch-common/src/pages/settings.vue(+0 -45)📝
packages/hoppscotch-common/src/platform/index.ts(+0 -7)➖
packages/hoppscotch-common/src/platform/interceptors.ts(+0 -17)➖
packages/hoppscotch-common/src/platform/std/inspections/__tests__/extension.inspector.spec.ts(+0 -88)➖
packages/hoppscotch-common/src/platform/std/inspections/extension.inspector.ts(+0 -114)➖
packages/hoppscotch-common/src/platform/std/interceptors/agent/index.ts(+0 -837)➖
packages/hoppscotch-common/src/platform/std/interceptors/agent/persisted-data.ts(+0 -80)➖
packages/hoppscotch-common/src/platform/std/interceptors/extension.ts(+0 -240)...and 10 more files
📄 Description
This removes the legacy
std/interceptors/directory and associatedinfrastructure in favor of the kernel-based interceptors introduced
earlier. The legacy system was kept around for backward compatibility
but is now fully superseded by
std/kernel-interceptors/.Closes FE-1061
The legacy interceptor system had parallel implementations for agent,
extension, and proxy interceptors that duplicated logic already present
in the kernel-based equivalents.
What's removed
Legacy interceptor impls:
std/interceptors/agent/(AgentInterceptorService, persisted-data, modals)std/interceptors/extension.ts(ExtensionInterceptorService)std/interceptors/proxy.ts(proxyInterceptor)std/interceptors/helpers.ts(preProcessRequest)UI components:
components/interceptors/agent/(RegistrationModal, RootExt, CA/Client cert modals)components/interceptors/ExtensionSubtitle.vuecomponents/interceptors/ErrorPlaceholder.vue→ moved tocomponents/settings/with a few modificationsService infra:
services/interceptor.service.tsand it's testsservices/spotlight/searchers/interceptor.searcher.tsmodules/interceptors.tsmoduleplatform/interceptors.tsplatform definitionplatform/std/inspections/extension.inspector.tsand testsMostly cleanup:
CURRENT_INTERCEPTOR_IDfromSettingsDefagent.open-registration-modalaction since the legacy agent registration flow is no longer used. The kernel-based agent interceptor handles registration through its own service.What's kept/moved
The
ErrorPlaceholder.vuecomponent is still needed by kernelinterceptors, so it's moved to
components/settings/InterceptorErrorPlaceholder.vuewith imports updated across all interceptors.
The
preProcessRequesthelper from the legacy system is not neededsince kernel interceptors use
preProcessRelayRequestfromhelpers/functional/process-request.ts.Migration
Settings migration in
newstore/settings.tsnow:EXTENSIONS_ENABLEDwithout migrating (legacy)PROXY_ENABLEDwithout migrating (legacy)CURRENT_INTERCEPTOR_IDif presentUsers on the legacy system will have their interceptor selection reset
to the platform default on first load. This is acceptable since the
kernel interceptor system has been the active path for some time so
there's little to no chance the legacy system still being in use.
Notes to reviewers
The legacy
x25519.utils.randomPrivateKey()issue mentioned in theaudit ticket doesn't need fixing since that code is being removed
entirely.
Testing should verify interceptor selection works in settings,
spotlight search for interceptors functions correctly, and that
no runtime errors occur from missing imports.
Summary by cubic
Removes the legacy interceptor system and fully switches to kernel-based interceptors, reducing duplicate logic and legacy UI. Aligns settings, imports, and spotlight to the kernel path, satisfying FE-1061.
Refactors
Migration
Written for commit
8ab77ba7d8. Summary will update on new commits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.