Skip to content

dor list: one unified Surface listing#234

Merged
nedtwigg merged 2 commits into
mainfrom
dor-list
Jul 9, 2026
Merged

dor list: one unified Surface listing#234
nedtwigg merged 2 commits into
mainfrom
dor-list

Conversation

@nedtwigg

@nedtwigg nedtwigg commented Jul 8, 2026

Copy link
Copy Markdown
Member

Replaces the hodgepodge of listing commands (dor list-panes, dor list-pane-surfaces, dor identify) with a single native dor list, and folds in the existing port-discovery engine.

What it does

dor list lists every Surface in the current Workspace — terminals and browser Surfaces, including minimized ones — one row per Surface in surface:N order.

  • Text: * marks the focused Surface, (you) marks the calling terminal; columns are type, view (paned / zoomed / minimized), location (cwd for terminals, URL for browser Surfaces), and title, with [ringing] / [todo] tags.
  • --ports: folds in port discovery — the host calls PlatformAdapter.getOpenPorts per terminal Surface in parallel (filter-before-fetch, terminal-only), degrading to none on remote/unsupported/error. Opt-in because it shells out per pane.
  • --json: adds the identity dump dor identify used to print — top-level caller_surface_ref / focused_surface_ref (null when the caller/focus isn't in the list) and a host block (app, workspace, cli_js_path, node_path). Never the private control socket.

Host changes

surface.list now includes minimized (doored) Surfaces via a dedicated buildDorSurfaceListdor targeting (split/kill/send/read via buildDorSurfaces) stays visible-only, so listing sees more without changing what you can act on. Each Surface is enriched with view / cwd / activity / command / url / ringing / todo (surfacing the cwd that was computed-but-unused), and ports are attached in the handler when requested.

Scoped out (staged in the spec's Future)

  • Workspace scope (--all / --workspace / --workspaces) — waits on the workspaces rollout; today dor list shows the single active Workspace. The host asymmetry (standalone mounts one Workspace at a time; VS Code puts each in a separate webview) is recorded so --all isn't mis-scoped later.
  • Type/state filters (--type, --running, --alert).
  • Unifying with the phone's DirectoryEntry projection — left as a parallel projection with a drift-warning comment.

Testing

  • dor CLI: full text/JSON/--ports/--id-format/caller/no-env behavior is snapshot-tested end-to-end (64 tests pass).
  • lib: typechecks clean; Wall targeting tests (split/kill) pass with the refactored builder.
  • Spec (docs/specs/dor-cli.md) updated to match; pnpm lint:specs passes.

🤖 Generated with Claude Code

nedtwigg and others added 2 commits July 8, 2026 13:23
…dgepodge

Replace the cmux-shaped `dor list-panes` / `dor list-pane-surfaces` and the
JSON-only `dor identify` with a single native `dor list`. It lists every
Surface in the current Workspace — terminals and browser Surfaces, including
minimized (doored) ones — one row per Surface in `surface:N` order.

- Text marks the focused Surface with `*` and the calling terminal with
  `(you)`, and shows type, view, location (cwd / URL), title, and
  `[ringing]` / `[todo]` tags.
- `--ports` folds in the existing port-discovery engine: the host calls
  `PlatformAdapter.getOpenPorts` per terminal Surface, in parallel, degrading
  to none on remote/unsupported/error. Opt-in because it shells out per pane.
- `--json` folds in the identity dump `dor identify` used to print:
  top-level `caller_surface_ref` / `focused_surface_ref` and a `host` block
  (app, workspace, cli_js_path, node_path) — never the private control socket.

Host: `surface.list` now includes minimized Surfaces via a dedicated
`buildDorSurfaceList` (targeting via `buildDorSurfaces` is unchanged), enriches
each Surface with view/cwd/activity/command/url/ringing/todo (surfacing the cwd
that was computed-but-unused), and attaches ports when requested. Workspace
scope and type/state filters are staged in the spec's Future.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Merge the adjacent ref/pane_ref conditional spreads in renderSurfaceJson.
- Precompute the location column in renderListText (was derived twice per row).
- Drop the dead `?? createTerminalPaneState()` fallback on the total `states` map.
- Move `browserUrlFromParams` into browser-surface.ts, the param-classification
  SSOT, instead of a private helper in Wall.tsx.
- Note that buildDorSurfacesInternal is a parallel projection to the phone's
  DirectoryEntry so the shared field derivations are kept in sync.

Kept the two buildDorSurfaces/buildDorSurfaceList wrappers: the named split
keeps targeting from ever seeing minimized Surfaces, and the includeMinimized
axis will generalize to a scope param when workspaces land.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: b11d0ce
Status: ✅  Deploy successful!
Preview URL: https://7bf681fb.mouseterm.pages.dev
Branch Preview URL: https://dor-list.mouseterm.pages.dev

View logs

@nedtwigg nedtwigg merged commit 0e986f0 into main Jul 9, 2026
9 checks passed
@nedtwigg nedtwigg deleted the dor-list branch July 9, 2026 00:19
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.

2 participants