Skip to content
This repository was archived by the owner on Feb 14, 2026. It is now read-only.

Comments

fix: Set machines to active when receiving machine-alive events#31

Open
taranasus wants to merge 1 commit intoslopus:mainfrom
taranasus:fix/machine-active-flag
Open

fix: Set machines to active when receiving machine-alive events#31
taranasus wants to merge 1 commit intoslopus:mainfrom
taranasus:fix/machine-active-flag

Conversation

@taranasus
Copy link

Summary

  • Fixed bug where machines never became active after sending machine-alive events

Problem

The flushPendingUpdates() method in sessionCache.ts was updating lastActiveAt for machines but not setting active: true, unlike the session update logic which correctly sets both.

This caused machines to:

  1. Be created with active: false (default)
  2. Never become active despite sending machine-alive events
  3. Be invisible in the mobile app's machine list (which filters to only show active: true machines)

Fix

Added active: true to the machine update data, matching the session update behavior:

- data: { lastActiveAt: new Date(update.timestamp) }
+ data: { lastActiveAt: new Date(update.timestamp), active: true }

Testing

Verified the fix by deploying to a self-hosted instance. Machines now correctly appear in the mobile app after sending alive events.

The session activity cache was updating lastActiveAt for machines but
not setting active: true, unlike the session update logic. This caused
machines to never become active after sending machine-alive events,
making them invisible in the mobile app's machine list.

The session update correctly sets both lastActiveAt and active: true,
but the machine update was missing the active flag.
michelhelsdingen added a commit to michelhelsdingen/happy-server that referenced this pull request Feb 3, 2026
Machines were created with active: false and never became active despite
sending machine-alive events. This caused them to be invisible in the
mobile app's machine list (which filters to only show active: true).

Fix from PR slopus#31 by @taranasus

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant