TASK-003 Add secure assigned-folder browsing

This commit is contained in:
rob
2026-11-25 20:54:05 +00:00
parent 549f11d9f4
commit 68335d629b
14 changed files with 520 additions and 300 deletions
+26 -4
View File
@@ -1,9 +1,31 @@
# Foldershare handoff
Updated 2026-11-25. Captain accepted TASK-002 on 2026-11-07 and authorized committing it from `.worktrees/TASK-002` and integrating it locally into `codex` on 2026-11-25.
Updated 2026-11-25. **TASK-003 is Complete.** Captain accepted the task and authorized a local commit and merge into `codex`.
TASK-002 supplies the authorization and filesystem boundaries. Integration checks passed for ten API tests, Python syntax, the frontend production build and whitespace. The frontend lint script requires a missing ESLint configuration. Existing accounts with a `NULL` login flag are denied access, and existing host-absolute assignments need admin reassignment.
The implementation came from `.worktrees/TASK-003` on `task/TASK-003-secure-browsing`, based on `codex` at `549f11d`. It adds assigned-folder browsing, preserves the admin-only picker, and publishes virtual file references for TASK-004. See `DECISIONS.md` for the API contract.
Captain selected TASK-003 for briefing. It remains Accepted. Use the merged `codex` tip as the proposed base for `task/TASK-003-secure-browsing` in `.worktrees/TASK-003`, subject to approval when Captain engages the task. Reuse TASK-002's virtual roots and media containment for authenticated browsing. Preserve the admin-only folder picker and existing browser styling. Define the browse response and its stable file reference for TASK-004 during implementation.
## Repeatable browser check
Validate browse access and failure states with disposable media and user fixtures, then verify the browser flow for assigned, unassigned and admin users. TASK-007 has a separate manual-test adapter awaiting Captain validation. Its integration or use for a later handoff is a separate decision.
From the primary repository root, launch the exact candidate with the TASK-007 adapter. Both loopback ports 5502 and 5503 must be free.
```bash
PATH="$HOME/.local/bin:$PATH" ./.worktrees/TASK-007/scripts/testtask.sh 003
```
Choose Firefox and use the disposable accounts and password printed by the launcher at `http://127.0.0.1:5503/`. The adapter starts with `sample.txt` at the assigned root. To exercise nested and empty-folder navigation, add fixtures in a second terminal from the primary root after the adapter reports readiness.
```bash
task_run=$(cat .worktrees/TASK-007/.test-worktrees/task-003/.testtask-owner) &&
mkdir -p -- "$task_run/media/friends/Series/Season 1" "$task_run/media/friends/Empty" &&
printf 'Disposable QA fixture\n' > "$task_run/media/friends/Series/Season 1/episode.txt"
```
1. Sign in as `friend`. Open `Series`, then `Season 1`. Check that the file appears, use the breadcrumb and parent button, then open `Empty` and confirm the empty message.
2. Sign in as `unassigned` and confirm the no-access message.
3. Sign in as `captain`, open **Users**, select `friend`, and verify that the assignable-folder tree opens at the assigned folder and navigates back to the media root.
Stop the owned test session using Ctrl-C in its terminal. The adapter removes the disposable snapshot and fixtures. A new run captures the current task changes.
## Validation
All 15 API tests, Python syntax, production frontend build and whitespace checks passed again before integration. The build and tests retain existing Sass and datetime deprecation warnings. ESLint configuration is absent. Headless Chromium previously verified the disposable candidate at widths of 1280 and 375 pixels, including keyboard navigation, share outage and retry, a removed folder, unassigned access, and admin folder navigation. The header's existing `/logo.png` asset is missing. The adapter's cold startup can time out while Vite and Firefox start together. Agent QA delayed Firefox startup and verified adapter readiness and cleanup. TASK-007 still awaits separate Captain acceptance.