- add goroutine to remove stale clients from the connection pool
- update client struct to track `LastPong` time
- set write deadline for websocket connections
- move package variables and const to `vars.go`
- log additional information when broadcasting errors
🤖
- change mode from "Work" to "Focus" in server messages
- modify pomodoro configuration to use "Focus" instead of "Work"
- adjust default settings to reflect new terminology
- ensure all references to work duration are updated to focus duration
- update variable names in HTML and JavaScript for clarity
🤖
- set version from runtime/debug.Main.Version
- use latest git tag as fallback
- allow GoTomatoVersion to be overwritten via ldflags
- this will break `go build .` and `go install .`
- make `GoTomatoVersion` a variable and default it to "devel"
- add ldflags to `.goreleaser.yaml` for version tagging
- remove "v" from output of `-version`
- removes "v" from the ProtocolVersion in the ServerMessage
- remove "v" prefix from GoTomatoVersion constant
- re-add "v" for for human readable output (`-version`)
- update README
- add Gorilla handlers package for enhanced HTTP handling
- refactor HTTP server to use a new ServeMux for routing
- update ListenAndServe to utilize ProxyHeaders for better proxy support
- add RealIP field to client model
- use RealIP fild for connect/disconnect log output
- add a function to check if Pomodoro settings are valid
- log a warning for invalid client configurations
- log an info message for valid client configurations
- implement Stringer interface for PomodoroConfig model
🤖
- 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