Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 12:20
· 637 commits to main since this release

The config file is now devsandboxes.toml, and it can be written in YAML too; an existing config.toml is renamed for you. Extra folders get their own worktree when someone else owns the checkout, rm --force clears out stuck instances, dispatchers can see which branches are in use, and the dashboard opens instantly and keeps its Inbox across restarts while putting far less load on dockerd.

Added

  • YAML configs. devsandboxes.yaml (or .yml) works in place of devsandboxes.toml: same keys, extends merging and validation, only the syntax differs. A sandbox hashes the same in either format, so converting a config doesn't mark instances for rebuild. Keep one config file per config dir; with more than one, devsandbox stops with an error.
sandbox:
  web:
    folder: ../web
    image: mcr.microsoft.com/devcontainers/base:ubuntu
    services: [database]
  • devsbd branches <sandbox> tells a dispatcher which branches are already checked out. It prints a JSON list of every branch in a worktree of the sandbox's repo and who holds it: one of the dispatcher's own children, another instance, the base checkout, or a worktree devsandbox doesn't know. It reads git on the host each time, so a git switch inside an instance is seen. With --ahead, each row also gets the number of commits origin doesn't have yet, and local branches that are ahead but not checked out are listed too. A dispatcher can use it to leave alone PRs that someone is working on locally. The sandbox must be in the dispatcher's spawn. Running dispatchers pick up the new helper when restarted.
devsbd branches web --ahead
  • rm --force (-f) removes an instance whatever state it's in. A worktree with uncommitted or untracked changes is removed anyway, changes discarded, instead of rm refusing. A step that fails (a worktree git won't remove, a repo the host refuses to run git in) prints a warning and rm carries on, so the instance still leaves the list. Whatever couldn't be removed stays on disk. The branch of a worktree that was left in place is kept. In the dashboard: :rm --force <instance>. npm: rm(name, { force: true }).
devsandbox rm --force web-2
  • The dashboard's Instances tree has a TYPE column when a sandbox is a dispatcher. Instances of a dispatcher sandbox read dispatcher, the others -. Without any dispatcher in the config the column isn't shown.

Changed

  • The config file is now devsandboxes.toml. An existing config.toml is renamed the next time devsandbox runs in its config dir (with a notice on stderr), and is read as-is until then. A config.toml with no sandbox, template or services table isn't a devsandbox config and is left alone.

  • Inbox times say how long ago a notification came in. The TIME column reads just now, 12s ago, 5 min ago, 3h ago, 1 day ago, … 6 days ago, then the date and time (Oct 2 14:32) once a notification is a week old. Before, it showed only the time of day, so yesterday's notifications looked like today's. The Detail pane shows the date and time.

  • folders entries get their own git worktree when the checkout belongs to someone else. If an extra folder is a git repo and it's another sandbox's folder, or another instance already mounts it, the instance now gets a worktree of it, detached at that checkout's HEAD. Before, the instance mounted the live checkout, so the owner switching branches changed what the instance saw. The worktree is kept across rebuild and removed by rm. Dispatcher children always get one. To keep the old live view for an entry, write it as a table with worktree = "never", or use "always" to force a worktree:

[sandbox.web]
folder = "../web"
folders = { "/workspaces/api" = "../api", "/workspaces/.shared" = { path = "../.shared", worktree = "never" } }
  • A sandbox's own folder now also gets a worktree when another instance mounts that folder directly as a folders entry.

  • The Inbox keeps its history. Notifications are saved in inbox.toml next to state.toml, so they survive closing the dashboard; d/D remove them from the file too. A notification with the same --key no longer replaces the earlier one: it becomes the head of a thread, with the older ones folded under it (→ to show them). With more than one instance sending, the Inbox groups them per instance, foldable like the Instances tree. The limit is now 200 notifications per instance (was 50, and 200 overall).

  • worktree-link no longer migrates old shared-files/<sandbox>/ stores. The automatic move only relinked the instance being run, so every other instance on the same repo was left with dangling links. A link into an old store is now skipped with a warning that shows where the file should go. Move it there, delete the old link, and rebuild.

  • The dashboard opens instantly and fills in as the runtime answers. The tree is drawn from state.toml and the config right away, statuses (… until then) arrive with the first container listing, and CPU/MEM after that. Before, the dashboard waited about 1.5s for docker stats and showed "no sandboxes defined" meanwhile.

  • The dashboard puts much less load on dockerd. CPU/MEM now refresh every 7s instead of every 2s (statuses still every 2s), the runtime version is asked once, and process lists are only fetched while the Instances tab is open. Instance drift is read from the container listing instead of two docker inspects per instance.

Fixed

  • Listing containers no longer makes dockerd compute their disk sizes. Every ls, ps, gc, autostart pass and dashboard refresh asked for container sizes as a side effect of the output format, which spiked dockerd's CPU every 2s while the dashboard was open and made each listing take ~300ms instead of ~20ms.

  • Opening VS Code no longer clears an instance's extensions. devsandbox vscode and the dashboard's o read the sandbox config from the current directory, not from the instance's own config directory. Run from anywhere else, the extensions list was rewritten as empty, so VS Code didn't install anything. They now read the instance's own config. If that config still can't be read, the list is left as it was. Instances already hit by this get their list back the next time you open VS Code from the new version.

  • An rm that failed partway can be retried. A worktree an earlier rm had already removed made the next rm fail too; it is now pruned instead.

  • The dashboard no longer warns about mount sources run creates itself. shared-volumes paths and per-instance mount sources that don't exist yet are made by run, so a sandbox with no instance no longer shows them as problems.

  • VS Code labels the primary workspace root by its folder name, matching the extra folders roots, instead of the instance name.

Commits
  • 3a63926 feat(config): read devsandboxes.toml (or .yaml/.yml) and rename a legacy config.toml, so the config file is recognizable on its own and can be written in yaml
  • b25563f feat(tui): show inbox times as how long ago, then date and time after a week, so older notifications don't pass for today's
  • 16e793a feat(tui): accept --force on the :rm prompt so the dashboard can remove instances the cli's rm --force can
  • 2b0bb63 feat(npm): let rm pass --force so node callers can remove instances with uncommitted changes or failed teardown steps
  • 647b127 feat(rm): add --force so an instance can be removed despite uncommitted worktree changes or failed teardown steps
  • aa50d82 docs(changelog): note the dashboard startup, dockerd load and type column changes
  • 3aacc06 perf(tui): collect stats every 7s, ask the runtime version once and fetch processes only on the instances tab to cut idle dockerd load
  • bff0cf7 perf(docker): list containers with an explicit ps template so the cli stops asking dockerd to compute every container's disk size
  • fe376b0 perf(tui): render the tree from state and config before asking the runtime, and read instance drift from ps labels instead of two inspects per instance
  • 376bdb6 fix(tui): show the tree right away on startup instead of a false 'no sandboxes' message while docker stats samples
  • 092958d fix(tui): size the services column to its content when type is shown so the type column sits beside it, not at the far edge
  • 8dcbfd2 fix(tui): stop warning about shared-volumes and per-instance mount sources that run creates before any instance exists
  • b0ad91f feat(tui): add a type column to the instances tree so dispatcher instances stand out from the ones they spawn
  • e7239b9 fix: update changelog and cleanup plan
  • 20d8f6a docs(dispatch): document devsbd branches in the automations guide, design and changelog so dispatcher authors know to check branch holders before acting
  • f2a9e43 feat(devsbd): expose the branches op as devsbd branches [--ahead] so dispatcher scripts can call it
  • 985f9ef feat(dispatch): add a read-only branches control op so a dispatcher can see which branches are checked out, and unpushed, before touching a PR
  • 1a723d4 docs(dispatcher): plan a devsbd branches op so dispatchers can tell which branches are in use
  • 2a485c4 fix(vscode): resolve extensions from the instance's config root and keep the registered ones when it can't be resolved, so opening from another directory no longer wipes them
  • 11081b9 feat(tui): persist the inbox and thread keyed notifications per instance
  • f655b58 fix(vscode): label the primary workspace root by its directory name, so it matches the extra folders instead of showing the instance name
  • 3975498 fix(rm): prune instead of remove a worktree a previous rm already removed, so an rm that failed later can be retried
  • deb0e1a fix(config): hash folders tables that restate the default like the plain string, so moving an entry to the table form isn't drift
  • c2acba2 docs(folders): document per-entry worktrees in the run design doc and changelog so the release notes explain the new default and the never opt-out
  • f756796 feat(rm): remove an instance's folders worktrees too, before the primary so an interrupted rm can be retried
  • 756df51 feat(run): give folders entries a detached worktree when another sandbox owns or already mounts the checkout, so its branch can't shift underneath the instance
  • 435549b feat(run): record folders mounts and decide per entry who owns the live checkout, so a direct extra mount also reserves it from other instances
  • 878e1e7 feat(config): accept { path, worktree } folders entries so each extra folder can opt in or out of its own worktree
  • 0997d43 fix(worktree): stop migrating old per-sandbox worktree-link stores, since moving the copy left every other instance's links dangling; old links are now reported for a manual move
  • 0467ffb docs(readme): lead with a theme-aware logo and a short pitch pointing at the docs site
  • c8be397 fix(site): space pages that open on prose from the article divider
  • b72fa8d docs(site): install skills via skills.sh in the quick start, style the agent prompt outside examples
  • 78d0afd docs(site): lead the quick start with the agent, move the cli walkthrough to going further
  • 61b2cdb chore(skills): hide repo-only skills from npx skills add
  • e750396 fix(site): center diagram arrowheads on their lines
  • 5ffe39b feat(site): pitch the CLI as low-level local tooling on the landing page, so readers see devsandbox can replace docker compose for agent-built stacks