Skip to content

feat(core): restore session archiving - #53759

Open
Brendonovich wants to merge 1 commit into
v2from
session-archive
Open

Brendonovich wants to merge 1 commit into
v2from
session-archive

Conversation

@Brendonovich

Copy link
Copy Markdown
Member

Summary

Restores session archiving to the V2 API. V1 supported archiving through session updates, but V2 only exposed the stored time.archived value and had no way to set or clear it.

  • PATCH /api/session/:sessionID accepts archived: boolean. true archives the session, false restores it, and repeating the current state is a no-op.
  • GET /api/session accepts an optional archived filter. true returns only archived sessions, false excludes them, and omitting it keeps the current behavior of returning both. Pagination cursors preserve the filter.
  • New durable session.archived and session.unarchived events project the archive timestamp. Archiving and unarchiving also update time.updated.
  • The Solid data store applies both events to cached session info.
  • Session rows now treat only null as unarchived, so an archive timestamp of 0 is preserved.

Testing

  • bun run check
  • packages/core: bun test test/session-archive.test.ts
  • packages/server: bun test test/session-update.test.ts
  • packages/schema: bun test test/event-manifest.test.ts

This branch has not been deployed

No deployments
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