Skip to content

Add error reporting UI for provider failures#17

Merged
kargnas merged 5 commits intomainfrom
feat/track-error
Feb 1, 2026
Merged

Add error reporting UI for provider failures#17
kargnas merged 5 commits intomainfrom
feat/track-error

Conversation

@kargnas
Copy link
Member

@kargnas kargnas commented Feb 1, 2026

Summary

  • Add user-facing error details UI when provider fetch fails
  • Enable users to report issues on GitHub with pre-filled templates
  • Protect sensitive information with optional log copying

Changes

ProviderManager

  • Add FetchAllResult struct that returns both successful results and errors
  • Modified fetchAll() to track and return error messages from failed providers

StatusBarController

  • Add "View Error Details..." menu item (⌘E shortcut)
  • Menu item only visible when errors occur (positioned below Quit with separator)
  • Implement error log alert with scrollable text view
  • Add three action buttons:
    • Copy & Report on GitHub: Copies log to clipboard and opens GitHub Issues with pre-filled template
    • Copy Log Only: Copies log to clipboard for manual review
    • Close: Dismiss without action

ProviderViewModel

  • Update to use FetchAllResult instead of raw results dictionary
  • Track error state for UI updates

Features

✅ 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

  • Tested with Antigravity and Gemini CLI provider failures
  • Verified menu item visibility toggles correctly
  • Confirmed clipboard copy and GitHub URL opening work as expected

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>
Copy link
Contributor

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 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 FetchAllResult struct 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>
@kargnas kargnas merged commit 9ba26c9 into main Feb 1, 2026
12 checks passed
@kargnas kargnas deleted the feat/track-error branch February 1, 2026 15:56
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