Skip to content

feat(workspace): add lifecycle controller #52

Description

@decode2

Preflight checks

  • I searched open and closed issues and found no duplicate.
  • I understand a maintainer must add status:approved before work begins or a pull request is opened.

Problem

Workspace profiles are persisted, but the core has no platform-neutral controller for coordinating workspace, tab, and terminal-session lifecycle across create, select, update, close, restart, and process recovery. Without durable lifecycle intent, retries after session or persistence failures can orphan sessions, double-close them, lose tab identity, or incorrectly report success.

Proposed solution

Add an injected session-lifecycle port and a WorkspaceController in splice-core. Persist the minimum start/close intent needed to make lifecycle operations idempotent across controller reconstruction; expose stable four-field error contracts (code, message, platform, retryable); preserve workspace isolation; attempt all profiles during recovery while returning the first structured failure. Keep this slice platform-neutral with no Tauri command registration or desktop UI.

The implementation is PR11a of the 17-PR stacked-to-master delivery chain and completes SDD task 4.2a. PR11/task 4.2b is the next slice. The maintainer-approved size:exception covers 1,062 additions across exactly four files because the lifecycle controller and its failure-semantics tests form one rollback-safe work unit; splitting code from these tests would make the review and rollback boundary unsafe.

Affected area

Desktop backend (Rust)

Alternatives considered

Keeping lifecycle state only in memory fails across process/controller reconstruction. Splitting tests from implementation violates the work-unit boundary. Tauri/UI wiring is intentionally deferred to task 4.2b.

Additional context

Approved native review: review-669bd35827f792b8 (candidate97b59f...). SDD verification passed with warnings: the unchanged Linux desktop differential baseline remains 23/24 because the Windows-only command returns UnsupportedPlatform; no Tauri/UI behavior is changed here. Rollback is the exact four-file projection: remove workspace_lifecycle.rs and its integration test, then revert the exports and profile lifecycle persistence fields/store listing additions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:approvedApproved by a maintainer for implementationtype:featureAdds or improves functionality

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions