onWatch icon indicating copy to clipboard operation
onWatch copied to clipboard

feat(windows/anthropic): fix service & track design/extra usage

Open PavelA85 opened this issue 6 months ago • 1 comments

This PR resolves LocalSystem service startup and logging issues on Windows. Additionally, it adds tracking for Claude Design and Extra Usage (with Euro currency support) to the Anthropic provider, and introduces a new 1080p-optimized 'Wall Mode' for dedicated displays featuring a high-density, scroll-free layout with a floating exit toggle.

PavelA85 avatar May 07 '26 22:05 PavelA85

Hey Pavel, nice work on the extra usage credits tracking and Wall Mode. A few things before we can merge:

Questions:

  • Does Anthropic's API actually return seven_day_opus as a quota key? We've seen seven_day and seven_day_sonnet but never a separate Opus weekly limit. Can you share a sample API response showing this?

Bugs/Issues:

  • config.go: The os.MkdirAll is placed after os.Stat - if the directory doesn't exist, Stat fails first and MkdirAll never runs. Move it before the Stat call.
  • cleanup-services.ps1 and setup-service.ps1 have hardcoded paths to your machine (C:\Users\Paul\...). The proper parameterized version is already at scripts/setup-windows-service.ps1 - please remove these two from the PR.

CI Failure - root cause and fix: The Test job times out on TestRun_DaemonChildStartupError (600s). Your MkdirAll addition is the cause - previously the test relied on OpenFile failing when HOME points to a temp dir with no .onwatch/ subdirectory. Now MkdirAll creates the missing dirs, logging succeeds, the daemon starts normally, and run() blocks forever at the signal select.

Fix: make the temp dir read-only so MkdirAll fails as expected:

tmpHome := t.TempDir()
t.Setenv("HOME", tmpHome)
os.Chmod(tmpHome, 0555)
t.Cleanup(func() { os.Chmod(tmpHome, 0755) })

prakersh avatar May 24 '26 07:05 prakersh