feat: move the app home from ~/.superset to ~/.paradev (SUPER-2985)
Stacked on #9157. Moves the app's per-machine home from ~/.superset to ~/.paradev at boot and drops every other mention of ~/.superset from the code (Linear SUPER-2985). Also bundles pdev 0.2.5.
The boot step (@superset/agent-setup/legacy-home-move, the only code that still names .superset)
Desktop main (app-environment.ts), host-service (serve.ts) and the CLI (commands/middleware.ts) run it before anything touches the home. When the process uses the default home and ~/.superset is still a real directory, it:
- stops host-services running from
~/.superset, by the pid in eachhost/<org>/manifest.json, and only when that pid's command line is a host-service (a manifest outlives a crash or reboot, so its pid may now be another program). They cache worktree paths, watch them and writehost.db. The pty daemon keeps running: its socket is in the temp dir keyed by org, so the next host-service adopts it and open terminals survive; - carries pdev's files already in
~/.paradev(agent/) into the old directory, refusing on a name clash; - renames
~/.supersetto~/.paradevand leaves a~/.supersetsymlink. The symlink covers older CLI and host-service builds and absolute paths inside worktrees (venvs, caches) that we cannot rewrite; - records the move in
legacy-home-move.jsonand links Claude Code's session folders under the worktrees' new paths, so/resumeand--continuekeep their history. Claude keys sessions by real path (measured). This covers every Claude config dir:~/.claude,CLAUDE_CONFIG_DIRentries and per-account dirs under home or~/.config, touching only dirs whoseprojects/holds old worktree entries.
Then host-service and the desktop rewrite the absolute paths in host.db and local.db (a no-op once applied) and run git worktree repair, so git and the DB agree. If a step fails, that run keeps using ~/.superset and the next boot tries again. If two processes race (desktop and CLI), the loser adopts the winner's move; if something recreates ~/.superset before the symlink lands, the move is kept. A custom SUPERSET_HOME_DIR (dev builds) is left alone, and the step never runs under a test runner.
Also
- The resolver is
SUPERSET_HOME_DIR, else~/.paradev. The env var keeps its name: installed agent hook configs call$SUPERSET_HOME_DIR/hooks/notify.sh(renaming it is SUPER-2988). - New projects default to
~/.paradev/projects. The agent wrappers skip~/.paradev/binas well as~/.superset/binwhen finding the real binary, so terminals opened before the move cannot recurse. - Golden-box cleanup strips both
~/.paradev/hostand~/.superset/hostwhile boxes roll over. - The CLI's tests now load the root test preload, which isolates the home. A shell-ready-evidence test that wrote into the real home is gone.
- pdev 0.2.5 (ParadevAI/router #16, #17) keeps everything in
~/.paradev/agentand leaves the rest of~/.paradevto the app. The bump also brings 0.2.3 (cloud mode behindPDEV_REMOTE_*, router stream retry). The pdev asset is uploaded to the sandbox CDN.
Verified
-
tscclean; agent-setup, cli, host-service and desktop suites pass (same onemainfailure as #9157). -
End to end on a scratch
HOMEwith the real code under Electron's Node (better-sqlite3is built for it): a git repo with a worktree under~/.superset, ahost.dbfromcreateDb, a live fake host-service, pdev files and a Claude session folder. After the step: moved, symlink in place, fake host stopped, pdev files kept,host.dbrewritten,git worktree listshows the new path andgit statusworks there, Claude folder linked, second run does nothing. -
In the dev desktop app, booted with
HOMEpointed at a scratch folder holding a copy of this worktree's dev data as~/.superset, pdev files in~/.paradev/agent, a git worktree under~/.superset/worktrees, a host.db row for it and a Claude session folder (dev URL scheme kept; the pty-daemon socket kept in a scratch run dir so it never met the real daemon):- first boot logged
Moved the app home, left~/.superset -> .paradev, opened local.db and all five orgs' host.db under~/.paradev; the host.db row andgit worktree listshowed the new path, the Claude folder was linked, pdev's file was kept; - signed in, created a project (default parent
~/.paradev/projects) and a worktree workspace from the composer; the worktree landed in~/.paradev/worktrees/...and its terminal ran there withSUPERSET_HOME_DIR=~/.paradevand~/.paradev/binfirst onPATH; - second boot did nothing, reopened the workspace, and the terminal session came back after the restart.
- first boot logged
Summary by CodeRabbit
- New Features
- The app now uses
~/.paradevas its default home and migrates existing data from~/.superset, updating saved project and worktree references. A compatibility link is created when possible. - Claude project sessions are linked to their corresponding locations after migration.
- New projects and worktrees now default to locations under
~/.paradev.
- The app now uses
- Updates
- The bundled pdev version is updated to 0.2.5, with support for macOS and Linux on arm64 and x64.