Repository navigation
Fix refresh interval bug, batch API calls, add resilience - #3
Merged
Merged
Conversation
robotgo.Sleep(840) sleeps in seconds not ms, so the ticker was actually refreshing every 14 minutes instead of 840ms. Made the interval explicit and configurable instead of silently wrong. The keepalive keystroke and loop stay as-is by design, now with a configurable key (default f15, since F10 pops menus in focused apps). Also: batch the CoinMarketCap request across symbols instead of one per symbol, cache Finnhub ISIN->symbol lookups instead of re-resolving every cycle, render partial failures as a warning row instead of aborting the whole table, guard nil quote fields to avoid panics, replace viper with plain yaml.v3, add -once/-json/-interval/-config/-no-clear flags, and add CI plus tests for the new code paths. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
f15 has no bound keycode on a stock X11/XKB layout, so robotgo synthesizes keycode 0 for KeyTap. X11's XTEST extension rejects that with a fatal BadValue error that kills the process outright (not a catchable Go error) -- confirmed live: the ticker died right after its first successful refresh. f10 is reliably mapped everywhere, which is why the original hardcoded value never hit this. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
robotgo.Sleep(840)sleeping in seconds not ms — the ticker was actually refreshing every 14 minutes instead of the intended 840ms; interval is now explicit, correct, and configurable via-intervalkeepalive_keyin config (defaultf15instead off10, since F10 opens menus in whatever app has focus)viperwith plainyaml.v3, dropped thejsonpathround-trip and unusedfinnhub-gov1 dependency-once,-json,-interval,-config,-no-clearCLI flags andNO_COLORsupportgo vet,gofmt, build, test) and unit tests for the crypto/stock/table/config code pathsTest plan
make lint(go vet + gofmt + build) passesmake testpasses (all packages, no live API keys required)make buildproduces a working binary;-hflag output verifiedFINNHUB_API_KEY/CMC_API_KEYin the target environment🤖 Generated with Claude Code