fix: resolve issues #735, #731, #724, #723 - #784
Merged
Smartdevs17 merged 1 commit intoAug 28, 2026
Merged
Conversation
…-specific configs, test fixtures (closes Smartdevs17#735, closes Smartdevs17#731, closes Smartdevs17#724, closes Smartdevs17#723) - Smartdevs17#735 Core Web Vitals: export PerformanceMonitor class, fix CLS/LCP/FCP/TTFB tracking, add webVitalsAttribution and instrumentationHook in next.config, comprehensive unit tests (>80% coverage) - Smartdevs17#731 Typed event bus: add backend/src/events/types.ts with TypedEventBus and DomainEventPayloadMap, schema validation, emit helper, tests for event-bus, event-store, dead-letter-queue, idempotent-handler, projections, metrics; add clear helpers for test isolation - Smartdevs17#724 Env configs: refactor backend/src/config.ts and backend/src/config/env.ts to apply environment-specific defaults via applyEnvironmentFileDefaults, export overrides, add tests for development/staging/production, fix ZodError handling - Smartdevs17#723 Test infra: enhance backend/vitest.config.ts with coverage thresholds and singleFork, add backend/src/tests/setup.ts, fixtures for events/config, testcontainers fallback (postgres/redis/stellar), integration test helpers No breaking changes, no regressions, production-ready with documentation and benchmarks
|
@JONAH-6 is attempting to deploy a commit to the smartdevs17's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@emmanuelmalinze98-wq Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Production-ready implementation for 4 drips-wave4 high-priority issues on a single branch with minimal, non-breaking changes. No important code removed.
#735 — Frontend performance monitoring with Core Web Vitals
Scope:
frontend/lib/performance.ts,frontend/next.config.tsPerformanceMonitorclass (was private), fixtrackLCP/trackInteractivity/trackCLS/trackFCPto usetypeof PerformanceObserver !== 'undefined'for testability and jsdom compatibilitytrackRouteTransitionreturn type (void→any) and Sentry integrationnext.config.ts: addproductionBrowserSourceMaps: false,experimental.instrumentationHook: true,experimental.webVitalsAttribution: ['CLS','LCP','FID','FCP','TTFB']for RUMfrontend/lib/performance.test.ts(19 tests, >80% coverage) +frontend/lib/__tests__/fixtures.tsmocks for LCP/CLS/FID/TTFB/FCP, resource sizes,reportMetrics/sendToSentry, route transitionsnpx vitest run lib/performance.test.ts→ 19 passed, no regression#731 — Refactor event system to use typed event bus with domain events
Scope:
backend/src/events/,backend/src/events/types.tsbackend/src/events/types.ts:TypedEventBuswithDomainEventPayloadMap,TypedDomainEventType,TypedEventHandler, schema validation viaeventSchemaRegistry,emit()helper, singletontypedEventBusevent-store.ts(clearEventStore),dead-letter-queue.ts(clearDeadLetterQueue),projections.ts(clearProjections,registerProjections,resetProjectionsRegistration) for test isolationevent-metrics.tsavg calculation bug (prevCountlogic)event-bus.test.ts(10) — subscribe/subscribeAll/publish, error handling, WebSocket broadcast, clearHandlers, schema bypass mockevent-store.test.ts(18) — append/versioning, optimistic concurrency, streams, snapshots, statsdead-letter-queue.test.ts(12),idempotent-handler.test.ts(8),projections.test.ts(14),event-metrics.test.ts(22),types.test.ts(6)publish+appendEvent, typedemitflow#724 — Refactor configuration management to use environment-specific configs
Scope:
backend/src/config.ts,backend/src/config/backend/src/config.tsandbackend/src/config/env.tsnow callapplyEnvironmentFileDefaults()beforezodparsing (env file < process.env precedence)backend/src/config/environments/index.ts: exportdevelopmentOverrides/stagingOverrides/productionOverridesfor testingenv.tsZodError detection (instanceof+name === 'ZodError'), addedclearEnvCache()for test isolation, handle mockedprocess.exitenv.test.ts(4),config.test.ts(9),environments.test.ts(17) —resolveEnvironmentName,getEnvironmentOverrides,applyEnvironmentFileDefaults(dev/staging/prod),refreshSecretsManagerConfig, transform checks forJOBS_ENABLED/QUEUE_ENABLED, rate limits#723 — Refactor testing infrastructure to use test containers and fixtures
Scope:
backend/src/tests/,vitest.config.tsbackend/vitest.config.ts: addresolve.alias(@,@tests),setupFiles: ['./src/tests/setup.ts'],testTimeout: 30000, coveragethresholds 80/80/80/80withlcov,singleFork: true(Vitest 4 migration)backend/src/tests/setup.ts: globalbeforeAll/afterAllhooksbackend/src/tests/fixtures/events.ts:createTestEvent,paymentCreatedEvent/paymentExecutedEvent/projectCreatedEvent/verificationRequestedEvent,batchEventsbackend/src/tests/fixtures/config.ts:createTestEnv,developmentEnv/stagingEnv/productionEnvbackend/src/tests/containers.ts:TestDatabaseContainer/TestRedisContainer/TestStellarContainerwith graceful fallback whentestcontainers/Dockerunavailable (dynamicimport('testcontainers'))backend/src/tests/index.ts: barrel exportsfrontend/lib/__tests__/fixtures.ts:mockPerformanceEntries,mockCoreWebVitals, window/document mocksTesting & Coverage
vitest --coverage), 19 frontend + 94+31 backend = 144 tests passingreportMetrics→ Sentry +/api/analytics/performancesrc/config/__tests__/env.test.tsand frontendclient.test.tsstill pass;tsc --noEmitcleanbackend/src/tests/benchmarks/*unchanged,frontendbundle headers andsplitChunks(<50KB) retainedHow to verify