* feat(ui): show externally-created sessions in sidebar and Recent view (#1441)
Sessions created by external OpenCode processes (CLI, other server
instances) share the same database but don't broadcast SSE events to
OpenChamber's connected server. The existing 45s global polling via
experimental.session.list() already discovers these sessions, but the
isKnownActiveSessionDirectory filter in SessionSidebar.tsx removes
them when their directory isn't a registered project.
Add effectiveKnownDirectories that extends knownSessionDirectories
with directories derived from globalActiveSessions themselves, so
external sessions pass the filter and appear in the sidebar and Recent
view.
Validated with two live OpenCode server processes sharing the same
database: global experimental.session.list() returns external sessions
immediately, while per-directory APIs do not.
* Revert "feat(ui): show externally-created sessions in sidebar and Recent view (#1441)"
This reverts commit 94acda43ad3049e7674d8eb3f24b1f74acb0d1c3.
* fix(ui): make sidebar reactive to global session store updates (#1441)
Replace non-reactive useGlobalSessionsStore.getState() with direct
reactive subscriptions for activeSessions and archivedSessions. The
previous getState() pattern relied on proxy subscriptions
(activeSessionStructure, hasAuthoritativeGlobalSessions) to trigger
re-renders, which created a fragility gap where store updates could
go unnoticed by the sidebar.
Add a 45s periodic refreshGlobalSessions() interval in the sidebar,
independent of the tray sync hook. The tray sync's polling is gated
behind isTrayPlatform() and isTrayEnabled(), so on runtimes where
the tray is unavailable, there was no periodic refresh of global
sessions at all. External sessions (created by CLI or other server
processes) were only discovered on initial mount or page refresh.