Skip to content

fix: stop quadrant accent colors leaking onto card buttons - #94

Merged
xiaomi7732 merged 2 commits into
mainfrom
fix/quadrant-accent-leak
Oct 1, 2026
Merged

xiaomi7732 merged 2 commits into
mainfrom
fix/quadrant-accent-leak

Conversation

@xiaomi7732

Copy link
Copy Markdown
Owner

Card titles in the Matrix view render in their quadrant's accent color instead of the intended dark #111827.

Cause

Each quadrant tints its header's compact + Add button with a bare descendant selector:

.quadrantUrgentImportant button { color: #dc2626; border-color: #dc2626; }

That selector matches every button inside the quadrant, and at specificity 0-1-1 it outranks both .todoTitleButton { color: inherit } (0-1-0) and the per-status .status_* classes.

Before #93 the card title was plain text (<h4 class="todoTitle">{subject}</h4>), so nothing matched it. The accessibility fix in that PR turned the title into a real <button>, which the quadrant rule then captured.

The same selector had also been silently flattening all five status badges in a quadrant to a single color, erasing their status color coding.

Fix

Scope the four rules to .quadrantHeader button — what they were always meant to target.

Verification

Computed styles, measured against the real stylesheet:

Element Before After
Card title button (Do First / Delegate) #dc2626 / #2563eb #111827
.status_new badge in Do First #dc2626 #6b7280
Quadrant header + Add button #dc2626 #dc2626 (unchanged)
Quadrant heading #991b1b #991b1b (unchanged)

175 tests pass, tsc --noEmit clean, npm run build clean.

The four quadrant rules used a bare descendant selector (e.g.
`.quadrantUrgentImportant button`) to tint the quadrant header's
compact Add button. That selector matches every button inside the
quadrant, and at specificity 0-1-1 it beat both `.todoTitleButton`
(`color: inherit`) and the per-status `.status_*` classes.

Turning the card title into a real button for accessibility therefore
made titles render in their quadrant's accent color instead of
`.todoTitle`'s `#111827`. The same selector had also been flattening
all five status badges in a quadrant to one color, erasing their status
color coding.

Scope the four rules to `.quadrantHeader button`, which is what they
were always meant to target. Verified with computed styles: title
buttons are `#111827` in every quadrant, `.status_new` is back to
`#6b7280`, and the header Add button keeps its accent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 112ac087-b7da-45a3-a00b-6ca9d06df52b
Copilot AI balanced review requested due to automatic review settings October 1, 2026 19:35

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The selectors still affect buttons inside the inline Add TODO dialog and should target only direct-child trigger buttons.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Scopes quadrant accent styles more narrowly to prevent styling Matrix card controls.

Changes:

  • Limits quadrant color rules to buttons within quadrant headers.
  • Restores card-title and status-badge colors.
File Description
src/​arrange-v4/​app/​matrix/​page.module.css Narrows quadrant button selectors.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/arrange-v4/app/matrix/page.module.css Outdated
`AddTodoItem` renders its overlay inline at its position rather than
through a portal, so when the dialog is open its tab, Cancel and Create
buttons are still descendants of `.quadrantHeader`. The descendant
selector therefore recolored and re-bordered them with the quadrant
accent, beating their own component classes on specificity.

Use a child combinator so the rules match only the trigger button that
sits directly in the header.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 112ac087-b7da-45a3-a00b-6ca9d06df52b
Copilot AI balanced review requested due to automatic review settings October 1, 2026 19:39

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

The selectors correctly target only the intended Add buttons and resolve the reported style leakage.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@xiaomi7732

Copy link
Copy Markdown
Owner Author

PR Review Loop Summary

  • 2 review rounds completed
  • 1 issue raised — fixed with a code change:
    • Round 1 (1 issue): the .quadrantHeader button descendant selector still reached the inline Add TODO dialog's tab/Cancel/Create buttons, because AddTodoItem renders its overlay inline rather than through a portal. Fixed in 6e2da25 by switching all four rules to a child combinator (.quadrantHeader > button).
    • Round 2: Clean — approval recommended, zero findings ✅
  • Final status: All review threads resolved

@xiaomi7732
xiaomi7732 merged commit 8fdb867 into main Oct 1, 2026
1 check 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.

2 participants