feat: mirror analytics events to stdout and OSLog#225
Closed
vegerot wants to merge 3 commits intoJerryZLiu:mainfrom
Closed
feat: mirror analytics events to stdout and OSLog#225vegerot wants to merge 3 commits intoJerryZLiu:mainfrom
vegerot wants to merge 3 commits intoJerryZLiu:mainfrom
Conversation
This was referenced Mar 4, 2026
There was a problem hiding this comment.
Pull request overview
This PR mirrors every AnalyticsService event to stdout and Apple Unified Logging (OSLog) in addition to the existing PostHog delivery. It also adds step-number prefixes to the retry progress labels and updates the colon-separated timestamp format in LLM prompt templates across two provider files.
Changes:
- Introduces
captureToPostHogAndLocal+logLocalhelpers inAnalyticsService.swiftto dual-log every analytics event to PostHog,print(), andOSLog. - Updates LLM prompt templates in
GeminiPromptPreferences.swiftandChatCLIPromptPreferences.swiftto use a colon after the end-time in the timestamp format (HH:MM AM/PM:). - Adds
1/2/2/2step-number prefixes to the retry progress labels inRetryCoordinator.swift.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
Dayflow/Dayflow/System/AnalyticsService.swift |
Adds OSLog import, localLogger, captureToPostHogAndLocal, logLocal, jsonString, and truncate helpers; migrates most event captures to the new helper |
Dayflow/Dayflow/Core/AI/ChatCLIPromptPreferences.swift |
Updates timestamp format to include colon after end-time in examples |
Dayflow/Dayflow/Core/AI/GeminiPromptPreferences.swift |
Updates timestamp format to include colon after end-time in examples |
Dayflow/Dayflow/Views/UI/RetryCoordinator.swift |
Prefixes step labels with 1/2 and 2/2 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Extract shared prompt templates into LLMPromptTemplates (GeminiPromptPreferences.swift) - Add VideoPromptPreferences/VideoPromptOverrides/VideoPromptSections types, replacing GeminiPromptPreferences/GeminiPromptOverrides/GeminiPromptSections - Centralize transcript JSON decoding and observation conversion in LLMTranscriptUtilities (TimeParsing.swift) for reuse across providers - Refactor GeminiDirectProvider to use LLMPromptTemplates and LLMTranscriptUtilities - Refactor TestConnectionView to accept a provider parameter with finishFailure/finishSuccess helpers for clean multi-provider support - Fix OnboardingLLMSelectionView card-width calculation to be dynamic based on card count rather than hard-coded divisor of 3 - Update SettingsProvidersTabView and ProvidersSettingsViewModel to use new VideoPrompt* types Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ensures every AnalyticsService event is sent to PostHog, printed to stdout, and emitted via Apple Unified Logging.
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.
Stack created with Sapling. Best reviewed with ReviewStack.