Skip to content

Extract Tab to New Workspace: the new co-tenant workspace is not persisted, so it and its tab vanish on restart #2735

Description

@sinelaw

Version: fresh 0.4.4 (built from origin/master @ f545a75ad), Linux, tmux 220×50.

0.4.4 adds co-tenant workspaces — Extract Tab to New Workspace ("Move the current tab into its own new workspace over the same project") — backed by the commit "Restore each co-tenant window to its own file on reboot." Extraction works live, but the newly-created co-tenant workspace is not written to disk on quit: only the source workspace persists, so the extracted workspace and the tab inside it are silently lost on the next launch.

Steps to reproduce

  1. Create a git project with two files:
    mkdir -p /tmp/cotenant && cd /tmp/cotenant && git init -q
    printf 'fn main() {}\n' > main.rs
    printf 'pub fn helper() {}\n' > lib.rs
    git -c commit.gpgsign=false -c user.email=t@t.co -c user.name=t add -A
    git -c commit.gpgsign=false -c user.email=t@t.co -c user.name=t commit -qm init
  2. Start clean and open both files as tabs:
    cd /tmp/cotenant && fresh --no-restore main.rs lib.rs
    Tab bar shows main.rs × lib.rs ×, with lib.rs active.
  3. Command Palette (Ctrl+P) → Extract Tab to New Workspace → Enter. Status: Extracted lib.rs into workspace <proj> (2). There are now two co-tenant windows over the same root.
  4. Confirm both windows exist: Ctrl+POrchestrator: Open → press Alt+I ("Show empty/1-file workspaces"). The list shows both <proj> (holding main.rs) and <proj> (2) (holding lib.rs). Close with Esc.
  5. Quit (Ctrl+PQuit).
  6. Relaunch and restore: cd /tmp/cotenant && fresh (no file args).
  7. Open Orchestrator: Open and press Alt+I again.

Expected behavior

Both co-tenant windows restore, each with its own tab — <proj> with main.rs and <proj> (2) with lib.rs — matching Fresh's own 0.4.4 commit "Restore each co-tenant window to its own file on reboot." (VS Code likewise restores both windows when you move an editor to a new window and reload.)

Actual behavior

Only one workspace survives. After step 5, exactly one workspace file is written under ~/.local/share/fresh/workspaces/ and it contains main.rs (the source workspace). The extracted co-tenant <proj> (2) holding lib.rs is never saved. After the restart in step 6, only the main.rs window exists; Alt+I shows no second workspace — the extracted workspace and its lib.rs tab are gone.

Reproduced 2/2 from a fully cleaned state (rm -rf ~/.local/share/fresh/workspaces/* ~/.local/share/fresh/orchestrator/*). Both co-tenants are single-file, so this is not the "hide 1-file workspaces" filter (the surviving main.rs workspace is also single-file); it is specifically the newly-extracted co-tenant that is dropped from persistence. If the extracted tab were an unsaved buffer, this would be data loss; even with saved files it silently discards the workspace arrangement the feature exists to create.

Workaround

None to preserve the arrangement across a restart. The underlying files are untouched on disk — reopen them and re-extract after each launch.


Search performed before filing (0 results each): extract tab workspace, co-tenant workspace extract restore, workspace not restored reboot orchestrator, co-tenant window persistence lost.

Filed by the automated black-box TUI QA agent (Run #59).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions