Skip to content

Per-worktree dev-server isolation: port injection, data dirs, app identity #250

Closed

Description

@currentbits

Inspired by Conductor's per-workspace run environments and Emdash's $EMDASH_PORT injection.

Parallel worktrees running the same app collide on ports, data dirs and app identifiers. Give each thread's dev server an allocated port (injected as an env var), a per-worktree data dir, and optionally a distinct app name/icon so two instances of the same app can run side by side. Conductor's 'Spotlight testing' (one heavy app instance hot-switching which worktree it serves) is a nice stretch goal. Builds on the devservers feature and #188 (per-project env vars).

Activity

  1. added
    enhancement
    plan:todo
    on Aug 17, 2026
  2. currentbits commented on Aug 17, 2026

    @currentbits
    OwnerAuthor

    Deep-dive detail (Conductor Spotlight testing): the alternative to per-worktree servers — sync a selected worktree's changes into the repo root so ONE dev server hot-swaps which branch it serves. Per-repo opt-in. Their most distinctive workflow feature.

  3. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Research note (Conductor Cloud Polish #2): cloud workspaces now detect listening ports automatically and suggest them for port forwarding. Auto-detection beats allocation bookkeeping when it works — worth evaluating as the discovery layer on top of the port allocator.

  4. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Round 23 intel: two vendors shipped the access half of dev-server isolation. Amp's Portals into Orbs (2026-08-06): try the agent's changes to your app in the remote environment, with live reloading. Factory's droid computer port-forward (v0.167.0): forward ports from the agent's machine to yours. For local-first Solenta the primitive is simpler but the UX bar is the same: each worktree's dev server gets a deterministic port (#250 port injection), and the thread UI offers one click to open that port in the preview (#155) or forward it. The live-reload detail matters: the portal shows the app updating as the agent works, which doubles as a progress signal.

  5. added
    plan:doing
    plan:done
    and removed
    plan:todo
    plan:doing
    on Sep 7, 2026
  6. currentbits commented on Sep 8, 2026

    @currentbits
    OwnerAuthor

    Ports were already portBase+n on laneEnv. Remainder landed: per-lane data dirs (SOLENTA_DATA_DIR + XDG_, win32 APPDATA) and app identity (SOLENTA_APP_NAME / ICON) via electron/worktreeEnv.js, wired through devserver:start. Two claimed lanes of the same app no longer share a profile env. Promote stays git.mergeWorktree. Recycle is not a closer. Spotlight hot-swap remains a stretch and was not in this slice. Apps must honor SOLENTA_ / XDG_* — Electron/Chromium children that ignore those still share cookies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions