Skip to content

RFD-087: Session-Scoped Active Workspace #793

Description

@JeanMertz

Tracking issue for RFD-087: Session-Scoped Active Workspace.

This issue tracks the progress towards the complete implementation of RFD-087.

Tasks

  • Phase 1: Replace the storage symlink with the per-root registry directory (~/.local/share/jp/workspace/<id>/roots/<root-key>.json)
  • Phase 1: Resolve -w <id> against the roots registry (one live root → use it; many → picker/error; none → error)
  • Phase 1: Derive root liveness via the same-ID check (<root>/.jp/.id equals <id>)
  • Phase 1: Seed the roots registry from any legacy storage symlink on first bootstrap
  • Phase 2: Move session resolution ahead of workspace construction in jp_cli
  • Phase 2: Add the jp_cli bootstrap step that selects the concrete checkout root
  • Phase 2: Establish the workspace-root-as-child-cwd invariant for from-anywhere runs
  • Phase 2: Add per-command workspace bootstrap requirement (none / resolve / load), analogous to conversation_load_request
  • Phase 3: Add the user-global session store (~/.local/share/jp/sessions/<source-key>.json) with history-shaped records mirroring RFD 020
  • Phase 3: Implement jp w use ? (picker), jp w use cwd (clear selection), jp w ls, and jp w show with the shared WorkspaceTarget grammar
  • Phase 3: Implement jp q-from-anywhere resolution (global session → workspace root → per-workspace conversation → run)
  • Phase 3: Implement source-split cleanup rules (getsid/Hwnd process-liveness; Env existence-based via workspace-ID liveness)
  • Phase 4: Implement the interactive precedence ladder (explicit -w → sticky → conflict prompt → cwd → session-active → picker)
  • Phase 4: Implement the cwd-vs-active conflict prompt (c/C/a/A/q)
  • Phase 4: Implement persisted sticky (A) state on the session record and clearing via jp w use cwd
  • Phase 4: Implement non-interactive mode rule (ignore session-active workspace; error without explicit -w or cwd workspace)
  • Phase 4: Implement reprompt-on-missing-root (recover via stored workspace_id, expand roots registry, re-prompt among live checkouts)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions