Commit graph

39 commits

Author SHA1 Message Date
Barrett Ruth
a202725cc5
fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305)
## Problem

After the initial submit hardening, two issues remained: source code was
read in Lua and piped as stdin to the scraper (unnecessary roundtrip
since
the file exists on disk), and CF's `page.fill()` timed out on the hidden
`textarea[name="source"]` because CodeMirror owns the editor state.

## Solution

Pass the source file path as a CLI arg instead — AtCoder calls
`page.set_input_files(file_path)` directly, CF reads it with
`Path(file_path).read_text()`. Fix CF source injection via
`page.evaluate()`
into the CodeMirror instance. Extract `BROWSER_SUBMIT_NAV_TIMEOUT` as a
per-platform `defaultdict` (CF defaults to 2× nav timeout). Save the
buffer
with `vim.cmd.update()` before submitting.
2026-03-05 14:34:14 -05:00
Barrett Ruth
00987bb0ff feat(io): cleanup view 2025-11-06 01:31:50 -05:00
Barrett Ruth
bd30fb626c feat: start lang refactor 2025-10-24 01:11:19 -04:00
a0b5264761 fix: improve error handling 2025-10-05 16:06:08 -04:00
d2bde9bad8 fix(config): better file org 2025-10-04 19:54:53 -04:00
0a320945a0 fix(config): platforms, not contests 2025-10-04 16:29:35 -04:00
a725925434 fix(pickers): only log on fetch 2025-10-04 12:30:50 -04:00
34ef7bafd6 fix print order 2025-10-03 14:41:32 -04:00
057b0890c2 fix: remove unused function 2025-10-02 13:56:38 -04:00
6b8a1e2087 more docs 2025-10-01 21:36:53 -04:00
a925686a17 fix(log): improve logging 2025-10-01 16:41:24 -04:00
b406c0ce4e fix: synchronous problem fetch 2025-10-01 12:25:07 -04:00
a54e6398cf fix(picker): rename 2025-09-30 20:57:14 -04:00
46cd509747 fix docs and superfluous vim.validate calls 2025-09-30 20:55:29 -04:00
9704b11e7c fix(pickers): declare M as table 2025-09-30 20:33:40 -04:00
5588eae526 fix(picker): rename picker function names 2025-09-30 20:27:31 -04:00
a7cd41712d fix(picker): print fetching data early 2025-09-30 20:19:19 -04:00
e3309e8f3c fix(pickers): expose fns properly 2025-09-30 20:18:57 -04:00
a24ac2314c remove picker spec 2025-09-24 20:08:23 -04:00
d862df9104 fix: only display configured platforms in pickers 2025-09-24 19:47:00 -04:00
9e84d57b8a feat: context, not config 2025-09-24 18:21:34 -04:00
4429b5fe67 fix 2025-09-24 00:47:44 -04:00
699207e713 lint 2025-09-24 00:44:08 -04:00
7ac91a3c4d fix async 2025-09-24 00:41:10 -04:00
540364926d feat: improve logging 2025-09-23 16:14:21 -04:00
8df8c16a72 fix(ci): selene lint 2025-09-23 12:25:53 -04:00
62eab3df2d feat(picker): one step closer to fully async 2025-09-23 12:16:57 -04:00
545793df39 remove ai comments 2025-09-23 09:43:21 -04:00
e171017ab0 fixup 2025-09-23 09:42:45 -04:00
e48e70a5f9 fix(config): easier language default per-contest 2025-09-21 14:16:27 -04:00
373e7f6e76 fix(test): mock caches and everything else 2025-09-21 12:26:06 -04:00
1822714a0c fix(picker): propagate logs 2025-09-21 12:24:42 -04:00
a827d4f67c fix(picker): use consisten messaging 2025-09-21 12:21:40 -04:00
0938b9bbd6 feat(pickers): ctrl-r to refresh 2025-09-21 12:13:59 -04:00
9d92021fcf fix(test): include necessary variables 2025-09-21 11:45:24 -04:00
c1529c5d91 fix(ci): unused vars 2025-09-21 11:37:08 -04:00
1b8365265d fix(ci): unused variables 2025-09-21 11:36:06 -04:00
58f9be5f9a fix: refactor 2025-09-21 11:19:00 -04:00
a33e66680b feat(picker): picker support 2025-09-21 11:10:54 -04:00