Skip to content

Conversation

@andrew-codes
Copy link
Owner

@andrew-codes andrew-codes commented Nov 9, 2025

Provide feedback on errors to users without needing to read logs. Includes authentication errors and sync errors.

Fixes: #847

@github-project-automation github-project-automation bot moved this to Backlog in Playnite-Web Nov 9, 2025
@andrew-codes andrew-codes changed the base branch from main to next November 9, 2025 22:02
@andrew-codes andrew-codes changed the base branch from next to main November 9, 2025 22:02
@andrew-codes andrew-codes changed the base branch from main to next November 9, 2025 22:03
@andrew-codes andrew-codes changed the title fix: new cover art doesn't require app restart feat: error notifications in Playnite Nov 9, 2025
@andrew-codes andrew-codes requested a review from Copilot November 9, 2025 22:09
@andrew-codes andrew-codes self-assigned this Nov 9, 2025
@andrew-codes andrew-codes moved this from Backlog to Review 🎥 in Playnite-Web Nov 9, 2025
Repository owner deleted a comment from chatgpt-codex-connector bot Nov 9, 2025
Copy link

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 enhances error handling in the Playnite Web plugin by adding user-facing notifications for common error scenarios during library synchronization and authentication. The changes ensure that users are informed when operations fail through the Playnite notification system.

Key changes:

  • Added IPlayniteAPI parameter to PublishLibraryGraphQL to enable notification display
  • Implemented error notifications for library sync failures, authentication failures, and connection errors
  • Wrapped sync operations in try-catch blocks to handle exceptions gracefully

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
PublishLibraryGraphQL.cs Added IPlayniteAPI field and error notifications for task faults and GraphQL errors during library sync
PlayniteWeb.cs Added try-catch wrapper in SyncLibraryFromMenu, error notifications for authentication and connection failures, and updated constructor call to pass PlayniteAPI instance

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +284 to +293
catch (Exception e)
{
var errorMessage = e.InnerException?.Message ?? e.Message;
logger.Error($"Error occurred while syncing library: {errorMessage}");
PlayniteApi.Notifications.Add(new NotificationMessage(
"PlayniteWebSyncError",
$"Playnite Web: Library sync failed. {errorMessage}",
NotificationType.Error
));
}
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

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

Generic catch clause.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Nov 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.52%. Comparing base (13e325d) to head (0ff0273).

Additional details and impacted files
@@             Coverage Diff             @@
##             next     #895       +/-   ##
===========================================
+ Coverage   32.68%   81.52%   +48.84%     
===========================================
  Files          10      135      +125     
  Lines         205     1927     +1722     
  Branches       45      425      +380     
===========================================
+ Hits           67     1571     +1504     
- Misses        137      350      +213     
- Partials        1        6        +5     
Flag Coverage Δ
component-tests 32.68% <ø> (ø)
e2e-tests 81.51% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andrew-codes andrew-codes requested a review from Copilot November 10, 2025 00:51
Copy link

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +174 to +182
catch (Exception ex)
{
logger.Error(ex, "Error occurred while starting MQTT connection.");
PlayniteApi.Notifications.Add(new NotificationMessage(
"PlayniteWebMqttConnectionError",
$"Playnite Web (MQTT): Failed to establish connection. {ex.Message}",
NotificationType.Error
));
}
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Generic catch clause.

Copilot uses AI. Check for mistakes.
@andrew-codes andrew-codes force-pushed the claude/add-auth-sync-notifications-011CUy2F57j8noeFAivEzABG branch from 0ff0273 to ca9dcbf Compare December 21, 2025 13:37
claude and others added 4 commits December 21, 2025 08:38
Implements notifications in Playnite's notification pane for:
- Authentication failures when starting the plugin or verifying settings
- Connection failures when establishing server connection
- Library sync failures (both from GraphQL errors and task exceptions)

The notifications use clear error messages that communicate the nature
of each failure to help users diagnose issues with the plugin.

Resolves #847
…ailures

Implements notifications in Playnite's notification pane for MQTT plugin:
- Authentication failures when connecting to MQTT broker
- Connection failures when establishing MQTT connection

The notifications use clear error messages that communicate the nature
of each failure to help users diagnose issues with the MQTT plugin.

Related to #847
@andrew-codes andrew-codes force-pushed the claude/add-auth-sync-notifications-011CUy2F57j8noeFAivEzABG branch from ca9dcbf to b6a96a6 Compare December 21, 2025 13:38
@andrew-codes andrew-codes changed the base branch from next to main December 21, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review 🎥

Development

Successfully merging this pull request may close these issues.

3 participants