Skip to content

IDE: fs/git/lsp protocol families, terminal-native panels, and the server KV store#85

Open
pcarrier wants to merge 2 commits into
mainfrom
fs
Open

IDE: fs/git/lsp protocol families, terminal-native panels, and the server KV store#85
pcarrier wants to merge 2 commits into
mainfrom
fs

Conversation

@pcarrier

@pcarrier pcarrier commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Server-owned state, streamed as ordered diffs, beyond the terminal grid — and an IDE built on it.

Protocol families: filesystem sync with CAS writes (FS_*, bit 6), git introspection (GIT_*, bit 7), language intelligence via server-terminated LSP (LSP_*, bit 8), and a host-local CAS KV store (KV_*, bit 9; docs/design/kv.md) — redb-backed, BLAKE3-128 preconditions, prefix watches.

IDE (js/ui): a left dock (Files / Commit log / Problems) that follows the focused pane's root and the terminal's cwd; editor/diff/commit tiles in BSP panes with drag-and-drop, per-pane nav history, and a background dock of read-only previews; a CodeMirror editor with CAS saves, autosave, LSP navigation, all chrome in the status bar, and a Ctrl+? shortcut overlay covering it all.

Live LSP: the editor streams its buffer to the server as the LSP byte source (LSP_BUFFER), so diagnostics, completion, and signature help track keystrokes instead of saves — CM6 autocomplete (Tab/Enter accept, Ctrl+Space explains itself when it can't answer) and an active-parameter tooltip, backed by two new query kinds (docs/design/lsp.md).

Server-side editor state: unsaved buffers park in the KV store and survive reload/crash/save-conflicts; every open tile gets a deterministic short id, so URL hashes are tile=conn:id instead of encoded assignments; declared workspace roots live in a CAS'd per-server document, shared by every client of that host.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

Coverage

Crate Lines Functions Regions
alacritty-driver 69.7% (698/1002) 72.0% (54/75) 71.7% (1050/1464)
browser 0.0% (0/807) 0.0% (0/65) 0.0% (0/1370)
cli 20.2% (1354/6707) 31.8% (184/579) 23.7% (2466/10427)
compositor 1.0% (93/9248) 2.0% (8/400) 1.2% (146/12403)
fonts 76.8% (486/633) 85.5% (47/55) 77.9% (922/1183)
fssync 88.2% (2597/2946) 87.8% (201/229) 88.5% (4556/5150)
gateway 25.5% (363/1423) 29.0% (36/124) 19.3% (451/2338)
git 82.9% (2030/2449) 85.1% (154/181) 83.0% (3333/4015)
lsp 76.6% (2262/2952) 79.6% (227/285) 74.2% (3522/4746)
proxy 19.4% (173/892) 21.3% (27/127) 21.4% (295/1381)
remote 88.4% (6834/7734) 91.5% (496/542) 86.1% (11323/13144)
sd-notify 72.8% (67/92) 100.0% (6/6) 82.4% (108/131)
server 23.8% (3208/13506) 37.4% (329/879) 25.6% (5440/21239)
ssh 1.9% (7/374) 3.2% (1/31) 0.7% (4/613)
upsidedown 31.4% (391/1247) 27.8% (55/198) 34.8% (797/2287)
webrtc-forwarder 2.7% (72/2624) 2.1% (4/187) 1.2% (50/4335)
webserver 59.6% (872/1464) 66.8% (143/214) 63.5% (1583/2491)
Total 38.3% (21507/56100) 47.2% (1972/4177) 40.6% (36046/88717)

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

🔗 Preview: https://blit-n89ed9tgj-indent.vercel.app

@pcarrier
pcarrier requested a review from jsegaran July 22, 2026 20:29
@pcarrier
pcarrier requested a review from mgasner July 22, 2026 21:11
@pcarrier pcarrier changed the title fs & git: filesystem state sync and git introspection fs, git & lsp: filesystem sync, git introspection, and language intelligence Jul 23, 2026
@pcarrier
pcarrier force-pushed the fs branch 2 times, most recently from 7d15061 to fe2e83c Compare July 24, 2026 17:28
pcarrier added a commit that referenced this pull request Jul 25, 2026
One squashed branch: the blit IDE grown from PR #85's fs/git/lsp
foundations, plus the server KV store that makes editor state
host-owned.

UI (js/ui):
- Left dock (Files / Commit log / Problems) as pure views over
  ref-counted IdeSessions; follows the focused pane's root and a
  terminal's live cwd (re-roots on cd outside, reveals inside).
- IDE tiles — editor / staged / unstaged / untracked / worktree diffs /
  commit — placed in BSP panes or the non-BSP view, always in the
  focused pane; drag-and-drop into any pane; per-pane back/forward
  navigation history; recoverable background dock with read-only
  zoomed-out previews; auto-backgrounding on displacement.
- CodeMirror editor: CAS saves with conflict/external-change banners,
  autosave on blur/hide/teardown, per-file cursor+scroll memory,
  on-demand language loading (@codemirror/language-data), LSP
  squiggles + F12/⇧F12/⌘-click navigation with re-establish retries.
- All tile chrome (filename, view switcher, dirty state, actions)
  lives in the status bar, not per-tile headers.
- Commit log renders the DAG; commit tiles show the full patch and
  jump into live files; diffs open the editor from the line gutter.

Server KV store (docs/design/kv.md; crates/remote kv codecs,
crates/server redb-backed store, js/core client surface):
- Host-local CAS byte map, BLAKE3-128 preconditions, prefix watches,
  budgets with refusal-over-eviction; FEATURE_KV bit 9, 0x70 opcodes.
- Consumers: parked dirty buffers (unsaved edits survive reload, crash,
  and save-conflicts, restored with the dirty flag), a tab registry
  giving every open tile a deterministic short id used by URL hashes
  (tile=conn:id, a=pane:t:conn:id — the encoded-assignment format is
  gone), and workspace roots moved out of the gateway config into a
  CAS'd per-server document (gateway list seeds it, then remains only
  for servers without the store).

Protocol/server also: FS_SEARCH fuzzy file search, git DAG log
pagination, LSP warm backends with the unified status discipline, and
the blake3_128 helper shared across stores.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pcarrier pcarrier changed the title fs, git & lsp: filesystem sync, git introspection, and language intelligence IDE: fs/git/lsp protocol families, terminal-native panels, and the server KV store Jul 25, 2026
pcarrier added a commit that referenced this pull request Jul 26, 2026
One squashed branch: the blit IDE grown from PR #85's fs/git/lsp
foundations, plus the server KV store that makes editor state
host-owned.

UI (js/ui):
- Left dock (Files / Commit log / Problems) as pure views over
  ref-counted IdeSessions; follows the focused pane's root and a
  terminal's live cwd (re-roots on cd outside, reveals inside).
- IDE tiles — editor / staged / unstaged / untracked / worktree diffs /
  commit — placed in BSP panes or the non-BSP view, always in the
  focused pane; drag-and-drop into any pane; per-pane back/forward
  navigation history; recoverable background dock with read-only
  zoomed-out previews; auto-backgrounding on displacement.
- CodeMirror editor: CAS saves with conflict/external-change banners,
  autosave on blur/hide/teardown, per-file cursor+scroll memory,
  on-demand language loading (@codemirror/language-data), LSP
  squiggles + F12/⇧F12/⌘-click navigation with re-establish retries.
- All tile chrome (filename, view switcher, dirty state, actions)
  lives in the status bar, not per-tile headers.
- Commit log renders the DAG; commit tiles show the full patch and
  jump into live files; diffs open the editor from the line gutter.

Server KV store (docs/design/kv.md; crates/remote kv codecs,
crates/server redb-backed store, js/core client surface):
- Host-local CAS byte map, BLAKE3-128 preconditions, prefix watches,
  budgets with refusal-over-eviction; FEATURE_KV bit 9, 0x70 opcodes.
- Consumers: parked dirty buffers (unsaved edits survive reload, crash,
  and save-conflicts, restored with the dirty flag), a tab registry
  giving every open tile a deterministic short id used by URL hashes
  (tile=conn:id, a=pane:t:conn:id — the encoded-assignment format is
  gone), and workspace roots moved out of the gateway config into a
  CAS'd per-server document (gateway list seeds it, then remains only
  for servers without the store).

Protocol/server also: FS_SEARCH fuzzy file search, git DAG log
pagination, LSP warm backends with the unified status discipline, and
the blake3_128 helper shared across stores.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pcarrier added a commit that referenced this pull request Jul 26, 2026
One squashed branch: the blit IDE grown from PR #85's fs/git/lsp
foundations, plus the server KV store that makes editor state
host-owned.

UI (js/ui):
- Left dock (Files / Commit log / Problems) as pure views over
  ref-counted IdeSessions; follows the focused pane's root and a
  terminal's live cwd (re-roots on cd outside, reveals inside).
- IDE tiles — editor / staged / unstaged / untracked / worktree diffs /
  commit — placed in BSP panes or the non-BSP view, always in the
  focused pane; drag-and-drop into any pane; per-pane back/forward
  navigation history; recoverable background dock with read-only
  zoomed-out previews; auto-backgrounding on displacement.
- CodeMirror editor: CAS saves with conflict/external-change banners,
  autosave on blur/hide/teardown, per-file cursor+scroll memory,
  on-demand language loading (@codemirror/language-data), LSP
  squiggles + F12/⇧F12/⌘-click navigation with re-establish retries.
- All tile chrome (filename, view switcher, dirty state, actions)
  lives in the status bar, not per-tile headers.
- Commit log renders the DAG; commit tiles show the full patch and
  jump into live files; diffs open the editor from the line gutter.

Server KV store (docs/design/kv.md; crates/remote kv codecs,
crates/server redb-backed store, js/core client surface):
- Host-local CAS byte map, BLAKE3-128 preconditions, prefix watches,
  budgets with refusal-over-eviction; FEATURE_KV bit 9, 0x70 opcodes.
- Consumers: parked dirty buffers (unsaved edits survive reload, crash,
  and save-conflicts, restored with the dirty flag), a tab registry
  giving every open tile a deterministic short id used by URL hashes
  (tile=conn:id, a=pane:t:conn:id — the encoded-assignment format is
  gone), and workspace roots moved out of the gateway config into a
  CAS'd per-server document (gateway list seeds it, then remains only
  for servers without the store).

Protocol/server also: FS_SEARCH fuzzy file search, git DAG log
pagination, LSP warm backends with the unified status discipline, and
the blake3_128 helper shared across stores.
Server-owned state, streamed as ordered diffs, beyond the terminal
grid — and an IDE built on it.

Protocol families: filesystem sync with CAS writes (FS_*, bit 6), git
introspection (GIT_*, bit 7), language intelligence via
server-terminated LSP (LSP_*, bit 8), and a host-local CAS KV store
(KV_*, bit 9; docs/design/kv.md) — redb-backed, BLAKE3-128
preconditions, prefix watches.

IDE (js/ui): a left dock (Files / Commit log / Problems) that follows
the focused pane's root and the terminal's cwd; editor/diff/commit
tiles in BSP panes with drag-and-drop, per-pane nav history, and a
background dock of read-only previews; a CodeMirror editor with CAS
saves, autosave, LSP navigation, all chrome in the status bar, and a
Ctrl+? shortcut overlay covering it all.

Live LSP: the editor streams its buffer to the server as the LSP byte
source (LSP_BUFFER), so diagnostics, completion, and signature help
track keystrokes instead of saves — CM6 autocomplete (Tab/Enter
accept, Ctrl+Space explains itself when it can't answer) and an
active-parameter tooltip, backed by two new query kinds
(docs/design/lsp.md).

Server-side editor state: unsaved buffers park in the KV store and
survive reload/crash/save-conflicts; every open tile gets a
deterministic short id, so URL hashes are tile=conn:id instead of
encoded assignments; declared workspace roots live in a CAS'd
per-server document, shared by every client of that host.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Explorer file operations (docs/design/fs-write.md FS_OP, which the
protocol and server already carried): a right-click menu with inline
create-file / create-folder rows, rename-in-place (slashes move, with
parent creation — rename and move are one op), a two-step delete, and
drag-a-row-onto-a-directory move. Creating a file opens its editor;
every result streams back through the watcher. Failures flash in the
panel.

Codec fix this surfaced: fsCompressLiteral emitted a bare size prefix
for empty input, but an LZ4 block needs one 0x00 token even for zero
output — lz4_flex rejects the bare form and the server dropped the
whole message, so empty-file writes (and LSP_BUFFER releases) vanished
silently.

Pane focus: cycling with Ctrl+[ / ] now stops the event outright (an
editor would also indent on non-mac, a terminal would forward ESC),
and focusing an editor pane focuses CodeMirror's editable content —
the comma-list selector returned the first match in document order,
which is the scroller, leaving the editor without keyboard focus or a
visible cursor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant