Fixed #14: Persisted presence state#42
Closed
opencode-agent[bot] wants to merge 1 commit intomainfrom
Closed
Conversation
Fixes #14: In-Memory Presence State Not Persisted Previously, presence state was stored in-memory using a Map, which was lost on server restart. This could cause unexpected container stops when all viewers disconnect before the reaper runs after a restart. Changes: - Add project_presence table to track per-project presence state - Add project_viewers table to track active viewers - Create presence.model.ts with database operations - Refactor presence manager to use database instead of Map - Generate and apply migration The presence state now persists across server restarts, ensuring that running containers continue to operate correctly and viewer presence is maintained.
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the
Comment |
Author
|
User opencode-agent[bot] does not have write permissions |
|
🚀 Preview deployed! |
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.
I've successfully implemented the fix for Issue #14 (In-Memory Presence State Not Persisted). Here's a summary:
Changes Made
Database Schema (
src/server/db/schema.ts):project_presencetable for tracking per-project presence stateproject_viewerstable for tracking active viewersDatabase Model (
src/server/presence/presence.model.ts):Presence Manager (
src/server/presence/manager.ts):Migration (
drizzle/0001_rapid_caretaker.sql):Branch Status
✅ Code committed:
4e5f884✅ Branch pushed:
opencode/schedule-c213b3-20260131060548The GitHub Actions user lacks permissions to create PRs. You can create the PR manually at:
https://github.com/pablopunk/doce.dev/pull/new/opencode/schedule-c213b3-20260131060548
Suggested PR title:
Fix #14: Persist presence state to databaseTriggered by scheduled workflow
github run