Skip to content

Conversation

@DanTup
Copy link
Member

@DanTup DanTup commented Nov 13, 2025

This is to help gather more information about the issue in #5793, that the timeout added for trying to track down a Windows-only issue seems to be record a lot of timeouts on macOS.

@DanTup DanTup added this to the v3.124.0 milestone Nov 13, 2025
@DanTup DanTup added is enhancement in flutter Relates to running Flutter apps on mac labels Nov 13, 2025
@DanTup DanTup requested a review from Copilot November 13, 2025 12:17
@DanTup
Copy link
Member Author

DanTup commented Nov 13, 2025

@codex review
/gemini review

@gemini-code-assist
Copy link

Thank you for the pull request, DanTup! I've reviewed the changes and they look good.

This PR introduces a new mechanism to log and notify pre-release macOS users about Flutter daemon timeouts. This is a valuable addition for diagnosing the issue described in #5793.

Here's a summary of the key changes:

  • Enhanced Timeout Logging: The logErrorFlutterDaemonTimeout function now accepts the requestMethod that timed out, providing more granular data for analytics.
  • Improved Prompt Severity Handling: The promptToReloadExtension function has been refactored to use a severity enum (ERROR or WARNING) instead of a boolean useError. This improves clarity and allows for more flexible message types.
  • macOS-Specific Timeout Notification: Pre-release users on macOS will now receive a warning notification when a Flutter daemon request times out, directing them to a relevant GitHub issue for reporting. This directly addresses the goal of gathering more data for macOS-specific timeouts.
  • New Restart Reason: A FlutterDaemonTimeout reason has been added to the ExtensionRestartReason enum for better tracking of these specific events.

These changes are well-implemented and will significantly help in understanding and resolving the daemon timeout issues on macOS. The refactoring of the prompt severity is also a good general improvement for the codebase.

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 adds notifications for Flutter daemon timeouts on macOS for pre-release users to help gather diagnostic information about issue #5793. The timeout mechanism was originally added to track down a Windows-only issue but appears to be recording many timeouts on macOS.

Key changes:

  • Enhanced timeout logging with request method names and daemon uptime information
  • Added user-facing warning notifications for daemon timeouts (macOS pre-release/dev only)
  • Refactored promptToReloadExtension parameter from boolean useError to enum-like severity for more granular notification types

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/shared/constants.ts Added FlutterDaemonTimeout enum value for tracking timeout-related extension restarts
src/extension/utils/misc.ts Updated promptToReloadExtension call to use new severity parameter instead of useError
src/extension/utils.ts Refactored promptToReloadExtension to accept severity with ERROR/WARNING/INFO levels instead of boolean useError
src/extension/flutter/flutter_daemon.ts Added timeout notifications for macOS pre-release users with enhanced logging including request method and daemon uptime
src/extension/analytics.ts Enhanced analytics logging to include the specific request method that timed out
src/extension/analysis/analyzer.ts Updated calls to promptToReloadExtension to use new severity parameter

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

This is to help gather more information about the issue in #5793, that the timeout added for trying to track down a Windows-only issue seems to be record a lot of timeouts on macOS.
@DanTup DanTup force-pushed the add-prompt-for-daemon-timeout branch from f238920 to 7a7a47a Compare November 13, 2025 12:21
@DanTup DanTup merged commit 9e0e042 into master Nov 13, 2025
3 checks passed
@DanTup DanTup deleted the add-prompt-for-daemon-timeout branch November 13, 2025 12:22
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

"Error_FlutterDaemonTimeout": { },

P2 Badge Document new daemon-timeout telemetry payload

The commit now logs the timed-out daemon request name by passing it through Analytics.logErrorFlutterDaemonTimeout() into the data field, but the Error_FlutterDaemonTimeout entry in telemetry.json still has an empty schema. Telemetry fields must be declared with their classification/purpose before they can be sent, so this event will now emit undocumented data and will fail the telemetry-compliance checks. Please add a data entry (similar to the other events above it) describing the request name.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in flutter Relates to running Flutter apps is enhancement on mac

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants