feat(app): status rings on panels + sidebar aggregate badge from state events
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -65,12 +65,20 @@ export async function getStatus(): Promise<WorkspaceStatus[]> {
|
||||
export type DaemonEvt =
|
||||
| { evt: "exit"; data: { surface_id: string; code: number } }
|
||||
| { evt: "surface_created"; data: { surface_id: string; workspace_id: string } }
|
||||
| { evt: "surface_closed"; data: { surface_id: string } };
|
||||
| { evt: "surface_closed"; data: { surface_id: string } }
|
||||
| { evt: "state"; data: { surface_id: string; state: import("./layoutTypes").SurfaceState } }
|
||||
| { evt: "layout_changed"; data: { workspace_id: string } }
|
||||
| { evt: "workspace_changed"; data: unknown }
|
||||
| { evt: "groups_changed"; data: unknown };
|
||||
|
||||
export function onDaemonEvent(handler: (evt: DaemonEvt) => void): Promise<() => void> {
|
||||
return listen<DaemonEvt>("spacesh:evt", (e) => handler(e.payload));
|
||||
}
|
||||
|
||||
export async function focusSurface(surfaceId: string): Promise<void> {
|
||||
await invoke("focus", { surfaceId });
|
||||
}
|
||||
|
||||
export function onDaemonRawEvent(name: string, handler: () => void): Promise<() => void> {
|
||||
return listen(name, () => handler());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user