Skip to content

Commit dd7a373

Browse files
authored
Merge pull request #150 from ToolboxAid/PR_26175_ALFA_018-alfa-idea-board-polish-consolidation
PR_26175_ALFA_018: consolidate Alfa Idea Board polish runtime changes
2 parents 62bebe2 + 8a13929 commit dd7a373

5 files changed

Lines changed: 176 additions & 146 deletions

File tree

assets/toolbox/idea-board/js/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ function previousStatusForRestore(record) {
129129
: "Refining";
130130
}
131131

132+
function isEditableStatus(status) {
133+
return editableStatusOptions.includes(status);
134+
}
135+
132136
function rememberPreviousStatus(record) {
133137
if (record.status !== "Archived") {
134138
record.previousStatus = record.status;
@@ -436,7 +440,7 @@ function saveIdeaRow(root, row) {
436440
const idea = row.querySelector("[data-idea-board-idea-input]")?.value.trim();
437441
const pitch = row.querySelector("[data-idea-board-pitch-input]")?.value.trim();
438442
const status = row.querySelector("[data-idea-board-idea-status-input]")?.value;
439-
if (!idea || !pitch || !status) {
443+
if (!idea || !pitch || !isEditableStatus(status)) {
440444
updateStatus(root, "Enter an idea, pitch, and status before saving.");
441445
return;
442446
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# PR_26175_ALFA_018 - Alfa Idea Board Polish Consolidation
2+
3+
## Executive Summary
4+
5+
PASS - Consolidated the remaining current-main-safe Alfa Batch D Idea Board status dropdown guard.
6+
7+
Current `main` already contained the #114, #115, and #116 structural work: the status filter is in the left accordion, the Idea Board parent table no longer has the Updated column, idea labels wrap, editable status dropdowns list only `New`, `Exploring`, `Refining`, and `Ready`, and status filters list `New`, `Exploring`, `Refining`, `Ready`, `Project`, and `Archived`.
8+
9+
This PR adds a runtime save guard so stale or injected editable dropdown values cannot persist non-editable statuses such as `Project` or `Archived`.
10+
11+
## Runtime Files Changed
12+
13+
| File | Change |
14+
| --- | --- |
15+
| `assets/toolbox/idea-board/js/index.js` | Adds an editable-status validation helper and rejects add/edit saves when the submitted status is not one of the editable statuses. |
16+
| `tests/playwright/tools/IdeaBoardTableNotes.spec.mjs` | Adds focused coverage that injects a stale `Project` option into the editable row and verifies it cannot create an Idea Board row. |
17+
18+
## Source PR Coverage
19+
20+
| Source PR | Batch D Area | Current-Main Resolution |
21+
| --- | --- | --- |
22+
| #114 | Idea Board cleanup | Already present on current main; Game Hub changes were not touched. |
23+
| #115 | Status filter table polish | Already present on current main; no Updated column, wrapped idea labels, themed status filters. |
24+
| #116 | Editable status dropdown fix | Present and hardened by this PR with save-path validation. |
25+
26+
## Requirement Checklist
27+
28+
| Requirement | Status | Notes |
29+
| --- | --- | --- |
30+
| Start from `main` | PASS | `main` was checked, pulled, clean, and synced before branch creation. |
31+
| Hard stop if branch/worktree/sync invalid | PASS | Branch `main`, clean worktree, local/origin sync `0 0` confirmed after pull. |
32+
| Read all Project Instructions | PASS | All files under `docs_build/dev/ProjectInstructions/` were read before edits. |
33+
| Implement current-main-safe Batch D runtime changes | PASS | Added runtime validation for editable-only Idea Board statuses. |
34+
| Editable statuses limited to New/Exploring/Refining/Ready | PASS | UI already did this; save path now enforces it. |
35+
| Filter statuses include Project and Archived | PASS | Existing filter behavior preserved. |
36+
| Preserve Game Hub changes | PASS | No Game Hub files changed. |
37+
| Do not change status bar work | PASS | Status bar diff check was empty. |
38+
| Do not install Chromium | PASS | Chromium was not installed. |
39+
| Required reports and ZIP | PASS | Reports generated and delta ZIP created under `tmp/`. |
40+
41+
## Validation Lane
42+
43+
| Command | Status | Result |
44+
| --- | --- | --- |
45+
| `node --check assets/toolbox/idea-board/js/index.js` | PASS | JavaScript syntax valid. |
46+
| `node --check tests/playwright/tools/IdeaBoardTableNotes.spec.mjs` | PASS | Test file syntax valid. |
47+
| `git diff --check -- assets/toolbox/idea-board/js/index.js tests/playwright/tools/IdeaBoardTableNotes.spec.mjs` | PASS | Exit code 0; Git emitted a non-blocking CRLF warning for the test file. |
48+
| `git diff -- toolbox/game-hub/game-hub.js toolbox/game-hub/index.html assets/theme-v2/css/status.css assets/theme-v2/js/toolbox-status-bar.js tests/playwright/tools/ToolboxSelectedGameStatusBar.spec.mjs` | PASS | Empty diff; Game Hub and status bar work untouched. |
49+
| `npx playwright test tests/playwright/tools/IdeaBoardTableNotes.spec.mjs --workers=1 --reporter=line --timeout=30000` | BLOCKED | Browser executable missing at `C:\Users\davidq\AppData\Local\ms-playwright\chromium-1217\chrome-win64\chrome.exe`; Chromium was not installed per instruction. |
50+
51+
## Manual Validation Notes
52+
53+
- Compared GitHub PR #114, #115, and #116 metadata and patches against current main.
54+
- Confirmed the historical `toolbox/idea-board/index.js` path has moved on current main to `assets/toolbox/idea-board/js/index.js`.
55+
- Confirmed current main already preserves the Batch D status filter/table/dropdown shape.
56+
- Confirmed this PR does not modify `toolbox/game-hub/*`, `assets/theme-v2/css/status.css`, `assets/theme-v2/js/toolbox-status-bar.js`, or status bar Playwright coverage.
57+
58+
## Branch Validation
59+
60+
PASS - Work began from clean, synced `main`; implementation was made on `PR_26175_ALFA_018-alfa-idea-board-polish-consolidation`.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
docs_build/dev/reports/PR_26175_ALFA_017-alfa-game-hub-interactions-consolidation.md
1+
assets/toolbox/idea-board/js/index.js
2+
docs_build/dev/reports/PR_26175_ALFA_018-alfa-idea-board-polish-consolidation.md
23
docs_build/dev/reports/codex_changed_files.txt
34
docs_build/dev/reports/codex_review.diff
4-
tests/playwright/tools/GameHubMockRepository.spec.mjs
5-
toolbox/game-hub/game-hub.js
5+
tests/playwright/tools/IdeaBoardTableNotes.spec.mjs

0 commit comments

Comments
 (0)