Commit Graph

47 Commits

Author SHA1 Message Date
vasyansk 615b90e887 test(daemon): event log survives cold daemon restart
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 08:35:38 +07:00
vasyansk 21fe1308cc feat(daemon): EventLog/MarkRead commands; Focus marks surface read
Wire Cmd::EventLog and Cmd::MarkRead to the live EventLog (replacing
NOT_IMPLEMENTED stubs). Cmd::Focus now calls mark_read for the surface,
persists the updated snapshot, and broadcasts Evt::EventsRead.
Add integration tests: event_log_query_and_mark_read and
focus_marks_surface_events_read.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 08:13:50 +07:00
vasyansk e83524a076 feat(daemon): record done/wait/error/exit into the event log
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 08:02:03 +07:00
vasyansk f7bf9fc5c6 wire(daemon): thread EventLog + EventPersister through serve/router
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 07:40:54 +07:00
vasyansk ac2d5ca1db feat(daemon): JsonEventStore + debounced EventPersister
Adds disk persistence for the event log: atomic temp+fsync+rename write,
corrupt-file backup, and a debounced coalescing persister task mirroring
state_store/persist patterns. 4 tests: round-trip, missing, corrupt, burst.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 07:27:23 +07:00
vasyansk 56ba1723b9 feat(daemon): EventLog ring model with read-flags
Add event_log.rs with EventLog (capped VecDeque, monotonic ids, mark_read,
snapshot/restore) and EventLogState. Register mod in main.rs. Stub
Cmd::EventLog and Cmd::MarkRead arms in server.rs to keep the exhaustive
match compiling; full wiring follows in Task 4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 07:21:26 +07:00
vasyansk 5a8596dd0b feat(proto): EventLog/MarkRead commands and Event/EventsRead events
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 06:59:27 +07:00
vasyansk fc13e4340c feat(proto): EventKind, EventRecord, MarkReadTarget 2026-06-10 06:52:35 +07:00
vasyansk c35585755e feat(daemon): actor OSC133/fallback detection → set_state, hook/shell spawn env, cleanup
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 23:05:18 +07:00
vasyansk 4396ad7909 feat(daemon): zsh OSC 133 shell integration via per-surface ZDOTDIR
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 23:00:48 +07:00
vasyansk 255fa27271 feat(daemon): versioned Claude Code hook adapter (per-surface CLAUDE_CONFIG_DIR)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 23:00:40 +07:00
vasyansk 4ec7dc1a78 feat(core): Osc133Scanner + FallbackScanner status detectors + grid tail_text
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 22:59:24 +07:00
vasyansk 6fc099bb6f test(daemon): serialize SPACESH_SOCK-mutating lifecycle tests to fix env race
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 22:23:41 +07:00
vasyansk 6f2e7885a4 test(cli): wire-level integration tests via SPACESH_SOCK mock daemon
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 22:20:26 +07:00
vasyansk 3c3a8039f3 feat(cli): command dispatch, human/--json rendering, status table, completions
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 22:17:53 +07:00
vasyansk a9fa1bf77b feat(cli): spacesh-cli scaffold — clap tree, one-shot client, command mapping
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 22:17:15 +07:00
vasyansk 635f9f4356 feat(daemon): per-surface status (set_state/state), idle-on-spawn, SPACESH_SOCK override
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 22:13:50 +07:00
vasyansk 4bd4aa4a36 feat(proto): SurfaceState + SetState command + State event + SurfaceView.state
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 22:10:54 +07:00
vasyansk 0328797bce chore(daemon): remove unused imports and dead placeholders
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:39:43 +07:00
vasyansk 62a65b691d feat(daemon): M2 command dispatch, layout events, cold-start restore, persistence wiring
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:25:35 +07:00
vasyansk b72f4cb3a5 feat(daemon): spawn_from_spec to (re)start surfaces from a persisted spec
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:22:29 +07:00
vasyansk d516414ac9 feat(daemon): registry owns workspaces/groups/trees + running/stopped surfaces
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:21:47 +07:00
vasyansk 7515516699 feat(daemon): debounced persist scheduler coalescing bursts into one save
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:20:58 +07:00
vasyansk 4f7ed2a5a3 feat(daemon): StateStore trait + atomic JSON store with corrupt-file backup
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:20:51 +07:00
vasyansk 9927046c7e feat(core): 10 layout preset generators
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:17:35 +07:00
vasyansk 28d0e05763 feat(core): n-ary tree ops — split, remove+collapse, ratios, move
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:17:35 +07:00
vasyansk 2723d40ff9 feat(proto): M2 commands (split/ratios/move/preset/restart/groups/meta) and events
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:13:33 +07:00
vasyansk c8ba401023 feat(proto): SurfaceSpec, Group, Workspace, status view types
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:12:29 +07:00
vasyansk 114922aaf8 feat(proto): GroupId, Orient, n-ary LayoutNode with external-tagged serde
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:11:51 +07:00
vasyansk f1630633e5 test(daemon): serialize heavy socket/PTY integration tests
Process-wide serial lock around the socket-binding and PTY-spawning
integration tests in spaceshd. Running several at once on a many-core
box starved each other's async tasks and tripped timing assumptions,
causing ~1/10 flakes under cargo test --workspace. Unit tests stay
parallel. 0/20 spaceshd + 0/5 workspace runs after the change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:39:24 +07:00
vasyansk 77dfc69bd9 fix(daemon): remove pending broadcast on attach to prevent reattach double-render
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:33:11 +07:00
vasyansk a56d8d0fea test(daemon): harden reattach test with pre-connect socket guard
Add wait_for_socket before second client connect to handle scheduling
jitter when tests run in parallel under cargo test --workspace.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:16:18 +07:00
vasyansk 18ac699951 feat(daemon): launchd user-agent install with KeepAlive
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:14:00 +07:00
vasyansk f49fc41cd1 test(daemon): reattach after disconnect repaints prior output from snapshot
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:13:32 +07:00
vasyansk 732eef96b5 feat(daemon): grid feed + output coalescing + snapshot-on-attach (M1)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:12:55 +07:00
vasyansk b201d0104e feat(core): deterministic ANSI snapshot of the grid for reattach repaint
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:11:37 +07:00
vasyansk e2b746dd64 feat(core): GridSurface feeding PTY bytes into alacritty term
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:10:49 +07:00
vasyansk 8d0b5b8d1d test(daemon): make socket/pty integration tests robust under parallel load
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:05:23 +07:00
vasyansk 4b1a544923 feat(daemon): entrypoint with single-instance lock and lazy socket bind
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 20:00:41 +07:00
vasyansk 531f89eb73 feat(daemon): socket server with router task, command dispatch, event fan-out (M0)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:59:58 +07:00
vasyansk 2aedc6924d feat(daemon): registry for workspaces and surfaces with idempotent open
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:58:28 +07:00
vasyansk 32560ea364 feat(daemon): surface actor owning pty + broadcast fan-out (M0, no grid)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:57:53 +07:00
vasyansk cd1fe1dfd5 feat(daemon): lifecycle paths, single-instance lock, stale-socket cleanup
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:57:11 +07:00
vasyansk 0b6de3d3b4 feat(pty): PtyHandle spawn/read/input/resize/kill over portable-pty
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:56:41 +07:00
vasyansk 482f693835 feat(proto): length-prefixed frame read/write with EOF handling
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:56:00 +07:00
vasyansk 0351efa2c6 feat(proto): envelope, commands, events, ids with serde round-trip tests
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:55:29 +07:00
vasyansk 31dddb3b6c chore: scaffold cargo workspace and crate skeletons
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:54:38 +07:00