Add persisted mobile draft queue, telemetry export, and release enforcement#7
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (20)
📝 WalkthroughWalkthroughThis pull request adds a comprehensive production-oriented Expo mobile client application called "PitchCheck," featuring a React Native UI for configuring runtime settings, scoring pitches, health probing, secure credential storage, request queuing with persistence, and runtime telemetry visualization. The implementation includes supporting utilities for network operations, report normalization, and event logging, alongside configuration files, documentation, and tests. Changes
Sequence Diagram(s)sequenceDiagram
participant User as Mobile App UI
participant Runtime as Runtime Layer
participant Network as Network Utils
participant Remote as Runtime Service<br/>(PitchServer/Vast AI)
participant Store as SecureStore
User->>Runtime: loadSettings()
Runtime->>Store: Read persisted RuntimeSettings
Store-->>Runtime: Settings (or defaults)
Runtime-->>User: Settings loaded
User->>Runtime: scorePitch(message, persona, platform)
Runtime->>Network: normalizeBaseUrl()
Network-->>Runtime: Valid URL
Runtime->>Network: scoreEndpoints(baseUrl, mode)
Network-->>Runtime: Endpoint list [url1, url2, ...]
loop Retry endpoints until success
Runtime->>Network: fetchWithTimeout(endpoint, {headers, body}, 18s)
Network->>Remote: POST /score
alt Success (200)
Remote-->>Network: {persuasion_score, verdict, ...}
Network-->>Runtime: Response
Runtime->>Runtime: normalizePitchScoreReport(payload)
Runtime-->>User: PitchScoreReport
else Failure
Remote-->>Network: Error / Timeout
Network-->>Runtime: Error
end
end
Runtime->>Store: savePendingDraft() if queued
Runtime->>Runtime: logRuntimeEvent(score_complete)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Implements the remaining robustness items end-to-end:
What changed
Pending draft queue persistence (SecureStore)
mobile/src/draft-queue.tsto load/save/clear pending score draftsTelemetry export panel capability
Release profile security enforcement
mobile/app.config.tsnow computes build profile andstrictTransportRequiredNSAllowsArbitraryLoads: false)Docs/config updates
mobile/README.mdupdated for:.env.exampleincludes release channel keyexpo-constantsdependency for reading Expo config extras at runtimeValidation
npm run lint✅npm test✅ (9 files, 38 tests)Codex Task
Summary by CodeRabbit
New Features
Tests