Skip to content

feat: mirror analytics events to stdout and OSLog#225

Closed
vegerot wants to merge 3 commits intoJerryZLiu:mainfrom
vegerot:pr225
Closed

feat: mirror analytics events to stdout and OSLog#225
vegerot wants to merge 3 commits intoJerryZLiu:mainfrom
vegerot:pr225

Conversation

@vegerot
Copy link
Copy Markdown
Contributor

@vegerot vegerot commented Mar 4, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 + logLocal helpers in AnalyticsService.swift to dual-log every analytics event to PostHog, print(), and OSLog.
  • Updates LLM prompt templates in GeminiPromptPreferences.swift and ChatCLIPromptPreferences.swift to use a colon after the end-time in the timestamp format (HH:MM AM/PM:).
  • Adds 1/2 / 2/2 step-number prefixes to the retry progress labels in RetryCoordinator.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.

vegerot and others added 3 commits March 4, 2026 18:22
- 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.
@vegerot vegerot changed the title feat: mirror analytics events to stdout and OSLog feat: use structured output to improve responses Mar 5, 2026
@vegerot vegerot changed the title feat: use structured output to improve responses feat: mirror analytics events to stdout and OSLog Mar 5, 2026
@vegerot vegerot closed this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants