Skip to content

feat(studio): W03a Studio home ~/.lousho/studio + one-time legacy import - #1133

Merged
LinuxDevil merged 5 commits into
mainfrom
fb-w03a-studio-home
Nov 14, 2026
Merged

LinuxDevil merged 5 commits into
mainfrom
fb-w03a-studio-home

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Summary

  • Studio-global state (settings, secrets, Author sessions, spend log, inbox alerts, serve config, workspace registry) moves from the launch project's .lousho/ to a shared Studio home: LOUSHO_STUDIO_HOME when set (resolved absolute), else ~/.lousho/studio.
  • Workspace-local agent data (agents, chats, approvals, checkpoints, traces, build) stays under each workspace root's .lousho/ — unchanged.
  • StudioPaths gains legacyImports (<home>/legacy-imports.json); createApp/startStudioServer accept studioHome and default to defaultStudioHome().
  • LegacyImportService (new): detects a workspace's old project-level settings/secrets, copies only what the home lacks (originals never modified or deleted), and records per-workspace imported/skipped so repeat calls report handled state instead of copying twice.
  • New authenticated routes: GET/POST /workspaces/:ws/legacy-import, POST /workspaces/:ws/legacy-import/skip (409 LOUSHO_LEGACY_IMPORT_EMPTY when nothing remains); runtimeClient exposes legacyImportStatus/importLegacy/skipLegacyImport for the W03b banner.
  • Tests never touch a real home: vitest setup file gives each server test file a temp LOUSHO_STUDIO_HOME; tests asserting the old on-disk layout pass explicit studioHome; Playwright config gives the e2e server its own temp home.
  • Also fixes the pre-existing no-this-alias lint error in steerGate.ts that was failing npm run lint.

Test plan

  • npm run typecheck + typecheck:server clean
  • Focused: studioPaths (7), legacyImport (9), legacyImportRoutes (5), workspaceRoutes (13) — all pass
  • Full server suite: 144 files / 1704 tests pass
  • npm run lint: 0 errors (44 pre-existing warnings)
  • fallow dupes clean; health findings are repo-baseline churn noise
  • CI

Ticket: audit/forge-builder/tickets/p10-standalone/W03a-studio-home-and-legacy-import.md

Generated with Devin

Studio-global state (settings, secrets, Author sessions, spend log,
alerts, serve config, workspace registry) moves out of the launch
project's .lousho/ into a shared Studio home: LOUSHO_STUDIO_HOME when
set, else ~/.lousho/studio. Workspace-local agent data stays under each
workspace root's .lousho/.

- studioPaths gains defaultStudioHome() and a legacyImports path;
  createApp/startStudioServer accept studioHome and default to it.
- LegacyImportService reads a workspace's old project-level
  settings/secrets, copies only what the home lacks (originals never
  mutated), and records per-workspace imported/skipped state in
  legacy-imports.json so repeat calls report handled instead of
  copying twice.
- New authenticated routes: GET/POST /workspaces/:ws/legacy-import and
  POST .../skip; POST answers 409 when nothing is left to offer.
- runtimeClient exposes legacyImportStatus/importLegacy/skipLegacyImport.
- Tests get an isolated temp Studio home via a vitest setup file and
  explicit studioHome where they assert the old on-disk layout; the
  Playwright config gives the e2e server its own temp home.
- Fixes the pre-existing no-this-alias lint error in steerGate.ts.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@LinuxDevil
LinuxDevil merged commit 63975a3 into main Nov 14, 2026
6 checks passed
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.

1 participant