Skip to content

Comments

Add debounced output for HTML validation#179

Merged
fulldecent merged 1 commit intomainfrom
feature/debounce-html-validate-output
Dec 4, 2025
Merged

Add debounced output for HTML validation#179
fulldecent merged 1 commit intomainfrom
feature/debounce-html-validate-output

Conversation

@fulldecent
Copy link
Owner

  • Success messages now grouped and shown once every 2 seconds
  • Displays the most recent file that passed validation
  • Reduces output from one line per file to periodic summaries
  • Error messages still shown immediately for each failing file
  • Makes output more readable, especially for AI assistants

Closes #177

- Success messages now grouped and shown once every 2 seconds
- Displays the most recent file that passed validation
- Reduces output from one line per file to periodic summaries
- Error messages still shown immediately for each failing file
- Makes output more readable, especially for AI assistants

Closes #177
Copilot AI review requested due to automatic review settings December 4, 2025 16:44
@fulldecent fulldecent merged commit d5e3e60 into main Dec 4, 2025
4 of 5 checks passed
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 debounced output for HTML validation success messages to improve readability, especially when validating many files. Instead of printing a success message for every valid file, success messages are now grouped and displayed periodically (every 2 seconds), showing the most recent file that passed validation. Error messages continue to be displayed immediately.

  • Adds debouncing logic with state tracking for successful validations
  • Implements periodic success message output (every 2 seconds)
  • Ensures any pending success messages are reported when validation completes

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

lastSuccessFilePath = result.filePath;

if (now - lastSuccessReportTime >= DEBOUNCE_INTERVAL) {
console.log(`✅ (${completedTasks} of ${targets.length}) ${relativeFilePath}`);
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

When debouncing is triggered, the displayed file path should be from lastSuccessFilePath (the most recent successful file), not relativeFilePath (the current message's file). This line should use path.relative(process.cwd(), lastSuccessFilePath) to match the intended behavior described in the PR.

Suggested change
console.log(`✅ (${completedTasks} of ${targets.length}) ${relativeFilePath}`);
console.log(`✅ (${completedTasks} of ${targets.length}) ${path.relative(process.cwd(), lastSuccessFilePath)}`);

Copilot uses AI. Check for mistakes.
@fulldecent fulldecent deleted the feature/debounce-html-validate-output branch December 8, 2025 17:08
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.

new output: show errors and one message every 2 sec

1 participant