Repository navigation
Let the switch adopt a session that is already running - #32
Merged
Merged
Conversation
Flipping the switch to the company that was already started from the dashboard or the bar used to stop that session and start a new one. Now the server keeps the running session and records the switch's session ID on it (new nullable sessions.device_session_id), so the switch's later stop ends it. Flipping to a different company still stops the running session and starts the new one. No firmware change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starting a session from the dashboard or the Omarchy bar, then flipping the switch to that same company, used to stop the running session and start a new one. Now nothing changes, and flipping the switch back to the middle stops the session.
startSession: when a device start names the company that is already running, the server records the switch's session ID on that session (device_session_id) and returns it with a 200, instead of closing it and inserting a new one. A replayed start for that ID is also a no-op.stopSession: looks a session up by its own ID or by itsdevice_session_id, so the switch's stop ends the adopted session.0006_device_session_alias: nullable column plus a unique index. Runwrangler d1 migrations apply time-switch --remotebefore deploying.Tests: new case in
time-clock.test.ts. 39 of 39 pass, andtscis clean.🤖 Generated with Claude Code