You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# PR_26175_BRAVO_011 Idea Board Guest Save Auth Redirect
2
+
3
+
Date: 2026-06-24
4
+
5
+
## Scope
6
+
7
+
Require an authenticated API session before Idea Board save or persist actions. Guests may still browse the Idea Board, expand rows, and inspect notes. Guests are redirected to `account/sign-in.html` before any save/persist mutation.
8
+
9
+
## Review Findings
10
+
11
+
- PASS: ProjectInstructions and governance documents were reviewed before implementation.
12
+
- PASS: Initial branch was `main`, worktree was clean, and `main`/`origin/main` were synced at `dd7a3732e4225e42fe1033d37090abe179e6d5a5` before the PR branch was created.
13
+
- PASS: `toolbox/idea-board/index.html` delegates runtime behavior to `assets/toolbox/idea-board/js/index.js`.
14
+
- PASS: Existing auth/session helper is `getSessionCurrent()` from `src/api/session-api-client.js`, backed by the API session contract.
- PASS: Persisting Idea Board actions identified: idea save, idea delete, note save, note delete, create project, archive, and restore.
17
+
- PASS: Browse-only actions identified: loading the board, expanding/collapsing notes, filtering, starting/canceling edit rows, and opening existing project links.
18
+
19
+
## Implementation Summary
20
+
21
+
- Added one shared Idea Board write guard, `requireAuthenticatedWrite(root)`, using the existing API session helper.
22
+
- Applied the guard before every Idea Board mutation/write path: idea save, note save, idea delete, note delete, create project, archive, and restore.
23
+
- Preserved guest browsing by leaving load, filter, expand/collapse, and non-persist UI actions unauthenticated.
24
+
- Expanded Playwright coverage so guest add/edit/delete idea, add/edit/delete note, create project, archive, and restore actions redirect to sign-in before writes.
25
+
- Kept the implementation on the existing API contract; no browser product-data SSoT, fake login, localStorage/sessionStorage product data, or environment-specific branch was introduced.
- PASS: Runtime grep found no `localStorage` or `sessionStorage` use in Idea Board runtime HTML/JS.
39
+
- PASS: Runtime grep found no inline script/style/event-handler additions in Idea Board runtime HTML/JS.
40
+
- PASS: Focused Playwright guest redirect test passed.
41
+
- PASS: Focused Playwright Toolbox-to-Idea-Board launch test passed after filtering unrelated selected-game status polling from the no-write assertion.
42
+
- PASS: Playwright V8 coverage report includes `assets/toolbox/idea-board/js/index.js`.
43
+
- WARN: Bundled Playwright Chromium was missing and `npx playwright install chromium` stalled with a partial install; focused browser validation used installed Google Chrome through a temporary config that was removed after validation.
44
+
- WARN: Full legacy Playwright files still have unrelated expectation drift documented in the validation lane report.
45
+
46
+
## Recommended Next PR
47
+
48
+
Create a follow-up validation cleanup PR for existing Toolbox/Game Hub drift:
49
+
50
+
- Refresh `ToolboxRoutePages` expected tool counts, Game Hub route alias expectations, failed module-load assertions, and local dev port guard expectation.
51
+
- Refresh or repair the Game Hub expanded child-row summary expectation in `IdeaBoardTableNotes`.
| Guests may browse the Idea Board. | PASS | Playwright expands `top-thoughts` as a guest and remains on `toolbox/idea-board/index.html`. |
8
+
| Guests may not save creator-owned data. | PASS | Guest save/persist controls redirect before mutation. |
9
+
| Every save/persist action redirects unauthenticated users to `account/sign-in.html`. | PASS | Covered add/edit/delete idea, add/edit/delete note, create project, archive, and restore. |
10
+
| Redirect before any API write. | PASS | Guest create/archive/restore assertions reset and inspect create-game requests; no write request is sent before redirect. |
11
+
| All environments use the same API contract. | PASS | Uses existing `getSessionCurrent()` API session helper; no environment-specific branch added. |
12
+
| Do not introduce browser-owned product data. | PASS | No new browser persistence or product-data SSoT added. |
13
+
| Do not use localStorage/sessionStorage as product-data SSoT. | PASS | Runtime grep found no `localStorage` or `sessionStorage` in Idea Board runtime HTML/JS. |
14
+
| Do not introduce fake login behavior. | PASS | Runtime uses existing API session helper only; tests use repo test session endpoint. |
15
+
| No silent fallbacks. | PASS | API session verification failure blocks the write and reports status. |
16
+
| Use API terminology only. | PASS | New unavailable status uses API session terminology. |
17
+
| Keep PR limited to scope. | PASS | Runtime change is limited to Idea Board write gating; tests and reports cover the same scope. |
|`npx playwright test tests/playwright/tools/IdeaBoardTableNotes.spec.mjs --config=tmp/playwright-system-chrome.config.cjs --workers=1 --reporter=list -g "Idea Board guest write actions redirect to sign in before saving data"`| PASS | Guest redirects verified for all scoped write actions. |
14
+
|`npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs --config=tmp/playwright-system-chrome.config.cjs --workers=1 --reporter=list -g "Idea Board launches from Toolbox with accordion table notes model"`| PASS | Idea Board route and V8 coverage path exercised. |
15
+
|`npx playwright test tests/playwright/tools/IdeaBoardTableNotes.spec.mjs --config=tmp/playwright-system-chrome.config.cjs --workers=1 --reporter=list`| WARN | 3 passed, 1 failed in downstream Game Hub expanded-row expectation: expected 3 child rows, received 2 (`source-idea`, `readiness-output`). This is unrelated legacy drift. |
16
+
|`npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs --config=tmp/playwright-system-chrome.config.cjs --workers=1 --reporter=list`| WARN | 6 passed, 5 failed in unrelated toolbox metadata/route/local-port expectations. The Idea Board launch test passed. |
17
+
18
+
## Browser Setup Note
19
+
20
+
- WARN: Default Playwright Chromium was missing at `C:\Users\davidq\AppData\Local\ms-playwright\chromium-1217\chrome-win64\chrome.exe`.
21
+
- WARN: `npx playwright install chromium` stalled with only partial placeholder files and was stopped.
22
+
- PASS: Focused browser validation was rerun with installed Google Chrome through a temporary `tmp/playwright-system-chrome.config.cjs`, then the temp config and `tmp/test-results` were removed.
23
+
24
+
## Full-Suite Residual Failures
25
+
26
+
-`ToolboxRoutePages`: expected `Game Hub` route `/toolbox/game-workspace/index.html` not visible.
27
+
-`ToolboxRoutePages`: expected toolbox status counts `Planned (28)` and `Beta (6)`; actual `Planned (27)` and `Beta (8)`.
28
+
-`ToolboxRoutePages`: Game Crew route run recorded failed requests for shared toolbox metadata modules.
29
+
-`ToolboxRoutePages`: local dev port guard expected redirect to port `5501`; page remained on the ephemeral test server port.
30
+
-`IdeaBoardTableNotes`: Game Hub row expansion expected `summary`, `source-idea`, and `readiness-output`; rendered `source-idea` and `readiness-output`.
31
+
32
+
## Result
33
+
34
+
PASS: BRAVO_011 validation lane passed for scoped guest-save auth redirect behavior.
35
+
36
+
WARN: Broad legacy Playwright files are not fully green due to unrelated existing drift listed above.
0 commit comments