Search before asking
Motivation
Users can currently combine incompatible CLI flags without receiving feedback, leading to confusion:
--fullscreen with window sizing options (--width, --height, --min-width, --min-height) - conflicting approaches to fill the window
--fullscreen with --maximize - two different window fill modes
--start-to-tray with --maximize - can't maximize a window that starts hidden
These combinations are silently ignored or produce unexpected behavior. Early validation with clear error messages would improve user experience.
Solution
Implement validateMutuallyExclusiveFlags() validation function that:
Implementation includes:
- New validation function in
bin/utils/validate.ts
- Integration in
bin/cli.ts after config merge
- 23 comprehensive test cases covering all scenarios
Alternatives
-
Silent ignore with warning - Considered warning users but still ignoring the conflicting flag. Rejected because it's less clear than hard validation.
-
Config-file only validation - Could validate only in config files, not CLI. Rejected because CLI users deserve the same protection.
-
Runtime error - Could let the app start and error at runtime. Rejected because early validation in input phase is clearer and prevents wasted build time.
Anything else?
This follows the established pattern from recent merged PRs:
Test coverage: 23 new tests + 516 existing tests all passing (519 total, 0 regressions)
Exit codes and error format are compatible with --json machine mode.
Are you willing to submit a PR?
Search before asking
Motivation
Users can currently combine incompatible CLI flags without receiving feedback, leading to confusion:
--fullscreenwith window sizing options (--width,--height,--min-width,--min-height) - conflicting approaches to fill the window--fullscreenwith--maximize- two different window fill modes--start-to-traywith--maximize- can't maximize a window that starts hiddenThese combinations are silently ignored or produce unexpected behavior. Early validation with clear error messages would improve user experience.
Solution
Implement
validateMutuallyExclusiveFlags()validation function that:--jsonmachine modeImplementation includes:
bin/utils/validate.tsbin/cli.tsafter config mergeAlternatives
Silent ignore with warning - Considered warning users but still ignoring the conflicting flag. Rejected because it's less clear than hard validation.
Config-file only validation - Could validate only in config files, not CLI. Rejected because CLI users deserve the same protection.
Runtime error - Could let the app start and error at runtime. Rejected because early validation in input phase is clearer and prevents wasted build time.
Anything else?
This follows the established pattern from recent merged PRs:
Test coverage: 23 new tests + 516 existing tests all passing (519 total, 0 regressions)
Exit codes and error format are compatible with
--jsonmachine mode.Are you willing to submit a PR?