[PR #5830] [MERGED] chore(common): deprecate legacy interceptor system #5368

Closed
opened 2026-03-17 02:49:20 +03:00 by kerem · 0 comments
Owner

📋 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: nextHead: fix-common-remove-deprecated-interceptor-code


📝 Commits (2)

  • 2d5cf80 fix(common): deprecate legacy interceptor system
  • 8ab77ba fix(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 associated
infrastructure 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.vue
  • components/interceptors/ErrorPlaceholder.vue → moved to components/settings/ with a few modifications

Service infra:

  • services/interceptor.service.ts and it's tests
  • services/spotlight/searchers/interceptor.searcher.ts
  • modules/interceptors.ts module
  • platform/interceptors.ts platform definition
  • platform/std/inspections/extension.inspector.ts and tests

Mostly cleanup:

  • Removed CURRENT_INTERCEPTOR_ID from SettingsDef
  • Updated settings migration to delete legacy interceptor ID
  • Removed from persistence validation schema
  • Removed agent.open-registration-modal action 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.vue component is still needed by kernel
interceptors, so it's moved to
components/settings/InterceptorErrorPlaceholder.vue
with imports updated across all interceptors.

The preProcessRequest helper from the legacy system is not needed
since kernel interceptors use preProcessRelayRequest from
helpers/functional/process-request.ts.

Migration

Settings migration in newstore/settings.ts now:

  • Deletes EXTENSIONS_ENABLED without migrating (legacy)
  • Deletes PROXY_ENABLED without migrating (legacy)
  • Deletes CURRENT_INTERCEPTOR_ID if present

Users 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 the
audit 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

    • Deleted legacy interceptors and infra (std/interceptors for agent/extension/proxy, helpers, InterceptorService, old spotlight searcher, module and platform defs, extension inspector).
    • Moved ErrorPlaceholder.vue to components/settings/InterceptorErrorPlaceholder.vue and updated kernel interceptors to use it.
    • Updated ErrorPlaceholder to use KernelInterceptorService and ExtensionKernelInterceptorService.
  • Migration

    • Dropped CURRENT_INTERCEPTOR_ID from settings and validation; removed EXTENSIONS_ENABLED and PROXY_ENABLED, ensuring removal even when values are falsy.
    • Removed agent.open-registration-modal action; kernel agent interceptor handles registration.
    • Users on legacy interceptors will reset to the platform default on first load.

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.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5830 **Author:** [@CuriousCorrelation](https://github.com/CuriousCorrelation) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/21/2026 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `fix-common-remove-deprecated-interceptor-code` --- ### 📝 Commits (2) - [`2d5cf80`](https://github.com/hoppscotch/hoppscotch/commit/2d5cf80bf8f9f9bafd27daff04cba507b1429782) fix(common): deprecate legacy interceptor system - [`8ab77ba`](https://github.com/hoppscotch/hoppscotch/commit/8ab77ba7d8fc576514bc862140aa8e42ec1b330f) fix(common): use has() to handle falsy values ### 📊 Changes **30 files changed** (+23 additions, -3186 deletions) <details> <summary>View changed files</summary> 📝 `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_ </details> ### 📄 Description This removes the legacy `std/interceptors/` directory and associated infrastructure 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.vue` - `components/interceptors/ErrorPlaceholder.vue` → moved to `components/settings/` with a few modifications Service infra: - `services/interceptor.service.ts` and it's tests - `services/spotlight/searchers/interceptor.searcher.ts` - `modules/interceptors.ts` module - `platform/interceptors.ts` platform definition - `platform/std/inspections/extension.inspector.ts` and tests Mostly cleanup: - Removed `CURRENT_INTERCEPTOR_ID` from `SettingsDef` - Updated settings migration to delete legacy interceptor ID - Removed from persistence validation schema - Removed `agent.open-registration-modal` action 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.vue` component is still needed by kernel interceptors, so it's moved to `components/settings/InterceptorErrorPlaceholder.vue` with imports updated across all interceptors. The `preProcessRequest` helper from the legacy system is not needed since kernel interceptors use `preProcessRelayRequest` from `helpers/functional/process-request.ts`. ### Migration Settings migration in `newstore/settings.ts` now: - Deletes `EXTENSIONS_ENABLED` without migrating (legacy) - Deletes `PROXY_ENABLED` without migrating (legacy) - Deletes `CURRENT_INTERCEPTOR_ID` if present Users 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 the audit 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. <!-- This is an auto-generated description by cubic. --> --- ## 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** - Deleted legacy interceptors and infra (std/interceptors for agent/extension/proxy, helpers, InterceptorService, old spotlight searcher, module and platform defs, extension inspector). - Moved ErrorPlaceholder.vue to components/settings/InterceptorErrorPlaceholder.vue and updated kernel interceptors to use it. - Updated ErrorPlaceholder to use KernelInterceptorService and ExtensionKernelInterceptorService. - **Migration** - Dropped CURRENT_INTERCEPTOR_ID from settings and validation; removed EXTENSIONS_ENABLED and PROXY_ENABLED, ensuring removal even when values are falsy. - Removed agent.open-registration-modal action; kernel agent interceptor handles registration. - Users on legacy interceptors will reset to the platform default on first load. <sup>Written for commit 8ab77ba7d8fc576514bc862140aa8e42ec1b330f. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:49:20 +03: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
starred/hoppscotch#5368
No description provided.