Skip to content

Add optional colours to packing items - #19

Merged
dralan71 merged 3 commits into
mainfrom
codex/item-colours
Oct 4, 2026
Merged

dralan71 merged 3 commits into
mainfrom
codex/item-colours

Conversation

@dralan71

@dralan71 dralan71 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Add optional colour pickers to Quick Add, custom items, and existing item cards. Matching colours merge when adding or packing duplicates; different colours remain separate.

Store colours as lowercase six-digit hex strings, or null when no colour is selected. Preserve them in local storage and CSV export/import. Older lists and CSV files without colours load with null; blank or invalid imported colours also become null.

Closes #17.

Validation: TypeScript check, ESLint, all 38 tests, and production build pass. Four full-app integration tests cover adding and packing duplicates, custom item editing and persistence across reloads, real CSV download/upload round-trips, and legacy data normalization. App components, state updates, and PapaParse run together; browser storage/download APIs are supplied by the test environment.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: acde94ab-60d8-4be5-91f0-847aade68d0b

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 173fd874-2ff1-4256-b64c-8443fd15d74a
📥 Commits

Reviewing files that changed from the base of the PR and between 2d06c1c and 80a1461.

📒 Files selected for processing (6)
  • src/App.css
  • src/App.tsx
  • src/components/BaggageCard.tsx
  • src/components/ItemCard.tsx
  • src/test/Colours.test.tsx
  • src/types.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Items now support an optional colour that can be added, edited, and cleared. Adding and packing items uses colour when matching duplicates. CSV import and export preserve colour values and accept older CSV data without a colour column.

Changes

Item colours

Layer / File(s) Summary
Colour field and item model
src/types.ts, src/components/ItemCard.tsx, src/components/BaggageCard.tsx, src/App.css, src/test/Colours.test.tsx
Item gains an optional colour property. Item forms accept and edit colours, and the item view styles the colour field. Tests cover colour entry, trimming, editing, and clearing.
Colour-aware item merging
src/components/BaggageCard.tsx, src/test/Colours.test.tsx
Adding and packing items matches names and normalized colours. Tests cover matching and distinct colours, including blank colours.
Colour validation and CSV compatibility
src/App.tsx, src/test/Colours.test.tsx
Baggage validation accepts absent or string colours. CSV export and import handle trimmed colours, and tests cover round trips and older CSV data without a colour column.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to 80a14

The colour-edit behavior does not violate the documented duplicate rules. No identified issue prevents merging after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed [Issue #17] BaggageCard adds an optional colour field for Quick Add and custom items, trims colour values, and matches duplicates by item name and case-insensitive, trimmed colour when adding or pac…
Out of Scope Changes check ✅ Passed The reported changes are limited to colour controls, duplicate handling, persistence and CSV support, related styling, types, and tests. These changes support Issue #17. No unrelated changes are evide…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding optional colours to packing items.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Introduced a new ColourPicker component for selecting item colours.
- Updated ItemCard and BaggageCard components to utilize ColourPicker for colour management.
- Added predefined colour presets and support for custom hex input.
- Enhanced styling for colour-related UI elements in App.css.
- Updated integration tests to reflect changes in colour selection functionality.
@dralan71 dralan71 self-assigned this Oct 4, 2026
@dralan71
dralan71 merged commit 3ad8629 into main Oct 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add optional colours to packing items

1 participant