- change Clients map to use net.Addr as the key type
- update `HandleConnection()` to store clients using LocalAddr
- modify `handleClientCommands()` to delete clients by LocalAddr
🤖
- remove unused Mutex from `models.Client` struct
- remove lock from `HandleConnection()`
- replace websocket.Conn with models.Client in `handleClientCommands()`
🤖
- add ProtocolVersion variable to metadata package
- don't set `ServerMessage.ProtocolVersion` in `main`
- update `ServerMessage` default to include ProtocolVersion
🤖
- update logging to use charmbracelet/log package
- improve log messages for server start and errors
- enhance client connection and disconnection logs
🤖
- remove shared.Message.TimeLeft
- modify Timer struct
- add TimeLeft signal
- add End and Abort signals
- add syncronised ticker
- update RunPomodoro to use goroutines for timer starts
- add waitForTimer function
- introduce Timer struct to manage timer state
- update RunPomodoro to use Timer methods for starting, stopping, and pausing
- remove unused pomodoro channels
- introduce password flag in server command line options
- update clientCommand model
- add password requirement for controlling the Pomodoro timer
- document password in README
- change "none" to an empty string for the mode field
- update README to reflect the new mode representation
- ensure consistency across session end/reset and welcome messages
🤖
- update import paths to reflect the new package name
- change function call to use the new websocket package
- adjust client iteration to use the renamed Clients variable
🤖
- create a new shared state file to manage message state
- replace broadcast.Message with shared.Message in pomodoro logic
- update websocket client handling to use shared.Clients
- remove unnecessary broadcast imports from various files
- ensure consistent message handling across the application
🤖
- remove clients parameter from RunPomodoro function
- update startTimer to no longer require clients parameter
- modify ResetPomodoro to eliminate clients parameter
- adjust client_commands to reflect changes in function signatures
🤖
- add SendPermanentBroadCastMessage to continuously send updates
- refactor BroadcastMessage to use a shared Message struct
- update pomodoro logic to modify broadcast.Message directly
- adjust client command handling to use broadcast.Clients map
- enhance ServerMessage struct with "Ongoing" and "Paused" fields
🤖