Add error reporting UI for provider failures#17
Merged
Conversation
Add user-facing error reporting feature that displays provider fetch errors and allows users to report issues on GitHub. Changes: - ProviderManager: Return FetchAllResult with both results and errors - StatusBarController: Add 'View Error Details...' menu item (⌘E) - StatusBarController: Implement error log alert with copy and GitHub report options - ProviderViewModel: Update to use FetchAllResult Features: - Error details alert shows provider-specific error messages - Copy & Report on GitHub: Copies log and opens pre-filled issue template - Copy Log Only: Allows users to copy logs without sensitive information - Menu item only visible when errors occur > Co-authored-by: Claude (Sisyphus, oMo) <no-reply@claude.ai> > Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Setup automated code quality checks for all branches and commits. Changes: - GitHub Actions: Remove branch restrictions from lint workflow - Now runs on all pushes and PRs (not just main/develop) - Pre-commit Hook: Add SwiftLint check before commits - Auto-installed via scripts/setup-git-hooks.sh - Prevents committing code with lint violations - README: Add development setup instructions for linting Benefits: - Catches lint violations early (before push) - Consistent code quality across all branches - Easy onboarding for new contributors > Co-authored-by: Claude (Sisyphus, oMo) <no-reply@claude.ai> > Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Optimize lint workflow to check only modified files in pull requests. Changes: - PR: Lint only changed Swift files with --strict mode - Push: Lint all files without --strict (to avoid failing on existing warnings) This allows new code to be strictly checked while not blocking on pre-existing issues. > Co-authored-by: Claude (Sisyphus, oMo) <no-reply@claude.ai> > Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive error reporting system to help users report provider fetch failures. When providers fail to fetch data, users can now view detailed error logs, copy them to their clipboard, and optionally report issues on GitHub with pre-filled templates including environment information.
Changes:
- Added
FetchAllResultstruct to track both successful results and error messages from provider fetches - Implemented "View Error Details..." menu item (⌘E) with visibility control based on error state
- Created error log display UI with scrollable text view and three action buttons (Copy & Report, Copy Only, Close)
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| CopilotMonitor/CopilotMonitor/Services/ProviderManager.swift | Introduces FetchAllResult struct and modifies fetchAll() to track and return both successful results and error messages; adds legacy compatibility method |
| CopilotMonitor/CopilotMonitor/ViewModels/ProviderViewModel.swift | Updates to consume FetchAllResult and track error state for UI updates |
| CopilotMonitor/CopilotMonitor/App/StatusBarController.swift | Adds error details menu item, error log alert UI, clipboard operations, and GitHub issue template generation with privacy-conscious design |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add shellcheck disable comment for intentional word splitting. The CHANGED_FILES variable needs to be unquoted to pass multiple file paths to swiftlint as separate arguments. > Co-authored-by: Claude (Sisyphus, oMo) <no-reply@claude.ai> > Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Apply 3 out of 5 Copilot suggestions: 1. Remove unused withLog parameter from openGitHubNewIssue() - Parameter was accepted but never used in the function body - Log is already copied to clipboard, user pastes manually for privacy 2. Add .copilot exclusion to error filter for consistency - Results filter excludes .copilot (line 648) - Error filter now also excludes .copilot (line 665) - Prevents showing errors for providers not in results list 3. Use DateFormatter for consistent error log timestamps - Changed from verbose Date() to "yyyy-MM-dd HH:mm zzz" format - Matches date formatting used elsewhere in codebase (line 1531) Not applied: - Menu position: User explicitly requested placement below Quit - Missing tests: Acknowledged as tech debt for follow-up > Co-authored-by: Claude (Sisyphus, oMo) <no-reply@claude.ai> > Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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.
Summary
Changes
ProviderManager
FetchAllResultstruct that returns both successful results and errorsfetchAll()to track and return error messages from failed providersStatusBarController
ProviderViewModel
FetchAllResultinstead of raw results dictionaryFeatures
✅ Error details show provider-specific error messages
✅ User can choose whether to include logs when reporting (privacy protection)
✅ GitHub issue template includes app version and macOS version
✅ Menu item automatically hidden when no errors
Testing