feat(atcoder): extract submit helpers; add live status notifications #294
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/cp.nvim!294
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/cache-credentials-nesting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
_submit_syncwas a 170-line nested closure with_solve_turnstileandthe browser-install block further nested inside it. Status events went to
stderr, which
run_scraper()silently discards, leaving the user with a10–30s silent hang after credential entry. The NDJSON spawn path also
lacked stdin support, so submit had no streaming path at all.
Solution
Extract
_TURNSTILE_JS,_solve_turnstile,_ensure_browser, and_submit_headlessto module level inatcoder.py; status events(
installing_browser,checking_login,logging_in,submitting) nowprint to stdout as NDJSON. Add stdin pipe support to the NDJSON spawn
path in
scraper.luaand switchM.submitto streaming with anon_statuscallback. Wireon_statusinsubmit.luato firevim.notifyfor each phase transition.