--- status: complete phase: 04-folders-sharing-quotas-document-ux source: 04-01-SUMMARY.md, 04-02-SUMMARY.md, 04-03-SUMMARY.md, 04-04-SUMMARY.md, 04-05-SUMMARY.md, 04-06-SUMMARY.md, 04-07-SUMMARY.md, 04-08-SUMMARY.md, 04-09-SUMMARY.md started: 2026-05-28T00:00:00Z updated: 2026-05-28T17:30:00Z completed: 2026-05-28T17:30:00Z --- ## Current Test [testing complete] ## Tests ### 1. Cold Start Smoke Test expected: Kill any running containers (docker compose down). Start fresh with docker compose up. PostgreSQL, MinIO, and FastAPI all start cleanly. Migration 0004 runs without errors (adds users.pdf_open_mode column, GIN FTS index, creates audit-logs MinIO bucket). Frontend dev server starts. Opening http://localhost:5173 shows the file manager (not a login issue or blank page) — or the login page if not authenticated. result: pass ### 2. File Manager as Home expected: Log in and navigate to http://localhost:5173/. The page renders the FileManagerView — a column-layout file browser showing "No folders yet" or a list of existing folders/documents. There is NO separate document card grid from the old HomeView. The URL stays at / (not redirected to /home or /folders). result: pass reported: "Saw file manager; login/logout works; can navigate through folders." ### 3. Create a Folder expected: From the file manager root (/), click "New folder". An inline input row appears in the file list. Type a name (e.g. "Work") and press Enter or click Save. The new folder row appears immediately in the list with an amber folder icon and the name you typed. No page reload. result: issue reported: "First it shows it twice and after reloading it shows it correctly once." severity: major fix: fetchFolders(null) assigned folders and rootFolders the same array reference; createFolder pushed to both, causing double-render. Fixed by spreading rootFolders = [...list] to break the alias. ### 4. Navigate into a Folder (breadcrumb) expected: Click the "Work" folder row. The URL changes to /folders/{id}. The breadcrumb at the top updates to show "Home > Work". The document area shows "This folder is empty" (or any docs moved there). Clicking "Home" in the breadcrumb returns to / and shows the root folder list again. result: pass ### 5. Upload a File into a Folder expected: Navigate into the "Work" folder. The DropZone is visible at the top of the content area. Drop or select a file. The upload progress bar appears and completes. After confirm, the file appears as a document row inside the "Work" folder — NOT in the root. result: pass ### 6. Move a Document to a Folder (hover action) expected: Hover over a document row. A folder-icon button appears. Click it. A dropdown lists available folders and "Root (no folder)". Click "Work". The document moves to "Work" folder. result: pass ### 7. Drag a Document onto a Folder expected: Drag a document row onto a folder row. The folder highlights amber. Drop it. The document disappears from the current list and appears inside the target folder. result: pass ### 8. Rename a Folder expected: Hover over a folder row and click the pencil icon. The name becomes an inline input. Edit and press Enter. The folder row updates immediately. result: pass ### 9. Delete a Folder expected: Hover over a folder row and click the trash icon. A confirmation modal appears. Click "Delete". The folder disappears from the list. result: pass ### 10. Share a Document expected: Hover over a document row and click the share icon. A ShareModal opens with a handle input. Type a handle and click Share. The user appears in the shared list. result: pass ### 11. Shared With Me View expected: Click "Shared with me" in the sidebar. The URL changes to /shared. Documents shared by others appear (or "Nothing shared with you yet"). result: pass ### 12. Search Within a Folder expected: Navigate into a folder with 2+ documents. Type 2+ characters. The list filters. Clearing or pressing Escape restores the full list. result: pass ### 13. Sort Controls expected: In a folder with multiple documents, click "Size". Documents re-sort. Clicking again reverses direction. Clicking "Name" switches to alphabetical. result: pass ### 14. PDF In-App Preview expected: Open a PDF document. It renders inline via /api/documents/{id}/content proxy — not a presigned MinIO URL. result: pass ### 15. Audit Log in Admin Panel expected: Log in as admin. Navigate to Admin panel. Click "Audit Log" tab. A paginated table of events appears with filters and CSV export. No passwords, document content, or credentials visible. result: pass ## Summary total: 15 passed: 14 issues: 1 skipped: 0 blocked: 0 pending: 0 ## Gaps - truth: "Creating a folder shows it once immediately, correct on reload" status: fixed reason: "User reported: first it shows it twice and after reloading it shows it correctly once" severity: major test: 3 fix: "folders and rootFolders shared array reference after fetchFolders(null); fixed by rootFolders.value = [...list]"