M27: VS Code blocks (an editor on any pane's machine) #42

Closed
opened 2026-10-02 05:20:27 +00:00 by jhgaylor · 1 comment
Owner

Depends on: #41
Blocks: #43 (for "Open here")

Swarm track: editors. A VS Code you can open in any pane's directory, on that pane's machine, drawn as a block.


  • Starting it:
    • "Open in editor" on a pane's menu, the swarm, and illogical edit [path] start the server chosen by S17 on the pane's machine (this host, another host, or a wisp sandbox), in the pane's cwd, and show it as a browser block (M6a);
    • one server per machine and user, shared by all of that machine's editor blocks, stopped after an idle timeout;
    • it binds to localhost only and is reached through the daemon's existing port path, so the daemon's access checks (M12) are its only auth.
  • Restoring: an editor block comes back after a daemon restart or reboot (M2), with its folder and open file, by asking the server to reopen them.
  • In the swarm:
    • an editor block reports kind editor, its project and its active file (M23);
    • its tile's preview is a screenshot of the block or the lines around its cursor, whichever S17 found cheaper.
  • Settings and extensions: a settings folder per user that survives restarts, extensions from Open VSX, and the illogical theme by default.
  • Done when:
    • from the phone, opening crates/control/src/auth.rs on geek takes under 3 s once the server is warm;
    • the block survives a daemon restart with the file still open;
    • a viewer without write access (M14) can't open one.
**Depends on:** #41 **Blocks:** #43 (for "Open here") *Swarm track: editors. A VS Code you can open in any pane's directory, on that pane's machine, drawn as a block.* -------- - **Starting it:** - "Open in editor" on a pane's menu, the swarm, and `illogical edit [path]` start the server chosen by S17 on the pane's machine (this host, another host, or a wisp sandbox), in the pane's cwd, and show it as a browser block (M6a); - one server per machine and user, shared by all of that machine's editor blocks, stopped after an idle timeout; - it binds to localhost only and is reached through the daemon's existing port path, so the daemon's access checks (M12) are its only auth. - **Restoring:** an editor block comes back after a daemon restart or reboot (M2), with its folder and open file, by asking the server to reopen them. - **In the swarm:** - an editor block reports kind `editor`, its project and its active file (M23); - its tile's preview is a screenshot of the block or the lines around its cursor, whichever S17 found cheaper. - **Settings and extensions:** a settings folder per user that survives restarts, extensions from Open VSX, and the illogical theme by default. - **Done when:** - from the phone, opening `crates/control/src/auth.rs` on geek takes under 3 s once the server is warm; - the block survives a daemon restart with the file still open; - a viewer without write access (M14) can't open one.
Author
Owner

Done: merged as 455b264 (Merge M27). PLAN.md: M27 section.

  • New editor block: VS Code (code-server 4.140.0, pinned with SHA-256s, downloaded on first use) on a pane's machine (this host over a 0600 Unix socket, or a wisp VM), served through the block-site proxy, owner only. One server per machine, stopped when idle.
  • Opened from Open in editor, from the swarm (tile or card), and with illogical edit PATH[:LINE] [--machine]. It shows in the swarm as kind: editor with its file; hover shows the lines around the cursor.
  • The file and line come back after a daemon restart and after code-server dies.
    Tests: crates/daemon/tests/editors.rs (stand-in code-server) and web/e2e/editors.spec.ts with the real code-server: file to line in 1.4 s on desktop and 1.9 s on a phone-sized page. editors-vm.spec.ts passes against wisp. CI green on both runners (706, 707).
    Not covered: real reboot, a real phone (both on #55 Needs Jake), running on a Mac, cursor following inside a VM. Filed #61 and #62.
Done: merged as 455b264 (Merge M27). PLAN.md: M27 section. - New `editor` block: VS Code (code-server 4.140.0, pinned with SHA-256s, downloaded on first use) on a pane's machine (this host over a 0600 Unix socket, or a wisp VM), served through the block-site proxy, owner only. One server per machine, stopped when idle. - Opened from *Open in editor*, from the swarm (tile or card), and with `illogical edit PATH[:LINE] [--machine]`. It shows in the swarm as `kind: editor` with its file; hover shows the lines around the cursor. - The file and line come back after a daemon restart and after code-server dies. Tests: crates/daemon/tests/editors.rs (stand-in code-server) and web/e2e/editors.spec.ts with the real code-server: file to line in 1.4 s on desktop and 1.9 s on a phone-sized page. editors-vm.spec.ts passes against wisp. CI green on both runners (706, 707). Not covered: real reboot, a real phone (both on #55 Needs Jake), running on a Mac, cursor following inside a VM. Filed #61 and #62.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jhgaylor/illogical#42
No description provided.