chore(analytics): drop unnecessary export from ANALYTICS_EVENT_NAME_KEBAB_SEGMENT - #27840
Merged
Conversation
…EBAB_SEGMENT (cherry picked from commit e7cf9315db6171f086a50174ed0457327da68c88)
This was referenced May 17, 2026
This was referenced May 17, 2026
Merged
mroz22
marked this pull request as ready for review
May 17, 2026 12:50
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes an internal-only analytics event-name regex from the public @suite-common/analytics barrel export while keeping validation behavior unchanged.
Changes:
- Makes
ANALYTICS_EVENT_NAME_KEBAB_SEGMENTprivate toeventNameValidation.ts. - Removes the constant from
suite-common/analytics/src/index.tsexports.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
suite-common/analytics/src/eventNameValidation.ts |
Keeps the regex available internally for event name validation without exporting it. |
suite-common/analytics/src/index.ts |
Drops the unnecessary public re-export from the analytics package barrel. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
martykan
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drops the unnecessary public export of
ANALYTICS_EVENT_NAME_KEBAB_SEGMENTfrom@suite-common/analytics. The constant is used internally only.Split out from the staging dead-code PR #27551 (suite-common/* batch).
Related PRs
Sibling PRs in this batch (each removes one piece of dead code from
suite-common/*):Parent staging PR: #27551
Test plan
🤖 LLM Test Recommendations
Summary: The changes are in
suite-common/analytics/src/eventNameValidation.tsand its barrelindex.ts. These files govern analytics event name validation logic used across the Suite application. The risk is moderate — if event name validation rules change, any test that asserts on specific analytics event types or payloads could break. The recommended strategy focuses on the dedicated analytics E2E tests which directly exercise event type matching and payload validation, plus the settings/general test which also validates multiple analytics events.Changed files (2)
suite-common/analytics/src/eventNameValidation.tssuite-common/analytics/src/index.tsRecommended tests (6)
🔴 High priority (2)
../../suite/e2e/tests/analytics/events.test.ts— This test directly exercises analytics event types and event validation. The changed fileeventNameValidation.tslikely validates analytics event names, and theindex.tsre-exports this module. This test fires and validates multiple analytics events (SuiteReady, DeviceConnect, TransportType, DeviceDisconnect, settingsAnalytics) and checks their payloads, making it the most direct consumer of analytics event name infrastructure.../../suite/e2e/tests/analytics/toggle.test.ts— This test validates analytics enable/disable lifecycle, event firing (settingsAnalyticsEvent, settingsGeneralChangeFiatEvent, suiteReadyEvent, routerLocationChangeEvent), and metadata fields (c_type, c_session_id, c_instance_id). Changes to event name validation could break event type matching or event identification in these assertions.🟡 Medium priority (4)
../../suite/e2e/tests/analytics/promo-banner-events.test.ts— This test asserts that analytics payloads contain correct c_type matching EventType.PromoDashboardBanner. If eventNameValidation changes how event names are validated or formatted, this test's event type assertions could fail.../../suite/e2e/tests/analytics/staking-events.test.ts— This test validates StakingNavigate analytics events with specific c_type and networkSymbol payloads. Changes to event name validation could affect how these event types are validated or dispatched.../../suite/e2e/tests/analytics/wallet-connect-events.test.ts— This test checks WalletConnect analytics events (WalletConnectInit, WalletConnectPaired, WalletConnectProposal, etc.) by c_type. The source_hints explicitly reference '@suite-common/analytics (EventType constants)' which is the changed package. Event name validation changes could affect these event type checks.../../suite/e2e/tests/settings/general.test.ts— This test validates analytics events for fiat change, theme change, language change, and analytics toggle (settingsGeneralChangeFiatEvent, settingsGeneralChangeThemeEvent, settingsGeneralChangeLanguageEvent, settingsAnalyticsEvent). These events flow through the analytics module where event name validation applies.suite-common/analytics/src/eventNameValidation.tsUpdated: 2026-05-17T06:44:03.837Z
🔍 Currents Test Results
🔍 Suite desktop test results: View in Currents
🔍 Suite web test results: View in Currents
🔍 Suite native android test results: View in Currents
🔒 Quarantined E2E Tests
Trezor Suite (web) — 4 test(s)
Updated: 2026-05-17T06:49:02.270Z • 4 test(s) total
Trezor Suite (desktop) — 2 test(s)
Updated: 2026-05-17T06:47:25.468Z • 2 test(s) total
🌐 Preview deployments
🌐 Suite Web preview: https://dev.suite.sldev.cz/suite-web/mroz22/dead-code-analytics/web/