Skip to content

feat: allow unarchiving dashboard resources - #232

Merged
massimoalbarello merged 2 commits into
mainfrom
codex/dashboard-unarchive-resources
Oct 25, 2026
Merged

massimoalbarello merged 2 commits into
mainfrom
codex/dashboard-unarchive-resources

Conversation

@massimoalbarello

@massimoalbarello massimoalbarello commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Why

Archiving preserves entities, pages, and assets, but the dashboard provides no way to recover them when an agent archives one by mistake. This builds on merged #233, which reset the disposable change log and prepared the unarchived history action.

How

Add independent status and visibility filters to all three collections. All options stay selectable, and Archived + Public shows the normal empty result. Archived resources remain read-only, with Unarchive available only in full detail. Blocked attempts and request errors use a dismissible dialog matching publication feedback.

Restoration checks archived dependencies, preserves content and revisions, rebuilds portrait references, and records an unarchived event with a success notification. Future archives retain their search indexes; older missing indexes are neither rebuilt nor backfilled. The change-log reset is already in main through #233.

@massimoalbarello
massimoalbarello force-pushed the codex/dashboard-unarchive-resources branch from f67418b to 9cdeabb Compare October 25, 2026 14:08
@massimoalbarello
massimoalbarello changed the base branch from main to codex/reset-resource-history October 25, 2026 14:08
massimoalbarello added a commit that referenced this pull request Oct 25, 2026
## Why

Dashboard recovery in #232 needs an explicit unarchived history event,
but the deployed change-log constraint rejects it. SQLite cannot extend
that constraint with ALTER TABLE. For this upgrade, existing change
history is disposable, so we deliberately start a fresh log instead of
copying old history into a replacement table.

## How

Add migration 0016 to drop and recreate resource_change and its index
with unarchived allowed. Deploying this migration deletes all existing
change history on the instance; entities, pages, assets, records, and
revisions are retained. The migration runs transactionally once, and
subsequent startups preserve newly recorded events.

Expose the action in the history API and UI so #232 can record
restorations. Keep applied migrations and the migration runner
unchanged, and update the compatibility policy to protect deployed
schemas while allowing breaking API changes.
Base automatically changed from codex/reset-resource-history to main October 25, 2026 14:46
@massimoalbarello
massimoalbarello force-pushed the codex/dashboard-unarchive-resources branch from 9cdeabb to f562516 Compare October 25, 2026 14:48
@massimoalbarello
massimoalbarello merged commit 31b7e49 into main Oct 25, 2026
10 checks passed
@massimoalbarello
massimoalbarello deleted the codex/dashboard-unarchive-resources branch October 25, 2026 19:14
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