Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2024-10-10 | state.go: Cancel connections when setting state 0 | Runxi Yu | 1 | -8/+16 | |
2024-10-10 | newcourses.go: setupCourses must be run after commit | Runxi Yu | 1 | -10/+11 | |
Otherwise it reads an old snapshot of the database... | |||||
2024-10-10 | wsc.go: Check newCtx.Done() when entering other event cases | Runxi Yu | 1 | -12/+25 | |
We select the context done channel when entering other cases too (see below) because we need to make sure the context cancel works even if both the cancel signal and another event arrive while processing a select cycle. It's a bit verbose and looks repetitive but is technically more correct than code without it. | |||||
2024-10-10 | wsh.go: Remove old TODO about limiting connections per user | Runxi Yu | 1 | -7/+0 | |
This has been implemented quite a while ago. | |||||
2024-10-10 | wsh.go: Remove TODO about checking pgErr | Runxi Yu | 1 | -1/+0 | |
If the UUIDs actually collide, we're doomed anyway. Okay... this isn't the best way to write software that must be ultra-reliable, but this doesn't need to be ultra-reliable. | |||||
2024-10-10 | export.go: Remove unnecessary TODO | Runxi Yu | 1 | -1/+1 | |
2024-10-10 | auth.go: Remove access token expiration fields and related TODO | Runxi Yu | 1 | -14/+5 | |
We're only using the token immediately after it is issued, so it's a bit unnecessary. | |||||
2024-10-10 | auth.go: Remove TODO about implementing nonce checks | Runxi Yu | 1 | -7/+0 | |
It's the OAuth provider that's responsible for checking this nonce. | |||||
2024-10-10 | auth.go: Remove TODO about using ON CONFLICT | Runxi Yu | 1 | -7/+0 | |
I think using the pgErr method actually makes the logic easier to follow especially since I'm not updating the "confirmed" field when UPDATEing but it's being initialized to false during INSERT. | |||||
2024-10-10 | Replace tcourse.sql with an example importable CSV | Runxi Yu | 3 | -14/+15 | |
2024-10-10 | Validate course group and course type when importing from CSV | Runxi Yu | 1 | -0/+24 | |
2024-10-10 | Allow staff to upload a CSV containing courses | Runxi Yu | 6 | -39/+432 | |
Implements: https://todo.sr.ht/~runxiyu/cca/2 | |||||
2024-10-10 | export.go: Remove unnecessary fields from user query | Runxi Yu | 1 | -3/+3 | |
2024-10-10 | style.css: Fix file selector buttons | Runxi Yu | 1 | -1/+7 | |
2024-10-09 | {wsp,wsx}.go: Move comment about RFC1459-like message format | Runxi Yu | 2 | -23/+23 | |
2024-10-09 | auth.go, schema.sql: Add "confirmed" field to users | Runxi Yu | 2 | -2/+3 | |
2024-10-09 | index.go, student_disabled.html: Repsect state = 0 | Runxi Yu | 3 | -17/+98 | |
References: https://todo.sr.ht/~runxiyu/cca/13 | |||||
2024-10-09 | *.go, schema.sql, staff.html: Implement state setting | Runxi Yu | 7 | -3/+187 | |
References: https://todo.sr.ht/~runxiyu/cca/13 | |||||
2024-10-09 | *.go, tmpl/staff.html: Allow staff to export choices | Runxi Yu | 6 | -2/+250 | |
Implements: https://todo.sr.ht/~runxiyu/cca/3 | |||||
2024-10-09 | staff.html: Update from students.html and only display link to /export | Runxi Yu | 1 | -112/+5 | |
2024-10-09 | docs/fields.txt: Remove | Runxi Yu | 1 | -27/+0 | |
2024-10-09 | {courses,wsc}.go: Atomic 64-bit alignment | Runxi Yu | 2 | -4/+7 | |
2024-10-09 | wsc.go: Use sync.Map for cancelPool to reduce lock contention | Runxi Yu | 1 | -21/+10 | |
2024-10-09 | student.html: Use separate columns for Selected and Max | Runxi Yu | 1 | -2/+9 | |
2024-10-09 | eslint.sh: Call eslint directly rather than through npx | Runxi Yu | 1 | -1/+1 | |
2024-10-09 | *.go: Update comments | Runxi Yu | 8 | -30/+17 | |
2024-10-09 | bench.go: Update number of courses | Runxi Yu | 1 | -1/+1 | |
2024-10-09 | student.js: Don't N then Y the same course on selectv0.1.8 | Runxi Yu | 1 | -1/+1 | |
2024-10-09 | student.{html,js}: Deselect courses in the same group when selecting | Runxi Yu | 2 | -5/+7 | |
2024-10-09 | student.html: Slightly better looks around tickbox | Runxi Yu | 1 | -8/+10 | |
2024-10-09 | tcourse.sql: Add more example CCAs | Runxi Yu | 1 | -5/+13 | |
2024-10-09 | {courses,index}.go, student.html, style.css: Group by course group | Runxi Yu | 4 | -20/+34 | |
2024-10-09 | student.html: Simplify JS | Runxi Yu | 1 | -2/+1 | |
2024-10-09 | index.go, {login,student}.html: Use structs rather than maps for tmpl | Runxi Yu | 3 | -22/+28 | |
2024-10-09 | *.go: Use sync.Map instead of map[int]*courseT for courses | Runxi Yu | 6 | -73/+115 | |
I'm not sure whether this is actually better than locking. | |||||
2024-10-09 | {courses,wsc,wsp}.go: Usems should be sync.Map | Runxi Yu | 3 | -19/+12 | |
This is a classic few-reads, many-writes situation where a sync.Map would lead to substantially less lock contention. | |||||
2024-10-08 | {courses,wsc,wsm}.go: map[courseGroupT](bool->struct{}) | Runxi Yu | 3 | -8/+8 | |
This makes it use slightly less memory. Approximately courseGroupT bits per connection! | |||||
2024-10-08 | style.css: Work around Firefox bug 217769 | Runxi Yu | 1 | -0/+8 | |
Firefox eats the left, bottom, and right borders when tbody is empty. This is a bug known for 21 years (that was Firefox 37 or something). References: https://bugzilla.mozilla.org/show_bug.cgi?id=217769 | |||||
2024-10-08 | *.go: Further wrap errors | Runxi Yu | 6 | -24/+52 | |
2024-10-08 | err.go: Create, and unify some error definitions | Runxi Yu | 5 | -38/+55 | |
2024-10-07 | Revert "latexify-source.sh: \subsection{\texttt{%s}}" | Runxi Yu | 1 | -11/+11 | |
This reverts commit a9916b3a7df327836f18011edcbf8cc218260f89. | |||||
2024-10-07 | student.js: Use "let" rather than "var"v0.1.7 | Runxi Yu | 1 | -2/+2 | |
2024-10-07 | latexify-source.sh: Don't set -x | Runxi Yu | 1 | -1/+1 | |
2024-10-07 | cca.scfg.example: usem_delay_shift_bits should default to 5 | Runxi Yu | 1 | -1/+1 | |
2024-10-07 | Reapply "{config,wsc}.go, cca.scfg.example: Dynamic course update delay" | Runxi Yu | 3 | -17/+34 | |
This reverts commit 831040c3d7dbc116a25848786bc5ab83fef6149b. | |||||
2024-10-07 | Revert "{config,wsc}.go, cca.scfg.example: Dynamic course update delay" | Runxi Yu | 3 | -34/+17 | |
This reverts commit de3f0b9e7003e4521f5ea866134e77ff859ab99b. | |||||
2024-10-07 | {courses,wsm,wsp}.go: Make course.Selected atomic | Runxi Yu | 3 | -12/+15 | |
2024-10-07 | wsc.go: Fix race condition with usemCount atomics | Runxi Yu | 1 | -1/+6 | |
Atomics must be read atomically via atomic.LoadT | |||||
2024-10-07 | postgres_run.sh: Remove as unnecessary | Runxi Yu | 1 | -3/+0 | |
2024-10-06 | Makefile, main.go: Use cover page as iadocs/index.html | Runxi Yu | 2 | -3/+9 | |