fix(race): log initial countdown on start (#356)

## Problem

Starting a race on a contest more than 1 hour away showed no feedback —
`should_notify` only fires at 15-minute intervals, so the first tick
produced no message and the UI appeared frozen during the contest list
fetch.

## Solution

Log the initial countdown immediately after the race timer is set up,
before the first `should_notify` tick fires.
This commit is contained in:
Barrett Ruth 2026-03-06 23:59:56 -05:00 committed by GitHub
parent 926ca587b8
commit f59c12a929
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -209,6 +209,15 @@ function M.start(platform, contest_id, language)
race_state.last_refetch = os.time()
race_state.token = token
logger.log(
('%s race "%s" starts in %s'):format(
display,
race_state.contest_name,
format_countdown(remaining)
),
{ level = vim.log.levels.INFO, override = true }
)
local timer = vim.uv.new_timer()
race_state.timer = timer
timer:start(