Skip to content

Cart wall: fixed-size pads, pad names and colours - #33

Merged
epell-development merged 2 commits into
mainfrom
claude/project-thread-s12ck8
Nov 1, 2026
Merged

epell-development merged 2 commits into
mainfrom
claude/project-thread-s12ck8

Conversation

@epell-development

Copy link
Copy Markdown
Owner

Requested by epell · project thread

Fixes #31.

Why the grid distorted

Pads were egui buttons with a minimum size of 54 px. A name with no spaces (for example Station_ID_Summer_Jingle_2026_Final_Mix_v3) couldn't wrap, so it widened its whole grid column. A long name with spaces wrapped onto three or more lines and made its row taller.

What changed

  • Fixed-size pads. Each pad is now drawn at exactly the same size. Long names wrap to two lines and end in "…", and the full name shows in the tooltip. Text is black or white depending on how light the pad colour is.
  • Rename. The right-click menu's field is now called "Pad name" and has a hint. A name you set is kept when you assign a new file.
  • Background colour. The right-click menu has ten colour swatches plus "Default colour". The colour is saved as CartPad.color (Option<[u8; 3]>), and older configs load with no colour. A playing pad still turns red.
  • New UI strings go through tr(), and lang/template.json has been regenerated.

Checks

  • cargo fmt, cargo +1.99.0 clippy --all-targets -- -D warnings, cargo test (new test for saving the pad colour and loading old configs)
  • Ran the app under Xvfb with long names and colours. The grid stays even, and the colour menu stays open while you pick.

Generated by Claude Code

Pads are drawn at exactly the same size whatever the name: long names wrap
to two lines and end in "…", with the full name in the tooltip, so a long
file name no longer stretches a column or row of the grid.

Right-click a pad to rename it ("Pad name") or give it a background colour
from ten presets (Default colour goes back). The colour is saved with the
pad (CartPad.color, absent in older configs). A playing pad still turns red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016m2QHVSTc69PVJrv6GWWY7
@epell-development epell-development self-assigned this Nov 1, 2026

@mergeguards mergeguards Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MergeGuard review
Risk: 🟠 35/100 — moderate
Findings: 🟠 1 medium
Open Files changed for 1 inline review thread on the diff.

💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply @mergeguards fix on any inline finding.


Reviewed by MergeGuard AI

Comment thread src/app.rs Resolved
@mergeguards

mergeguards Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

MergeGuard agent actions

Fix all findings

All issues (1)
  • medium · src/app.rs:441 — cart_colors() function returns hardcoded RGB tuples without validation. If a colour value exceeds 255, it will silently truncate or panic at runtime when converted to u8.

Apply auto-fixes for the findings above on this branch:

  • Fix All MergeGuard Findings

Or reply with @mergeguards fix-all on this pull request.

The old luma threshold put white text on the Gold swatch (contrast 2.9:1).
With WCAG relative luminance every swatch gets at least 4.5:1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016m2QHVSTc69PVJrv6GWWY7

@mergeguards mergeguards Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ MergeGuard — new commits are on this pull request.

Re-scan the latest diff: paste this line by itself (copy/paste is fine) — either on the Conversation tab (Add a comment) or on Files changed as a comment on the diff:

@mergeguard-followup

@mergeguards mergeguards Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MergeGuard review
Risk: 🟠 35/100 — moderate
Findings: 🟠 1 medium
Open Files changed for 1 inline review thread on the diff.

💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply @mergeguards fix on any inline finding.


Reviewed by MergeGuard AI

Comment thread src/app.rs Resolved
@epell-development
epell-development merged commit de0cb25 into main Nov 1, 2026
6 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.

Renaming Cart Wall Pads

2 participants