cp.nvim/lua/cp
Barrett Ruth 127089c57f
fix(submit): harden atcoder and codeforces submit flow (#304)
## Problem

AtCoder file upload always wrote a `.cpp` temp file regardless of
language. CF submit used `solve_cloudflare=True` on the submit page,
causing a spurious "No Cloudflare challenge found" error;
`_wait_for_gate_reload` in `login_action` was dead code. Stale cookies
caused silent auth failures with no recovery path. The `uv.spawn` ndjson
path for submit had no overall timeout.

## Solution

Replace AtCoder's temp file with `page.set_input_files` using an
in-memory buffer and correct extension via `_LANGUAGE_ID_EXTENSION`.
Replace CF's temp-file/fallback dance with a direct
`textarea[name="source"]` fill and set `solve_cloudflare=False` on the
submit fetch. Add a login fast-path that skips the homepage check when
cookies exist, with automatic stale-cookie recovery via `_retried` flag
on redirect-to-login detection. Remove `_wait_for_gate_reload`. Fix
`_ensure_browser` to propagate install errors. Add a 120s kill timer to
the ndjson `uv.spawn` submit path in `scraper.lua`.
2026-03-05 11:18:34 -05:00
..
commands refactor(credentials): promote login/logout to top-level actions (#292) 2026-03-04 13:09:32 -05:00
pickers feat(io): cleanup view 2025-11-06 01:31:50 -05:00
runner refactor: rename epsilon to precision in runner 2026-03-03 15:09:41 -05:00
ui ci: format 2026-03-04 00:50:21 -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 refactor(credentials): promote login/logout to top-level actions (#292) 2026-03-04 13:09:32 -05:00
credentials.lua refactor(credentials): promote login/logout to top-level actions (#292) 2026-03-04 13:09:32 -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: surface runtime check failures as clean notifications 2026-02-18 17:25:50 -05:00
log.lua fix(cache): contest override 2025-10-04 12:48:57 -04:00
race.lua fix: resolve lua typecheck warnings in race and scraper 2026-03-03 15:09:41 -05:00
restore.lua fix: don't always open new window 2025-10-12 20:31:11 -04:00
scraper.lua fix(submit): harden atcoder and codeforces submit flow (#304) 2026-03-05 11:18:34 -05:00
setup.lua fix(setup): prevent spurious swap file warnings on :CP (#297) 2026-03-05 00:37:29 -05:00
state.lua refactor(run): remove I/O view test navigation keymaps 2026-03-04 00:26:22 -05:00
stress.lua feat(stress): add stress test loop 2026-03-03 15:09:41 -05:00
submit.lua feat(cses): implement submit via REST API (#299) 2026-03-05 01:07:57 -05:00
utils.lua feat(atcoder): extract submit helpers; add live status notifications (#294) 2026-03-04 19:27:29 -05:00
version.lua fix: refactor 2025-09-21 11:19:00 -04:00