# 0.3.0 — Automation archives and focused management

## Changes

- Replace the scattered definition cards with a list + detail panel. Each automation has Overview, Runs, and Configuration views with clearer typography and grouped schedule, usage, and session information.
- Separate Current and Archived automations. Archive pauses scheduling; Restore paused returns the automation to Current without enabling it. Archived definitions cannot run, be edited, or be enabled until restored.
- Add archive/delete confirmations that explain retained history and sessions. Workspace activity keeps the cross-automation timeline and recent run table.
- Advance revisions on archive/restore to reject stale clients while preserving an existing successful test when execution requirements are unchanged. Active or unconfirmed work blocks archive/restore. Restoring a non-archived automation is rejected rather than falsely reporting a paused schedule.
- Expose `archive` and `restore` through shared browser/chat management. List and inspect include archived definitions and their `archivedAt` timestamp.
- Keep selection stable across renames and reordered refreshes, so run/test actions continue targeting the selected automation. Preserve keyboard focus when opening run history and cancelling lifecycle confirmations.

## Compatibility and limits

Node.js **22.19+**, PI WEB **`^1.202610.9`**, and Pi coding agent **`^1.4.0`** remain required. The execution protocol and cooperative cancellation limits are unchanged.

**Session archive/delete is not implemented.** The supported host plugin API does not expose those operations. Sessions are retained, and confirmations make that limitation explicit. No private host APIs or direct session-file changes are used.

Deletion remains irreversible from management while retaining run history and session IDs. Previous deletions are not converted into reversible archives. Archived automation names remain reserved within their workspace. Run/session details are limited to loaded history; estimated cost totals still cover all retained runs.

## Storage and rollback

Opening the store upgrades schema **v1 to v2**, adding a separate archive timestamp while retaining definitions, runs, attempts, costs, and prior deletion markers. New stores also use v2.

**Back up the plugin's host-selected data directory before activating this version.** Take a consistent backup while the service is stopped, including any SQLite WAL files if present. Older plugin versions reject v2 databases; downgrading requires restoring the matching pre-upgrade backup, not merely reinstalling an older package. No manual SQL migration is required.

## Validation

The implementation received parallel independent lifecycle, UI/accessibility, and contract/test reviews. Follow-up fixes have regression tests for invalid restore, selection stability, and keyboard focus. `npm run verify` passes **200 tests**, typecheck, lint, build, distribution/package validation, and isolated production-only installation checks. Browser interactions are tested in happy-dom, not a live-browser visual acceptance pass. Consult the tagged GitHub Actions workflow for release-artifact validation.

## Upgrade

Install `@compn3rd/pi-web-automations@0.3.0` through the target machine's **Settings → Pi packages**, keeping the companion trusted/enabled and Automations plugin enabled. After backing up state, apply server changes at a safe operator-controlled restart, then reload the browser. Restarting interrupts active sessions and terminals. Publication itself does not restart services or migrate live state; migration happens when the updated plugin opens its store.
