mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-07 17:04:42 +00:00
* feat(plugin): expose stable sidebar entity data across hosts Collections return interned references and preserve their arrays when membership and order stay unchanged. Entity selectors share one hook with identity defaults for full snapshots and shallow defaults for selections. The app caches host projections and shares underlying store and host subscriptions. Browser render counts exercise the real session store and plugin provider without memoized rows. Terminal hooks consume the collection source port; daemon-wide terminal discovery is the separate terminal phase. * feat(plugin): let users select a sidebar view An exclusive view replaces the sidebar content while the host retains navigation, callouts, and footer. The device remembers the selection, unavailable views fall back to the default, and throwing views provide recovery. Device-scoped plugin settings persist locally with schema validation and revision conflicts. Web E2E and Android tablet QA cover selection, preserved chrome, disabled-view fallback, and error recovery. * feat(plugin): add sidebar view examples and ref actions Keep sidebar layout and gestures inside the plugin while routing entity handles to their owning hosts. Examples cover empty projects, pinned workspaces, task sections, nested agents and device-local label folders. * feat(plugin): observe terminals across connected hosts Share host-wide terminal observations across plugin surfaces and gate them on terminalCollection. Keep directory observations compatible, and carry creation time in worker v6 state so v5 terminals can drain with an unknown timestamp.
14 lines
689 B
TypeScript
14 lines
689 B
TypeScript
// A terminal directory subscription is scoped to a (cwd, workspaceId) pair, not
|
|
// cwd alone: under Model B two workspaces can share a cwd, and each must track
|
|
// and tear down its own live subscription without disturbing the other. An
|
|
// absent workspaceId (old clients) keys to the cwd on its own. The `::`
|
|
// separator cannot collide with a workspace id, which is always `wks_<hex>`.
|
|
export function terminalSubscriptionKey(
|
|
cwd: string | undefined,
|
|
workspaceId: string | undefined,
|
|
): string {
|
|
if (cwd === undefined)
|
|
return workspaceId === undefined ? "terminal-host" : `${workspaceId}::terminal-host`;
|
|
return workspaceId === undefined ? cwd : `${workspaceId}::${cwd}`;
|
|
}
|