Conversation
- Replace UsageUpdates channel with callback-based subscription - Support multiple subscribers for protection pause/resume events - Add OnUsageUpdated, OnLLMDailySummaryReady, OnProtectionPause, and OnProtectionResumed methods - Update main.go to use new event subscription pattern - Relocate config/log directory to ~/.focusd
- Migrated GenAI client initialization to usage service - Implemented subscriber pattern for protection and usage events - Added specialized Slack classifier and application prompt templates - Introduced internal/settings package for centralized configuration - Updated main.go to use refactored services and settings
- Renamed classifier_llm_slack.go to classifier_llm_custom.go - Simplified classifySlackActivity by inlining instructions and removing redundant normalization - Cleaned up unused imports
- Moved all inline LLM prompts for websites and apps to .txt asset files - Implemented and asset embedding infrastructure - Introduced for safety overrides on sensitive pages - Refactored and to use asset-based prompts - Added tests for critical page classifier
…pattern and better application tracking
…rness - Refactored service_usage_test.go to use a new test harness. - Simplified usageDriver logic by removing it and using direct DB access in tests. - Updated utils.go with parseURLNormalized for better URL handling. - Refined ServiceUsage and usageSession logic. - Added harness_test.go for shared test setup.
…ation modes - Modified Whitelist and CalculateTerminationMode to globally allow whitelisted hostnames across all browsers. - Removed TerminationModePaused, using TerminationModeAllow with TerminationModeSourcePaused instead. - Fixed pagination assertions in insights_basic_test.go. - Expanded protection tests in service_usage_test.go and added test harness helpers.
- Fixed nil pointer panic in Whitelist by checking if parseURLNormalized returns a valid result. - Added fallback hostname parsing for strings that are not full URLs (e.g., example.com). - Restored strings import in protection.go. - Fixed slice out-of-bounds panic in TestGetUsageList_TerminationModeFilter.
- Updated TitleChanged to return ApplicationUsage and handle active pauses/whitelists correctly.\n- Added ManualResume event and method to Protection.\n- Updated test harness to support new assertions.\n- Added explicit native blocking calls for apps and URLs in main.go.\n- Added logging for blocking.\n- Fixed OnUsageUpdated to handle pointers correctly in both backend and frontend.
- Removed AppBlocker callback mechanism from usage.Service.\n- Simplified usage.NewService in main.go and tests.\n- Cleaned up usageHarness and tests by removing blocker event assertions.\n- Updated usage:update event registration to use pointer type.
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.
No description provided.