Skip to content

fix(cli): show the platform's default watch settle time - #563

Merged
KnifeLemon merged 1 commit into
KnifeLemon:mainfrom
Blackspirits:codex/cli-watch-help-default
Oct 25, 2026
Merged

KnifeLemon merged 1 commit into
KnifeLemon:mainfrom
Blackspirits:codex/cli-watch-help-default

Conversation

@Blackspirits

Copy link
Copy Markdown
Contributor

What does this change?

filee watch --help always says the default settle time is 2 seconds, but the watcher actually waits 5 seconds on Linux and macOS. Read the value from FolderWatcher.DefaultSettleTime so the help matches the running platform, using invariant numeric formatting.

This is the small standalone fix suggested in #552. It does not change watch behavior or add CLI localization.

Type of change

  • Bug fix
  • New feature or improvement
  • New format or engine
  • Translation
  • Documentation
  • Build, CI or dependencies

How was it tested?

  • Release CLI/test build: no errors. The clean dependency build reported three existing engine warnings; the final rebuild reported no warnings.
  • Complete CLI suite with an isolated FILEE_DATA_DIR: 30 passed, 0 failed, 1 skipped (existing case-sensitive-volume requirement).
  • Three new cases cover help watch, watch --help and watch -h, checking the platform default and that help never initializes engines.
  • All three forms also passed in the actual Windows executable, printing default 2, returning 0 and leaving the isolated profile absent.
  • Formatting verification for both changed files and git diff --check pass. CI is pending for Linux/macOS execution and the full repository checks.
dotnet restore Filee.slnx
dotnet build tests/Filee.Cli.Tests/Filee.Cli.Tests.csproj -c Release --no-restore -m:1 -p:UseSharedCompilation=false
$env:FILEE_DATA_DIR = Join-Path ([System.IO.Path]::GetTempPath()) ('filee-cli-check-' + [guid]::NewGuid().ToString('N'))
dotnet test tests/Filee.Cli.Tests -c Release --no-build --no-restore
dotnet format Filee.slnx --verify-no-changes --no-restore --severity warn --include src/Filee.Cli/Help.cs tests/Filee.Cli.Tests/HelpTests.cs
git diff --check

Without FILEE_DATA_DIR isolation, an existing JPEG XR listing assertion failed on this machine. The same test fails on unmodified main 1bf94e71, and the actual formats jxr output is identical before and after this patch. Isolating the engine download directory resolves it; no existing test or skip was changed.

Checklist

  • Only the watch help and its regression tests change.
  • No new UI strings, dependencies or binaries.

No graphical interface changes.

Copilot AI balanced review requested due to automatic review settings October 25, 2026 06:33
@github-actions github-actions Bot added the bug Something isn't working label Oct 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The narrow implementation matches the stated purpose, includes focused regression coverage, and has no identified blocking issues.

No open issues 🎉

What changed in this PR

This focused fix makes CLI watch help report the watcher’s actual platform default settle time without changing watch behavior or adding localization.

Changes:

  • Read the default from FolderWatcher.DefaultSettleTime using invariant numeric formatting.
  • Add regression coverage for all three watch-help forms, including checks that help does not initialize engines.
File Description
tests/​Filee.Cli.Tests/​HelpTests.cs Tests the platform default and engine-free help handling.
src/​Filee.Cli/​Help.cs Replaces the hardcoded settle time with the watcher’s default.

Review effort: Balanced

@KnifeLemon KnifeLemon left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks @Blackspirits! This is exactly the small standalone fix we hoped for from #552: the help now reads the same FolderWatcher.DefaultSettleTime the watcher falls back to, so Linux and macOS show 5 and Windows shows 2, and the tests also make sure help never initializes engines. It can be merged once CI is green.

@KnifeLemon
KnifeLemon merged commit 794236e into KnifeLemon:main Oct 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants