Commit Graph

507 Commits

Author SHA1 Message Date
saravanakumardb1
8e90358960 feat(platform): PII Redaction library (Appendix D.1)
- 8 PII patterns: email, SSN, credit card, phone, IP, password/token, JWT, API key
- redactPII() for string redaction
- redactObject() for recursive object redaction
- redactLogMessage() for log entries with context
- containsPII() and getPIITypes() detection helpers
- Custom pattern registration
- Preset configurations: minimal, standard, aggressive
2026-03-03 09:37:53 -08:00
saravanakumardb1
399f6f0bed test(admin-web): Playwright E2E tests for diagnostics (Phase 4.4)
- Debug session CRUD: create, view, pause, resume, cancel
- Session filtering and search
- Logs viewing with level filtering and search
- Trace span viewing with expansion
- Screenshot gallery and lightbox navigation
- End-to-end workflow tests
- Error threshold and crash-triggered auto-session tests
2026-03-03 09:36:53 -08:00
saravanakumardb1
a5d68decdb feat(diagnostics): Admin dashboard client library (Phase 3.4)
- querySessions, createSession, getSession, updateSession, cancelSession
- getTraces, getLogs, getScreenshots
- Full TypeScript types for all diagnostics entities
2026-03-03 09:35:41 -08:00
saravanakumardb1
fc8f8d33dc feat(kotlin-platform-sdk): add diagnostics module (Phase 2.3)
New diagnostics package in kotlin-platform-sdk:

- DiagnosticsTypes: Session, TraceSpan, LogEntry, Breadcrumb, NetworkRequest

- DiagnosticsClient: singleton with StateFlow for reactive state

- BreadcrumbTrail: ring buffer (max 100) for timeline

- NetworkInterceptor: OkHttp interceptor for HTTP capture

- DeviceStateCollector: battery, memory, storage, network

- 16+ JUnit tests for types and breadcrumbs

Features:

- configure()/start()/stop() lifecycle

- trace() suspend span wrapper

- log() with breadcrumb integration

- ETag-based config polling

- 30-second batch flush
2026-03-03 09:31:59 -08:00
saravanakumardb1
abcf817cb3 feat(swift-diagnostics): implement Phase 2.2 Swift Client SDK
New package ByteLystDiagnostics with:

- Core types: DiagnosticsSession, TraceSpan, LogEntry, Breadcrumb

- DiagnosticsClient: actor-based singleton with polling

- BreadcrumbTrail: ring buffer (max 100) for timeline

- NetworkInterceptor: URLProtocol-based HTTP capture

- DeviceState: battery, memory, storage, network, thermal

- 20+ XCTest unit tests

Features:

- configure()/start()/stop() lifecycle

- trace() async span wrapper

- log() with breadcrumb integration

- breadcrumb() manual timeline markers

- ETag-based config polling

- 30-second batch flush

Platforms: iOS 15+, macOS 13+, watchOS 8+, tvOS 15+
2026-03-03 09:28:11 -08:00
saravanakumardb1
e4c3c7cc13 docs(roadmap): mark Phase 2.1 TypeScript SDK complete
- Mark all 2.1.* items complete with commit 8acb8db

- 21 Vitest tests passing

- Screenshot capture deferred to Phase 2.2+

- Update Current Status section
2026-03-03 09:25:06 -08:00
saravanakumardb1
45dbb789a1 feat(react-native): React Native SDK foundation for NomGap
- package.json with React Native/Expo peer dependencies
- Main index.ts with module exports for all platform services
- Providers and hooks for auth, telemetry, feature flags, kill switch, broadcasts, surveys
2026-03-03 08:40:24 -08:00
saravanakumardb1
8d7d8e4e18 test(admin-web): Rich media E2E tests for broadcasts
- Create broadcasts with single/multiple media items
- Upload media via blob storage
- Validate media URLs
- Reorder and remove media
- User dashboard media display and lightbox
- Video playback and media view tracking
2026-03-03 08:37:34 -08:00
saravanakumardb1
3efdd97057 feat(broadcasts): Rich media support in backend types
- BroadcastMedia interface for image/video/gif/audio
- Extended BroadcastMetrics with media engagement tracking
- Updated CreateBroadcastSchema with media array validation
2026-03-03 08:36:00 -08:00
saravanakumardb1
8acb8db7d7 feat(diagnostics-client): implement Phase 2.1 TypeScript SDK
New package @bytelyst/diagnostics-client with:

- DiagnosticsClient: singleton with polling for active sessions

- BreadcrumbTrail: ring buffer (max 100) for timeline

- NetworkInterceptor: fetch wrapper for HTTP capture

- DeviceState: memory, storage, network collection

- 21 Vitest tests (all passing)
2026-03-03 08:35:00 -08:00
saravanakumardb1
18dd263797 feat(sdk): Push deep link routing for all platforms
- TypeScript: DeepLinkRouter with URL parsing and handler registration
- Swift: BLDeepLinkRouter with iOS URL handling and Logger integration
- Kotlin: DeepLinkRouter with Android Uri parsing and handler mapping
- Common screen constants: broadcasts, surveys, settings, profile, etc.
2026-03-03 08:33:56 -08:00
saravanakumardb1
6e0b6c33c9 test(admin-web): Add Playwright E2E tests for broadcasts and surveys
- Broadcasts: list, create, target, clone, pause/resume, metrics, delete
- Surveys: list, create with NPS/questions, conditional logic, activate/pause
- Integration: navigation, targeting, incentives, export
2026-03-03 08:31:31 -08:00
saravanakumardb1
55a1256d8b docs(swift,kotlin): Add comprehensive SDK READMEs with broadcast and survey examples
- Swift SDK README: Installation, Broadcast/Survey clients, SwiftUI integration, push notifications
- Kotlin SDK README: Gradle setup, Jetpack Compose components, FCM integration
2026-03-03 08:30:26 -08:00
saravanakumardb1
80df7c1c1e docs(packages): Add comprehensive README for broadcast-client and survey-client
- Installation, quick start, API reference
- React integration examples with hooks and providers
- Offline support documentation
- Type definitions and error handling
2026-03-03 08:29:07 -08:00
saravanakumardb1
3842f65c81 docs(broadcasts,surveys): Complete API reference documentation
- OpenAPI-style reference for all admin and public endpoints
- Request/response examples for broadcasts and surveys
- Types reference, error codes, rate limits, webhooks
2026-03-03 08:28:15 -08:00
saravanakumardb1
c4c84ddf16 docs(broadcasts,surveys): Mark iOS/Android integration complete 2026-03-03 08:21:06 -08:00
saravanakumardb1
3b9eb5bd19 docs(diagnostics): mark Phase 1.5 complete, update roadmap status
Phase 1.5 items completed:

- 1.5.1: Wired into server.ts (routes + subscribers)

- 1.5.2: Event bus subscribers for 8 events + email templates

- 1.5.3: Audit logging for all session lifecycle events

- 1.5.4: Rate limiting keys configured

Phase 1 now COMPLETE with 17 diagnostics tests passing

Next: Phase 2 Client SDKs (TS/Swift/Kotlin)
2026-03-03 08:21:01 -08:00
saravanakumardb1
b472f73c94 feat(platform-sdk): Phase 4.2/4.3 - iOS and Android native UI components
- BLInAppMessageUI.swift: Banner + Modal SwiftUI components
- BLSurveyUI.swift: Survey modal with all 9 question types for iOS
- BroadcastUI.kt: Banner + Modal Jetpack Compose components
- SurveyUI.kt: Survey modal with all 9 question types for Android
2026-03-03 08:20:01 -08:00
saravanakumardb1
30583a1768 feat(diagnostics): implement Phase 1.5 — event bus, audit, rate limiting
1.5.2 Event Bus: Add warn to noopLog, update comments

1.5.3 Audit: Already implemented in all handlers

1.5.4 Rate Limiting: Add diagnostics keys (10/hr, 12/min, 100/min)

Delivery Templates: Add 4 diagnostics email templates (ready for wiring)

Tests: Update count to 12 templates (was 8)

All 839 tests passing
2026-03-03 08:19:41 -08:00
saravanakumardb1
5245e4b53b docs(broadcasts,surveys): Mark Phase 4 complete, MVP achieved 2026-03-03 08:07:13 -08:00
saravanakumardb1
4bf18f4d4f feat(platform-service): Phase 4.4 - Push notification wiring (FCM/APNS)
- push-notifications.ts: FCM and APNS delivery services
- Device token registration/management
- sendPushNotification() for bulk delivery
- Automatic token deactivation on APNS 410 responses
2026-03-03 08:05:21 -08:00
saravanakumardb1
6c29df4207 docs(broadcasts,surveys): Mark Phase 3.4 complete - all SDKs done 2026-03-03 07:45:02 -08:00
saravanakumardb1
6027d618b7 feat(kotlin-sdk): Phase 3.4 - Broadcast and Survey clients
- BLBroadcastClient.kt: In-app message fetch, read/dismiss, click tracking, polling
- BLSurveyClient.kt: Survey fetch, start/submit/complete, offline cache, polling
- Full coroutine support with Result<T> return types
2026-03-03 07:44:39 -08:00
saravanakumardb1
b96503dc2d feat(swift-sdk): Phase 3.3 - Broadcast and Survey clients
- BLBroadcastClient.swift: In-app message fetch, read/dismiss, click tracking, polling
- BLSurveyClient.swift: Survey fetch, start/submit/complete, offline cache, polling
2026-03-03 07:40:56 -08:00
saravanakumardb1
4def08d74e docs(broadcasts,surveys): Update roadmap - Phase 3 complete, add Phase 4 2026-03-03 07:37:22 -08:00
saravanakumardb1
307b84c2a2 feat(packages): Phase 3.2 - Create @bytelyst/survey-client package
- package.json: ESM module config
- src/index.ts: Survey client factory with types, validation, offline cache
- tsconfig.json: TypeScript configuration

Includes offline response caching for resilience
2026-03-03 07:36:12 -08:00
saravanakumardb1
c720f1c8de feat(packages): Phase 3.1 - Create @bytelyst/broadcast-client package
- package.json: ESM module config
- src/index.ts: Broadcast client factory with types, hooks
- tsconfig.json: TypeScript configuration
2026-03-03 07:34:39 -08:00
saravanakumardb1
1832ef48a3 docs(broadcasts,surveys): Mark Phase 2 as COMPLETED in roadmap 2026-03-03 07:31:06 -08:00
saravanakumardb1
bd8c6fde43 feat(admin): Phase 2.3 - Survey builder UI
- surveys/[id]/page.tsx: Full survey builder with 9 question types
- Questions tab: Add/edit/remove questions with drag handles
- 9 question types: single/multiple choice, rating, NPS, text, dropdown, scale, ranking
- Dynamic options management for choice-based questions
- Settings tab: Display trigger selection, incentive configuration
- Targeting tab: Platform and segment targeting
2026-03-03 07:30:10 -08:00
saravanakumardb1
dbc9ffd328 feat(admin): Phase 2.2 - Broadcast create/edit wizard 2026-03-03 07:28:56 -08:00
saravanakumardb1
ee3b23711f feat(admin): Phase 2.1 - Broadcast and Survey list pages
- broadcasts/page.tsx: List, filter, delete, send, pause, clone actions
- surveys/page.tsx: List, filter, delete, pause, duplicate, analytics, CSV export
- api.ts: Add all broadcast and survey API functions with types
- sidebar-nav.tsx: Add navigation items with Megaphone and ClipboardList icons
2026-03-03 07:21:37 -08:00
saravanakumardb1
cc9129bc60 docs(feedback): mark all TODOs as completed in roadmap 2026-03-03 07:20:56 -08:00
saravanakumardb1
88fda8cf39 test(feedback): implement TODO-5 and TODO-7 - GDPR test and Azure lifecycle docs
- Add gdpr.test.ts with GDPR deletion compliance tests
- Add Azure lifecycle policy configuration section to roadmap
- Include Azure Portal, CLI, and Terraform examples
- Document 90-day TTL for GDPR compliance
2026-03-03 07:20:23 -08:00
saravanakumardb1
85d9356a19 feat(platform-sdk): implement TODO-2 and TODO-3 - Swift and Kotlin feedback clients
- Add BLFeedbackClient.swift with submitFeedback(), captureAndSubmit(), captureScreen()
- Add BLFeedbackClient.kt with FeedbackParams, DeviceContext, screenshot capture
- Include implementation instructions and error handling
- Mirror API structure between Swift and Kotlin SDKs
2026-03-03 07:18:45 -08:00
saravanakumardb1
698e114b65 docs(feedback): update roadmap with TODO completions 2026-03-03 07:12:04 -08:00
saravanakumardb1
bd19d444f1 test(feedback-client): implement TODO-4 - integration tests for screenshot flow
- Add integration tests for full SAS flow (generate SAS → upload → submit)
- Add test for feedback without screenshot
- Add upload progress tracking test
- Add unit tests for content type validation and size limits
- Skip integration tests if blob storage not configured
2026-03-03 07:11:40 -08:00
saravanakumardb1
921f21164d feat(feedback-client): implement TODO-1 - web screenshot capture
- Add ScreenshotOptions and CaptureResult interfaces
- Implement captureScreenshot() with getDisplayMedia for screen capture
- Implement captureElement() placeholder for DOM element capture
- Implement captureAndSubmit() flow
- Fix getDisplayMedia constraints (remove cursor property)
2026-03-03 07:11:07 -08:00
saravanakumardb1
76569417f1 docs(feedback): update roadmap with second review bug fixes 2026-03-03 07:04:32 -08:00
saravanakumardb1
8614e3f0f1 fix(feedback): address 6 bugs/gaps from systematic review
- Fix search icon positioning (add relative container)
- Fix toast variant from 'destructive' to 'error'
- Remove non-existent screenshotUrl fields from delete endpoint
- Fix misleading blob path comment (blob stays at initial location)
- Add download screenshot function and button
- Add pointer-events-none to search icon
2026-03-03 07:03:27 -08:00
saravanakumardb1
439610cbe5 feat(admin-dashboard): add User Feedback link to sidebar navigation 2026-03-03 07:01:03 -08:00
saravanakumardb1
4839ac2799 docs(feedback): update roadmap with Phase 2.1 and Phase 3 completion status 2026-03-03 07:00:18 -08:00
saravanakumardb1
d2c8931ad0 feat(admin-dashboard): Phase 3.1-3.3 - add feedback management UI with screenshot support
- Add feedback list page with search, type/status/screenshot filters
- Add thumbnail indicator for feedback with screenshots
- Add detail dialog with device context panel
- Add screenshot lightbox viewer
- Add delete screenshot button for GDPR compliance
2026-03-03 06:59:27 -08:00
saravanakumardb1
b261cda1cd feat(feedback-client): Phase 2.1 - create @bytelyst/feedback-client TypeScript SDK 2026-03-03 00:03:03 -08:00
saravanakumardb1
3ded5ad751 fix(diagnostics,test): fix flaky test and test configuration
- Add DB_PROVIDER=memory to vitest config for diagnostics tests
- Fix flaky timestamp comparison in 'should update a session' test
  - Add 10ms delay between create and update
  - Use toBeGreaterThanOrEqual instead of strict inequality
- All 17 diagnostics tests now pass
2026-03-03 00:01:20 -08:00
saravanakumardb1
fdaffdb13c docs(feedback): fix 8 bugs/gaps identified in systematic review
- Fix inconsistent screenshotUrl fields (removed, SAS generated on-demand)
- Fix blob path pattern to match feedbackScreenshots container
- Clarify flow: direct upload to final container (no temp/move)
- Add rate limiting specs to endpoint table
- Clarify access control: users submit but cannot view (security)
- Remove sas.ts from appendix (not created)
- Align size limits to 5MB consistently
- Add missing screenshotContentType and screenshotSizeBytes
2026-03-03 00:00:14 -08:00
saravanakumardb1
0996534fb4 docs(feedback): update roadmap with Phase 1 completion and commit links 2026-03-02 23:57:48 -08:00
saravanakumardb1
6f9b799cc4 fix(jobs): add missing 'warn' method to logger type in runner.ts
The JobContext type requires log.warn but runner.ts loggers only
defined info/error. This caused TypeScript errors when passing log
to job handlers.

- Add warn: (...a: unknown[]) => void to startRunner log param
- Add warn: (...a: unknown[]) => void to tick log param
- Add warn: (...a: unknown[]) => void to executeJob log param
2026-03-02 23:57:21 -08:00
saravanakumardb1
e712968d3d test(feedback): Phase 1.5 - add screenshot and deviceContext schema tests 2026-03-02 23:56:59 -08:00
saravanakumardb1
ecb9f67c99 fix(broadcasts): Fix percentage rollout bucketing logic
- Use userId only as seed instead of userId + percentage
- Prevents users from being re-bucketed when rollout % increases
- Ensures deterministic assignment for phased rollouts
2026-03-02 23:56:42 -08:00
saravanakumardb1
e4681fbbb2 fix(broadcasts): Fix metrics increment bug in updateBroadcastMetrics
- Change from merge pattern to explicit increment pattern
- Each metric field is properly incremented instead of overwritten
- Prevents race condition data loss
2026-03-02 23:56:09 -08:00