cp.nvim/lua/cp
Barrett Ruth eb0dea777e
fix(scrapers): login fast paths and re-auth hardening for httpx platforms (#357)
## Problem

On CSES, Kattis, and USACO, `:CP <platform> login` always prompted
for credentials and ran a full web login even when a valid session was
already cached. Submit also had weak stale-session detection.

## Solution

`credentials.lua` now tries cached credentials first before prompting,
delegating fast-path detection to each scraper. CSES `login()` checks
the cached API token and returns immediately if valid. USACO `login()`
and `submit()` call `_check_usaco_login()` upfront. Kattis `submit()`
emits `checking_login` consistently and also triggers re-auth on HTTP
400/403, not just on the `"Request validation failed"` text match.
The premature `Submitting...` log emitted by Lua before the scraper
started is removed — Python's own status events are sufficient.
2026-03-07 02:23:43 -05:00
..
commands feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
pickers feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
runner feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
ui feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
cache.lua feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
config.lua feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
constants.lua feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
credentials.lua fix(scrapers): login fast paths and re-auth hardening for httpx platforms (#357) 2026-03-07 02:23:43 -05:00
health.lua feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
helpers.lua feat(ui): auto-hide source buffer on close 2025-10-24 14:47:12 -04:00
init.lua feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -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(race): log initial countdown on start (#356) 2026-03-06 23:59:56 -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(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
setup.lua refactor: remove open_url config option in favour of :CP open (#322) 2026-03-05 22:55:43 -05:00
state.lua refactor(run): remove I/O view test navigation keymaps 2026-03-04 00:26:22 -05:00
stress.lua feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
submit.lua fix(scrapers): login fast paths and re-auth hardening for httpx platforms (#357) 2026-03-07 02:23:43 -05:00
utils.lua feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
version.lua fix: refactor 2025-09-21 11:19:00 -04:00