Skip to content

chore(root): remove 5 unused exports#10641

Merged
ChmaraX merged 1 commit intonextfrom
cursor/dead-code-cleanup-5992
Apr 13, 2026
Merged

chore(root): remove 5 unused exports#10641
ChmaraX merged 1 commit intonextfrom
cursor/dead-code-cleanup-5992

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor bot commented Apr 10, 2026

Summary

Removed 5 unused exports from dashboard files that are only referenced internally within their own files.

Changes

# File What was removed Rationale
1 apps/dashboard/src/components/conditions-editor/field-type-operators.ts Un-exported FIELD_TYPE_OPERATORS Only used internally by getOperatorsForFieldType in the same file
2 apps/dashboard/src/components/conditions-editor/field-type-operators.ts Un-exported RELATIVE_DATE_OPERATORS Only used internally by isRelativeDateOperator in the same file
3 apps/dashboard/src/components/conditions-editor/select-option-utils.tsx Un-exported EMPTY_SELECT_VALUE Only used internally by toSafeValue/fromSafeValue in the same file
4 apps/dashboard/src/components/schema-editor/utils/validation-schema.ts Un-exported SchemaEditorFormValuesSchema Only consumed externally via the editorSchema alias; direct import is unused
5 apps/dashboard/src/components/primitives/sonner-helpers.tsx Un-exported CONSISTENT_TOAST_OPTIONS Only used internally by showToast/showSuccessToast/showErrorToast in the same file

Validation

  • tsc --noEmit -p tsconfig.app.json (dashboard): passed (exit 0)
  • Changes reverted: 0

Skipped findings

  • 58 unused files flagged (mostly barrel index.ts re-exports, template files under packages/novu, enterprise/, config files, apps/webhook and apps/inbound-mail — all skip-listed)
  • 409 remaining unused exports across many files — deferred to future runs
  • apps/dashboard/src/types/global.ts — global type declarations, skipped per policy
  • apps/dashboard/src/context/region/*self-hosted* — wired via Vite alias, not safe to delete
Full knip report

Unused files (58)

  • apps/api/src/app/activity/usecases/build-active-subscribers-trend-chart/index.ts
  • apps/api/src/app/auth/usecases/switch-environment/index.ts
  • apps/api/src/app/auth/usecases/switch-organization/index.ts
  • apps/api/src/app/contexts/usecases/create-context/index.ts
  • apps/api/src/app/contexts/usecases/update-context/index.ts
  • apps/api/src/app/environment-variables/usecases/get-environment-variable-usage/index.ts
  • apps/api/src/app/environments-v2/usecases/diff-environment/index.ts
  • apps/api/src/app/environments-v2/usecases/publish-environment/index.ts
  • apps/api/src/app/environments-v2/usecases/sync-strategies/base/index.ts
  • apps/api/src/app/environments-v2/usecases/sync-strategies/base/operations/index.ts
  • apps/api/src/app/environments-v2/usecases/sync-strategies/index.ts
  • apps/api/src/app/shared/services/encryption/index.ts
  • apps/api/src/app/topics-v2/usecases/delete-topic-subscriptions/index.ts
  • apps/api/src/app/topics-v2/usecases/list-subscriber-subscriptions/index.ts
  • apps/api/src/app/user/usecases/create-user/index.ts
  • apps/api/src/app/workflows-v2/maily-test-data.ts
  • apps/dashboard/src/components/layouts/index.ts
  • apps/dashboard/src/components/workflow-editor/payload-schema/index.ts
  • apps/dashboard/src/components/workflow-editor/payload-schema/utils/index.ts
  • apps/dashboard/src/components/workflow-editor/steps/throttle/index.ts
  • apps/dashboard/src/context/region/index.self-hosted.ts
  • apps/dashboard/src/context/region/region-context.self-hosted.tsx
  • apps/dashboard/src/types/global.ts
  • apps/webhook/src/config/env.validators.ts
  • apps/webhook/src/shared/constants.ts
  • apps/webhook/src/shared/framework/response.interceptor.ts
  • apps/webhook/src/shared/framework/user.decorator.ts
  • apps/webhook/src/shared/helpers/regex.service.ts
  • libs/application-generic/src/usecases/message-template/create-message-template/index.ts
  • libs/automation/src/generators/provider/generator.ts
  • libs/automation/src/generators/provider/schema.ts
  • libs/dal/src/repositories/index.ts
  • packages/add-inbox/src/generators/frameworks/index.ts
  • packages/novu/src/client/cli.client.ts
  • packages/novu/src/client/index.ts
  • packages/novu/src/commands/init/templates/app-react-email/ts/* (14 files)
  • packages/novu/src/commands/step/fixtures/templates/* (4 files)
  • packages/novu/src/commands/step/config/index.ts
  • packages/novu/src/commands/step/templates/index.ts
  • packages/providers/src/lib/sms/imedia/index.ts

Unused exports (414)

409 remaining unused exports across libs, apps/api, apps/dashboard, apps/worker, packages/novu, packages/add-inbox, packages/providers, and packages/shared.

Open in Web View Automation 

Un-exported the following dashboard symbols that are only used internally:

- FIELD_TYPE_OPERATORS in field-type-operators.ts
- RELATIVE_DATE_OPERATORS in field-type-operators.ts
- EMPTY_SELECT_VALUE in select-option-utils.tsx
- SchemaEditorFormValuesSchema in validation-schema.ts
- CONSISTENT_TOAST_OPTIONS in sonner-helpers.tsx

Co-authored-by: Adam Chmara <[email protected]>
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 10, 2026

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit 4adac07
🔍 Latest deploy log https://app.netlify.com/projects/dashboard-v2-novu-staging/deploys/69d8b27bcdc90a00082bc219
😎 Deploy Preview https://deploy-preview-10641.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

Hey there and thank you for opening this pull request! 👋

We require pull request titles to follow specific formatting rules and it looks like your proposed title needs to be adjusted.

Your PR title is: chore(root): remove 5 unused exports

Requirements:

  1. Follow the Conventional Commits specification
  2. As a team member, include Linear ticket ID at the end: fixes TICKET-ID or include it in your branch name

Expected format: feat(scope): Add fancy new feature fixes NOV-123

Details:

PR title must end with 'fixes TICKET-ID' (e.g., 'fixes NOV-123') or include ticket ID in branch name

@ChmaraX ChmaraX marked this pull request as ready for review April 13, 2026 06:30
@ChmaraX ChmaraX merged commit 27deb92 into next Apr 13, 2026
30 checks passed
@ChmaraX ChmaraX deleted the cursor/dead-code-cleanup-5992 branch April 13, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants