Skip to content

Increase saving debounce interval (and make it configurable)#36

Open
konard wants to merge 3 commits intomainfrom
issue-33-79f3df58
Open

Increase saving debounce interval (and make it configurable)#36
konard wants to merge 3 commits intomainfrom
issue-33-79f3df58

Conversation

@konard
Copy link
Contributor

@konard konard commented Sep 10, 2025

Summary

This PR implements a configurable debounce delay for watch mode, addressing issue #33.

Changes Made

  • Increased default debounce delay from 2 seconds to 5 seconds for better stability
  • Added --debounce-delay option to configure the delay in milliseconds
  • Updated help text to clarify the difference between debounce (5s) and throttle (30s)
  • Added comprehensive test coverage with both unit and integration tests
  • Added usage example demonstrating custom debounce delay configuration

Usage

# Use default 5-second debounce delay
claude-profiles --watch work

# Use custom 10-second debounce delay
claude-profiles --watch work --debounce-delay 10000

# Use shorter 1-second debounce delay for rapid changes
claude-profiles --watch work --debounce-delay 1000

Technical Details

  • The debounce delay is now configurable via the --debounce-delay option
  • Default increased from 2000ms to 5000ms to reduce unnecessary saves
  • The option integrates cleanly with existing watch mode functionality
  • All existing tests continue to pass
  • Added comprehensive test coverage for the new functionality

Test Coverage

  • Added test-debounce-delay.sh for basic functionality tests
  • Added test-debounce-integration.mjs for integration testing
  • Verified existing functionality remains intact
  • Tested help output and option validation

Test plan

  • Run existing test suite to ensure no regressions
  • Test help output includes new option and examples
  • Test default behavior uses 5-second debounce
  • Test custom debounce delay values work correctly
  • Test option validation for numeric values

Fixes #33

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #33
@konard konard self-assigned this Sep 10, 2025
konard and others added 2 commits September 10, 2025 20:40
- Increased default debounce delay from 2s to 5s for better stability
- Added --debounce-delay option to configure delay in milliseconds
- Updated help text to reflect new default and show throttle vs debounce
- Added comprehensive test coverage for new functionality
- Added usage example for custom debounce delay configuration

Addresses issue #33: "Increase saving debounce interval (and make it configurable)"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Increase saving debounce interval (and make it configurable) Increase saving debounce interval (and make it configurable) Sep 10, 2025
@konard konard marked this pull request as ready for review September 10, 2025 17:44
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.

Increase saving debounce interval (and make it configurable)

1 participant