173 Commits

Author SHA1 Message Date
Copilot
0449e33b40 Add independent alignment for custom roles (#217)
* Initial plan

* Add independent alignment: constants, validation, UI, and CSS

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Add unit tests for independent alignment validation

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Fix remaining binary alignment checks in role display

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Add independent player container and game-role-independent CSS

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* fix a couple bugs, tweak colors

* remove import

* remove duplicate tag

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>
Co-authored-by: AlecM33 <leohfx@gmail.com>
2026-01-24 23:55:11 -05:00
Copilot
7b6da37ef5 Refactor timer system from child processes to main thread (#216)
* Initial plan

* Refactor timer system to run on main thread instead of child processes

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Remove obsolete GameProcess.js and simplify TimerManager to stub

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Address code review feedback: add comments and reduce duplication

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Remove comments, delete TimerManager, and simplify SOURCE_TIMER_EVENT

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Fix cross-instance timer communication and expired timer handling

- GET_TIME_REMAINING now publishes response through Redis for cross-instance communication
- SOURCE_TIMER_EVENT handles GET_TIME_REMAINING even when timer is not running locally
- Returns 0 time remaining when timer has expired or timerParams is null
- Updated test to expect Redis publish instead of direct method call

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Simplify GET_TIME_REMAINING flow and add ended flag

- Add ended: true flag to timerParams when timer completes
- Simplify TIMER_EVENT to check ended flag first, then local timer, then publish SOURCE_TIMER_EVENT
- SOURCE_TIMER_EVENT only publishes GET_TIME_REMAINING if it has the timer
- Remove GET_TIME_REMAINING from handleTimerCommand helper
- Direct socket emission for local timers instead of Redis publish
- Updated test to verify socket emission

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Refactor GET_TIME_REMAINING into handleTimerCommand switch case

- Moved GET_TIME_REMAINING logic from TIMER_EVENT handler into handleTimerCommand function
- Simplified TIMER_EVENT to just call handleTimerCommand for all timer operations
- Maintains same flow: check ended flag, check local timer, publish SOURCE_TIMER_EVENT if needed
- All tests passing

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Remove unused getTimeRemaining function from GameManager

- Function is no longer called after refactoring GET_TIME_REMAINING into handleTimerCommand
- All timer time remaining logic now handled in Events.js handleTimerCommand switch case
- Tests still passing

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* Reset timerParams.ended flag when restarting game

- Added reset of ended flag to false in restartGame function
- Ensures restarted games don't have timer marked as already ended
- Placed right after timer cleanup for logical grouping

Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>

* remuse unused constant

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>
Co-authored-by: AlecM33 <leohfx@gmail.com>
2026-01-24 11:58:51 -05:00
AlecM33
26f2fc5165 exempt options calls from auth check 2025-12-29 15:55:26 -05:00
AlecM33
5bfe11e5a1 attempt to resolve options call issue 2025-12-29 15:30:56 -05:00
AlecM33
83dd5eb815 fix options call settings 2025-12-29 15:18:05 -05:00
AlecM33
054234b38d fix spacing 2025-12-29 15:10:49 -05:00
AlecM33
12568d31ea remove unused options 2025-12-29 15:10:14 -05:00
AlecM33
b749fa0801 handle options call 2025-12-29 15:09:37 -05:00
Alec
2ef27c8248 allow local admin dashboard (#212)
* allow local admin dashboard

* removed 'unused' constant...
2025-12-29 14:59:57 -05:00
Alec
2a4fa2861f set content type for join errors (#207) 2025-02-07 13:53:30 -05:00
Alec
ad20a291ec Address some remaining lighthouse report feedback (#205)
* lighthouse improvements

* revert property

* explicit width and height

* missing width and height
2024-11-12 21:30:13 -05:00
Alec
915819bb15 Fix bug where we incorrectly added a user as a player instead of a spectator (#189)
* fix bug with failing to add as spectator for in-progress game

* refactor fix

* revert to previous fix
2024-03-12 22:59:05 -04:00
AlecM33
1b24d61091 add second web server, work around docker compose bug 2024-03-04 20:39:11 -05:00
AlecM33
a7d864cdec local docker setup 2024-03-04 02:49:53 -05:00
AlecM33
95d0cee35f fix logic that determines whether games are startable when the game is first constructed 2023-11-28 18:19:21 -05:00
AlecM33
e6a9d61220 remove unnecessary asynchronous logic in index 2023-08-17 12:39:56 -04:00
AlecM33
1d22aebbb9 built out rest of functionality; add placeholder when there are no custom roles 2023-08-16 13:43:22 -04:00
AlecM33
267b42d4c5 another magic number 2023-08-14 17:50:01 -04:00
AlecM33
0d1effb388 remove magic numbers, update how to use page styling 2023-08-14 16:52:08 -04:00
AlecM33
a2ed634558 edit names 2023-08-14 02:50:46 -04:00
AlecM33
da0d69062e fix error handling for Fetch API 2023-08-13 18:47:38 -04:00
AlecM33
0b7dd9f4d7 various refactors 2023-08-13 17:51:41 -04:00
AlecM33
2c0331e485 clean up mobile navbar; other tweaks 2023-08-12 00:31:09 -04:00
AlecM33
1a65088377 allow games to be created with no initial cards 2023-08-07 10:12:44 -04:00
AlecM33
8bb77831f8 remove stray console logs 2023-08-04 00:28:57 -04:00
AlecM33
0c92455e0e fix various small gaps, give option for players to leave 2023-08-04 00:15:29 -04:00
AlecM33
7c61b3a724 fix expectations, remove outdated specs 2023-08-03 18:42:00 -04:00
AlecM33
19f12ca1a8 fix failure to assign game property on server side 2023-08-03 18:14:30 -04:00
AlecM33
bcfb0afdd1 redesign how players are added and how cards are dealt 2023-08-03 18:08:33 -04:00
AlecM33
24ae53209f successful editing of role list 2023-08-03 16:52:03 -04:00
AlecM33
0d82227824 allow moderators to kick players and spectators 2023-08-02 23:23:01 -04:00
AlecM33
d00f3d630a replace restart with return to lobby, add mockup player options button 2023-08-02 18:44:33 -04:00
AlecM33
bef8cd8d59 fix bug with redundant play/pause events, fix spec, tweak current moderator css 2023-04-08 16:01:39 -04:00
AlecM33
a26b405ffa display current moderator, fix assignment of spectator 2023-04-01 23:49:21 -04:00
AlecM33
e9747508ea add comment 2023-03-11 17:13:54 -05:00
AlecM33
e0986cefde compress bundled js 2023-03-11 17:07:31 -05:00
AlecM33
f44f38cd7f remove extra arg 2023-02-01 00:18:16 -05:00
AlecM33
a99d19614c add retry for fetching game state 2023-01-31 23:17:35 -05:00
AlecM33
0ae9df1253 filter adjectives 2023-01-30 17:34:58 -05:00
AlecM33
6125676410 remove logs 2023-01-30 12:46:26 -05:00
AlecM33
79309f5062 add bots to a game 2023-01-30 12:40:28 -05:00
AlecM33
4d84b9c530 styling improvements to buttons/modals 2023-01-29 12:31:22 -05:00
AlecM33
6acdc5a752 prevent mGet call with empty array 2023-01-24 22:29:13 -05:00
AlecM33
bd359e878e fix bug with displaying killed player for mod transfer, expand specs 2023-01-22 21:17:29 -05:00
AlecM33
92d87c8ac5 further refactor entrypoint, change 404 message 2023-01-22 11:55:00 -05:00
AlecM33
2bb14c9a70 simplify async code 2023-01-21 21:39:54 -05:00
AlecM33
b81c7dfb8a remove unnecessary redis client, set up dynamic redis connection 2023-01-21 16:25:21 -05:00
AlecM33
3b707c8601 add some error handling 2023-01-21 15:48:35 -05:00
AlecM33
c762f88159 redis part 6, fix test suites 2023-01-21 15:26:50 -05:00
AlecM33
36c48affc9 remove sigterm handler 2023-01-17 21:30:21 -05:00