cp.nvim/lua/cp
Barrett Ruth b5aaac3862 fix(commands): canonicalize CF contest IDs and auto-restore on action
Problem: two related gaps in `handle_command` and `parse_command`.
Codeforces contest IDs were passed through raw, so URLs or problem IDs
with trailing letters (e.g. `1933A`, full contest URLs) caused scraper
failures. Separately, action commands like `:CP run` silently failed
when invoked with no active contest instead of attempting recovery.

Solution: add `canonicalize_cf_contest` to strip URLs and trailing
problem letters before building the `contest_setup` command. Add a
guard in `handle_command` that calls `restore_from_current_file()`
before dispatching any contest-requiring action when no platform is
active, returning early if no cached state is found.
2026-03-05 15:29:09 -05:00
..
commands fix(commands): canonicalize CF contest IDs and auto-restore on action 2026-03-05 15:29:09 -05:00
pickers fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
runner fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
ui fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
cache.lua refactor(cache): nest credentials under platform namespace (#293) 2026-03-04 13:37:22 -05:00
config.lua refactor(run): remove I/O view test navigation keymaps 2026-03-04 00:26:22 -05:00
constants.lua fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
credentials.lua fix(credentials): use display names in login/logout prompts 2026-03-05 15:11:08 -05:00
health.lua fix: replace deprecated vim.loop with vim.uv 2026-02-26 22:45:07 -05:00
helpers.lua feat(ui): auto-hide source buffer on close 2025-10-24 14:47:12 -04:00
init.lua fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
log.lua fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
race.lua fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
restore.lua fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
scraper.lua feat(credentials): validate login via scraper before caching 2026-03-05 15:00:38 -05:00
setup.lua fix(setup): clear output buffer when switching contests 2026-03-05 15:27:48 -05:00
state.lua refactor(run): remove I/O view test navigation keymaps 2026-03-04 00:26:22 -05:00
stress.lua fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
submit.lua fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
utils.lua fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
version.lua fix: refactor 2025-09-21 11:19:00 -04:00