summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* courses.go: courseTypes should be a map[courseTypeT]struct{}Runxi Yu13 days1-4/+4
| | | | This saves one byte per course type
* Separate wsm.go into a file for each functionRunxi Yu13 days3-155/+215
|
* Move AGPL out of the primary appendix documentRunxi Yu13 days3-688/+685
|
* latexify-source.sh: Use a function instead of copying code aroundRunxi Yu13 days1-55/+23
|
* deploy.sh: Update sed expressionRunxi Yu14 days1-1/+1
|
* student.js: Use wss://cca.runxiyu.org/wsv0.1.9Runxi Yu14 days1-1/+1
|
* README.md: Remove "(WIP)"Runxi Yu14 days1-1/+1
|
* Revert "auth.go: Set SameSite=Strict"Runxi Yu14 days1-1/+1
| | | | | | | This reverts commit a6a5db47eb7a2040cd70dbd39e16d7de3fd9bd9f. Users are unable to log in with it. I'll look for another way to prevent CSRF.
* *.html: s/IA Docs/IA/gRunxi Yu14 days4-4/+4
|
* auth.go: Set SameSite=StrictRunxi Yu14 days1-1/+1
| | | | | We use GET requests for some administration endpoints (most importantly, the ones managing the global state).
* Implement course selection started/stopped statesRunxi Yu14 days10-21/+135
| | | | Implements: https://todo.sr.ht/~runxiyu/cca/13
* staff.html: Add search functionalityRunxi Yu2024-10-101-0/+11
|
* state.go: Cancel connections when setting state 0Runxi Yu2024-10-101-8/+16
|
* newcourses.go: setupCourses must be run after commitRunxi Yu2024-10-101-10/+11
| | | | Otherwise it reads an old snapshot of the database...
* wsc.go: Check newCtx.Done() when entering other event casesRunxi Yu2024-10-101-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.
* wsh.go: Remove old TODO about limiting connections per userRunxi Yu2024-10-101-7/+0
| | | | This has been implemented quite a while ago.
* wsh.go: Remove TODO about checking pgErrRunxi Yu2024-10-101-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.
* export.go: Remove unnecessary TODORunxi Yu2024-10-101-1/+1
|
* auth.go: Remove access token expiration fields and related TODORunxi Yu2024-10-101-14/+5
| | | | | We're only using the token immediately after it is issued, so it's a bit unnecessary.
* auth.go: Remove TODO about implementing nonce checksRunxi Yu2024-10-101-7/+0
| | | | It's the OAuth provider that's responsible for checking this nonce.
* auth.go: Remove TODO about using ON CONFLICTRunxi Yu2024-10-101-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.
* Replace tcourse.sql with an example importable CSVRunxi Yu2024-10-103-14/+15
|
* Validate course group and course type when importing from CSVRunxi Yu2024-10-101-0/+24
|
* Allow staff to upload a CSV containing coursesRunxi Yu2024-10-106-39/+432
| | | | Implements: https://todo.sr.ht/~runxiyu/cca/2
* export.go: Remove unnecessary fields from user queryRunxi Yu2024-10-101-3/+3
|
* style.css: Fix file selector buttonsRunxi Yu2024-10-101-1/+7
|
* {wsp,wsx}.go: Move comment about RFC1459-like message formatRunxi Yu2024-10-092-23/+23
|
* auth.go, schema.sql: Add "confirmed" field to usersRunxi Yu2024-10-092-2/+3
|
* index.go, student_disabled.html: Repsect state = 0Runxi Yu2024-10-093-17/+98
| | | | References: https://todo.sr.ht/~runxiyu/cca/13
* *.go, schema.sql, staff.html: Implement state settingRunxi Yu2024-10-097-3/+187
| | | | References: https://todo.sr.ht/~runxiyu/cca/13
* *.go, tmpl/staff.html: Allow staff to export choicesRunxi Yu2024-10-096-2/+250
| | | | Implements: https://todo.sr.ht/~runxiyu/cca/3
* staff.html: Update from students.html and only display link to /exportRunxi Yu2024-10-091-112/+5
|
* docs/fields.txt: RemoveRunxi Yu2024-10-091-27/+0
|
* {courses,wsc}.go: Atomic 64-bit alignmentRunxi Yu2024-10-092-4/+7
|
* wsc.go: Use sync.Map for cancelPool to reduce lock contentionRunxi Yu2024-10-091-21/+10
|
* student.html: Use separate columns for Selected and MaxRunxi Yu2024-10-091-2/+9
|
* eslint.sh: Call eslint directly rather than through npxRunxi Yu2024-10-091-1/+1
|
* *.go: Update commentsRunxi Yu2024-10-098-30/+17
|
* bench.go: Update number of coursesRunxi Yu2024-10-091-1/+1
|
* student.js: Don't N then Y the same course on selectv0.1.8Runxi Yu2024-10-091-1/+1
|
* student.{html,js}: Deselect courses in the same group when selectingRunxi Yu2024-10-092-5/+7
|
* student.html: Slightly better looks around tickboxRunxi Yu2024-10-091-8/+10
|
* tcourse.sql: Add more example CCAsRunxi Yu2024-10-091-5/+13
|
* {courses,index}.go, student.html, style.css: Group by course groupRunxi Yu2024-10-094-20/+34
|
* student.html: Simplify JSRunxi Yu2024-10-091-2/+1
|
* index.go, {login,student}.html: Use structs rather than maps for tmplRunxi Yu2024-10-093-22/+28
|
* *.go: Use sync.Map instead of map[int]*courseT for coursesRunxi Yu2024-10-096-73/+115
| | | | I'm not sure whether this is actually better than locking.
* {courses,wsc,wsp}.go: Usems should be sync.MapRunxi Yu2024-10-093-19/+12
| | | | | This is a classic few-reads, many-writes situation where a sync.Map would lead to substantially less lock contention.
* {courses,wsc,wsm}.go: map[courseGroupT](bool->struct{})Runxi Yu2024-10-083-8/+8
| | | | | This makes it use slightly less memory. Approximately courseGroupT bits per connection!
* style.css: Work around Firefox bug 217769Runxi Yu2024-10-081-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