-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
TL;DR
When saving a slideshow with no writable targetId (e.g., pasted/imported content), auto-generate a writable file in the default data directory instead of blocking.
Context
Depends on PER-38 (basic save infrastructure + provenance). This is Phase 3 of the persistence feature.
Scope
- Slug generation utility (slideshow title →
my-slideshow.json) - Server auto-creates file when
targetIdis null - Collision avoidance (suffix if file exists)
- Response includes resolved
targetIdso client can update provenance
Implementation
// In FS adapter save()
if (!targetId) {
const slug = slugify(slideshow.title || 'untitled');
const targetPath = await findAvailablePath(dataDir, slug);
// ... save to targetPath
// Return resolved targetId in response
}Acceptance Criteria
- Pasted/imported slideshows can be saved without manual target selection
- Generated filename is human-readable (slugified title)
- Collisions handled gracefully (e.g.,
my-deck-1.json,my-deck-2.json) - Client provenance updated with resolved
targetIdafter save - Subsequent saves go to the same file
References
- Parent feature: PER-38
- Issue spec
Reactions are currently unavailable