Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Watch mode provided no feedback on startup and silently swallowed error codes, making it impossible to debug failures during CSS compilation.

Changes

  • Capture return codes: passthru() now captures exit codes and displays error messages on non-zero returns
  • Startup feedback: Added informative messages showing theme type and watched directory before entering watch loop
  • Consistent error handling: Applied across all three theme builders (HyvaThemes, TailwindCSS, MagentoStandard)

Example

Before:

passthru('npm run watch');  // Errors invisible, no feedback

After:

$io->info('Starting watch mode for Hyvä theme...');
$io->text("Watching directory: $tailwindPath");

$returnCode = 0;
passthru('npm run watch', $returnCode);

if ($returnCode !== 0) {
    $io->error("Watch process exited with error code: $returnCode");
    return false;
}

Real-time npm/grunt output continues to stream through passthru() for live compilation feedback.

Original prompt

This section details on the original issue you should resolve

<issue_title>Feature-Request: Verbose Output in Watcher task</issue_title>
<issue_description>Magento 2 Version
latest

Hyvä Version
latest

Is your feature request related to a problem? Please describe.
i get no output if css watcher get an error

Describe the solution you'd like
Get an output during watch task is active
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@dermatz dermatz marked this pull request as ready for review December 12, 2025 11:17
Copilot AI review requested due to automatic review settings December 12, 2025 11:17
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.

Copilot wasn't able to review any files in this pull request.


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

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add verbose output for watcher task errors Add verbose output and error reporting to watch task Dec 12, 2025
Copilot AI requested a review from dermatz December 12, 2025 11:21
@dermatz dermatz closed this Dec 18, 2025
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.

Feature-Request: Verbose Output in Watcher task

2 participants