The v1.0.47/48 attempt pushed sendProjectsToPI() from the plugin right
after streamDeck.connect() on startup, assuming that would reach an
already-open panel post-update-restart. It doesn't: per the SDK,
sendToPropertyInspector only delivers 'when the property inspector is
visible for an action provided by this plugin', and that visibility
state is tracked per-process via live didAppear/onSendToPlugin events
-- a freshly restarted process has never received one, so the push was
silently dropped. Confirmed in testing: the panel stayed frozen on
'Updating to vX...' indefinitely.
Removed the ineffective push. Instead, the property inspector's
'Check for Updates' handler now schedules a few refreshProjects
requests (1.5s/3.5s/6s/9s after the click) -- the same proven
PI-initiated round trip already used when entering an API token, which
reliably re-populates the panel including the version text once the
new process comes back up.
Also hardened checkForUpdates(): the final 'Updated to vX --
restarting...' status is now awaited with a short delay before
process.exit(0), best-effort only, since the panel no longer depends
on it arriving.
Selecting a name called saveCredentials, which sent refreshProjects,
which re-fetched users and called populateUsers(users, globalUserId)
with globalUserId still empty — immediately clearing the selection.
Fix: saveCredentials now updates globalUserId immediately, and
refreshProjects is only triggered by token changes (scheduleCredSave),
not by name changes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
onSendToPropertyInspector (users list) arrives before
onDidReceiveGlobalSettings (saved userId) in most cases, leaving
globalUserId empty when populateUsers runs. Now cachedUsers stores
the list, and onDidReceiveGlobalSettings re-populates if users
already arrived — handles both orderings.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
onDidReceiveGlobalSettings fired before the users list was populated,
so the saved userId couldn't be selected. Now stored in globalUserId
variable and applied when populateUsers runs, regardless of order.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously staff had to close and reopen the property inspector
after entering their token to trigger the fetch. Now saving the
token immediately sends a refreshProjects event to the plugin,
which fetches and returns the project list and name dropdown.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>