Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions docs/Features/Project-Persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Local project folder storage with continuous save by default, optional interval

- [Welcome Overlay](#welcome-overlay)
- [Storage Backends](#storage-backends)
- [Recent Projects](#recent-projects)
- [Project Folder Structure](#project-folder-structure)
- [Auto-Save](#auto-save)
- [Backup System](#backup-system)
Expand Down Expand Up @@ -90,6 +91,24 @@ The `ProjectFileService` facade routes all calls to the active backend:

---

## Recent Projects

Recent projects are tracked in browser storage and exposed through **File -> Open Recent**.

- Opening, creating, or renaming a project updates the recent-project list.
- FSA projects store browser `FileSystemDirectoryHandle` references in IndexedDB and keep lightweight metadata in `localStorage`.
- Native Helper projects store normalized project paths in `localStorage`.
- Selecting an FSA recent project re-requests read/write permission if the browser has dropped it.
- Missing or unreadable recent entries are removed when opening them fails.
- The list is capped at 12 entries and can be cleared from the Open Recent flyout.

Implementation:
- `src/services/project/recentProjects.ts` stores and normalizes recent metadata.
- `ProjectFileService.openRecentProject()` routes a selected entry to the FSA or Native backend.
- `Toolbar.tsx` renders the File menu flyout and listens for recent-project updates.

---

## Project Folder Structure

Projects are stored in a local folder you choose:
Expand Down Expand Up @@ -396,6 +415,13 @@ Temporary camera `NO KF` live offsets are intentionally not saved. They only aff
- Or File menu -> Open Project (`Ctrl+O`)
- Select folder containing `project.json`

### Open Recent
- File menu -> Open Recent
- Shows projects remembered by the browser from previous create/open/rename actions
- FSA entries reuse stored IndexedDB handles and may ask for folder permission again
- Native Helper entries reopen by stored path
- The flyout includes "Clear Recent Projects" for clearing the browser-side list

### Rename Project
- Double-click the project name in the toolbar
- Validates name (no special characters `<>:"/\|?*`)
Expand Down Expand Up @@ -484,8 +510,8 @@ If IndexedDB storage becomes corrupted, an error dialog appears automatically:
| Storage | Used For | Limits |
|---------|----------|--------|
| **Project Folder** | Project data, proxies, analysis, transcripts, cache, renders | Disk space |
| **IndexedDB** | File handles, media metadata, proxy frames (legacy), analysis cache, thumbnails | ~50MB |
| **localStorage** | App settings, autosave config, named/default dock layouts, dock layout fallback, Native Helper last project path | ~5MB |
| **IndexedDB** | File handles, recent FSA project handles, media metadata, proxy frames (legacy), analysis cache, thumbnails | ~50MB |
| **localStorage** | App settings, autosave config, named/default dock layouts, dock layout fallback, recent project metadata, Native Helper project paths | ~5MB |

---

Expand All @@ -495,6 +521,7 @@ If IndexedDB storage becomes corrupted, an error dialog appears automatically:
```
src/services/project/
+-- ProjectFileService.ts # Facade -- routes to FSA or Native backend
+-- recentProjects.ts # Browser-side recent project registry
+-- projectSave.ts # Store -> project format conversion + save
+-- projectLoad.ts # Project format -> store conversion + load
+-- projectLifecycle.ts # Create/open/close + auto-sync subscriptions
Expand Down Expand Up @@ -523,6 +550,7 @@ src/services/project/
| Service | File | Purpose |
|---------|------|---------|
| ProjectDB | `src/services/projectDB.ts` | IndexedDB for handles, media, proxies, analysis, thumbnails |
| RecentProjects | `src/services/project/recentProjects.ts` | Recent project metadata plus FSA handle keys |
| FileSystemService | `src/services/fileSystemService.ts` | File picker, handle cache, permission management |
| NativeHelperClient | `src/services/nativeHelper/NativeHelperClient.ts` | WebSocket + HTTP client for Native Helper |

Expand Down
3 changes: 2 additions & 1 deletion docs/Features/UI-Panels.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Dockable desktop panel system with an After Effects-style menu bar, unified clip

| Menu | Contents |
|------|----------|
| **File** | New Project, Open Project, Save, Save As, Project Info, Autosave, Clear All Cache and Reload |
| **File** | New Project, Open Project, Open Recent, Save, Save As, Project Info, Autosave, Clear All Cache and Reload |
| **Edit** | Copy, Paste, Settings |
| **View** | Panels submenu, Layouts submenu |
| **Output** | New Output Window, Open Output Manager, Active Outputs |
Expand All @@ -54,6 +54,7 @@ Dockable desktop panel system with an After Effects-style menu bar, unified clip

- **New Project** prompts for a project name and folder
- **Open Project** opens an existing project folder
- **Open Recent** shows browser-remembered projects and can clear that recent list
- **Save / Save As** follow the folder-based project model
- **Autosave** still exposes enable/disable plus 1, 2, 5, and 10 minute intervals for interval-save mode
- **Save Mode** itself lives in Settings -> General, and the default branch behavior is continuous save with a short debounce after changes
Expand Down
Loading
Loading