Skip to content

Commit e175788

Browse files
author
DavidQ
committed
Normalize Palette Manager V2 tags and block duplicate user-defined swatches - PR_26124_052-palette-manager-tag-normalization-and-duplicate-guards
1 parent 8318cb5 commit e175788

14 files changed

Lines changed: 616 additions & 728 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
# Codex Commands - PR_26124_051-palette-manager-tags-accordion-and-label-cleanup
1+
# Codex Commands - PR_26124_052-palette-manager-tag-normalization-and-duplicate-guards
22

33
## Workflow
44
- Read `docs/dev/PROJECT_INSTRUCTIONS.md`.
55
- Used `.codex/skills/repo-build/SKILL.md`.
6-
- Created `docs/pr/PR_26124_051-palette-manager-tags-accordion-and-label-cleanup/PLAN_PR.md`.
7-
- Created `docs/pr/PR_26124_051-palette-manager-tags-accordion-and-label-cleanup/BUILD_PR.md`.
6+
- Created `docs/pr/PR_26124_052-palette-manager-tag-normalization-and-duplicate-guards/PLAN_PR.md`.
7+
- Created `docs/pr/PR_26124_052-palette-manager-tag-normalization-and-duplicate-guards/BUILD_PR.md`.
88
- Updated Palette Manager V2 only.
9-
- Created `docs/pr/PR_26124_051-palette-manager-tags-accordion-and-label-cleanup/APPLY_PR.md`.
9+
- Created `docs/pr/PR_26124_052-palette-manager-tag-normalization-and-duplicate-guards/APPLY_PR.md`.
1010

1111
## Validation Commands
1212
- `node --check tools/palette-manager-v2/controls/PaletteEditorControl.js`
1313
- `node --check tools/palette-manager-v2/modules/PaletteManagerApp.js`
14-
- Targeted served-browser Palette Manager V2 Tags accordion and label cleanup check using Playwright from Node.
14+
- `node --check tools/palette-manager-v2/modules/paletteUtils.js`
15+
- Targeted served-browser Palette Manager V2 tag normalization, duplicate guard, and selected-tag removal check using Playwright from Node.
1516
- `git diff --check`
1617
- `git diff --cached --check`
1718
- `npm run test:workspace-v2`
1819
- `npm run codex:review-artifacts`
19-
- Python `zipfile` packaging for `tmp/PR_26124_051-palette-manager-tags-accordion-and-label-cleanup_delta.zip`
20+
- Python `zipfile` packaging for `tmp/PR_26124_052-palette-manager-tag-normalization-and-duplicate-guards_delta.zip`
2021

2122
## Validation Outcome
2223
- JavaScript syntax checks: PASS.
2324
- Targeted served-browser Palette Manager V2 behavior check: PASS.
24-
- `git diff --check`: PASS with Git LF-to-CRLF warnings for changed HTML/CSS files.
25+
- `git diff --check`: PASS.
2526
- `git diff --cached --check`: PASS.
2627
- `npm run test:workspace-v2`: FAILED because the script is missing from `package.json`.
2728
- Review artifacts: generated.

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Move Palette Manager tags into left accordion and clean labels - PR_26124_051-palette-manager-tags-accordion-and-label-cleanup
1+
Normalize Palette Manager tags and guard duplicate swatches - PR_26124_052-palette-manager-tag-normalization-and-duplicate-guards
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# PR_26124_052 Report - Palette Manager Tag Normalization and Duplicate Guards
2+
3+
## Scope
4+
- Updated Palette Manager V2 only.
5+
- Added PR workflow docs and review artifacts.
6+
- Did not modify workspace/toolState/session behavior.
7+
- Did not modify sample JSON.
8+
- Did not modify `tools/shared`.
9+
- Did not add dependencies.
10+
11+
## Implementation
12+
- Removed Source and Tags form rows from the Add accordion.
13+
- Kept Add form data limited to symbol, hex, and name.
14+
- Preserved `User Added` source assignment in app logic.
15+
- Preserved existing selected swatch source values.
16+
- Added duplicate guards for user swatch name, RGB/hex, and symbol on Add and Update.
17+
- Added selected tag button behavior that removes the clicked tag from the selected swatch.
18+
- Kept tag suggestions and available tag list behavior.
19+
- Confirmed tag display/export uses lowercase normalized tags.
20+
21+
## Validation
22+
- `node --check tools/palette-manager-v2/controls/PaletteEditorControl.js`: PASS.
23+
- `node --check tools/palette-manager-v2/modules/PaletteManagerApp.js`: PASS.
24+
- `node --check tools/palette-manager-v2/modules/paletteUtils.js`: PASS.
25+
- Targeted served-browser Palette Manager V2 validation: PASS.
26+
- `git diff --check`: PASS.
27+
- `git diff --cached --check`: PASS.
28+
- `npm run test:workspace-v2`: FAIL. The repository `package.json` has no `test:workspace-v2` script.
29+
- Full samples smoke test: skipped by instruction.
30+
31+
## Notes
32+
- The targeted browser check covered removed Add fields, lowercase tag export, tag suggestions, selected-tag removal, duplicate Add blocking, and duplicate Update blocking.
Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
# git status --short
2-
M docs/dev/codex_commands.md
3-
M docs/dev/commit_comment.txt
4-
M tools/palette-manager-v2/README.md
5-
M tools/palette-manager-v2/controls/PaletteEditorControl.js
6-
M tools/palette-manager-v2/how_to_use.html
7-
M tools/palette-manager-v2/index.html
8-
M tools/palette-manager-v2/modules/PaletteManagerApp.js
9-
M tools/palette-manager-v2/paletteManagerV2.css
10-
?? docs/dev/reports/PR_26124_051_report.md
11-
?? docs/pr/PR_26124_051-palette-manager-tags-accordion-and-label-cleanup/
2+
M docs/dev/codex_commands.md
3+
M docs/dev/commit_comment.txt
4+
A docs/dev/reports/PR_26124_052_report.md
5+
M docs/dev/reports/codex_changed_files.txt
6+
M docs/dev/reports/codex_review.diff
7+
A docs/pr/PR_26124_052-palette-manager-tag-normalization-and-duplicate-guards/APPLY_PR.md
8+
A docs/pr/PR_26124_052-palette-manager-tag-normalization-and-duplicate-guards/BUILD_PR.md
9+
A docs/pr/PR_26124_052-palette-manager-tag-normalization-and-duplicate-guards/PLAN_PR.md
10+
M tools/palette-manager-v2/README.md
11+
M tools/palette-manager-v2/controls/PaletteEditorControl.js
12+
M tools/palette-manager-v2/how_to_use.html
13+
M tools/palette-manager-v2/index.html
14+
M tools/palette-manager-v2/modules/PaletteManagerApp.js
15+
M tools/palette-manager-v2/paletteManagerV2.css
1216

13-
# git diff --stat
14-
docs/dev/codex_commands.md | 12 +-
15-
docs/dev/commit_comment.txt | 2 +-
16-
tools/palette-manager-v2/README.md | 6 +-
17-
.../controls/PaletteEditorControl.js | 193 +++++++--------------
18-
tools/palette-manager-v2/how_to_use.html | 12 +-
19-
tools/palette-manager-v2/index.html | 65 +++----
20-
.../modules/PaletteManagerApp.js | 94 ++++++++--
21-
tools/palette-manager-v2/paletteManagerV2.css | 24 +++
22-
8 files changed, 217 insertions(+), 191 deletions(-)
17+
# git diff --cached --stat
18+
docs/dev/codex_commands.md | 15 +-
19+
docs/dev/commit_comment.txt | 2 +-
20+
docs/dev/reports/PR_26124_052_report.md | 32 +
21+
docs/dev/reports/codex_changed_files.txt | 32 +-
22+
docs/dev/reports/codex_review.diff | 1033 +++++++-------------
23+
.../APPLY_PR.md | 27 +
24+
.../BUILD_PR.md | 35 +
25+
.../PLAN_PR.md | 40 +
26+
tools/palette-manager-v2/README.md | 6 +-
27+
.../controls/PaletteEditorControl.js | 36 +-
28+
tools/palette-manager-v2/how_to_use.html | 6 +-
29+
tools/palette-manager-v2/index.html | 10 +-
30+
.../modules/PaletteManagerApp.js | 46 +-
31+
tools/palette-manager-v2/paletteManagerV2.css | 4 +
32+
14 files changed, 598 insertions(+), 726 deletions(-)

0 commit comments

Comments
 (0)