Pad text-only filter chips like the icon chips #4357
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 321 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.345
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4357"
general
weight: 0.35
jjmata
Summary
The same class goes on the Uncategorized, Untagged and No merchant branches in
app/views/transactions/searches/filters/_badge.html.erb. Filter chips without an icon (a category, tag or merchant) had their label close to the left edge, while the type, status, AI and attachment chips already wrap theirs inpx-1. Now both kinds inset the label the same way.Evidence
Transactions page at 1440 px wide, device scale 2, fixture data. Food & Drink and Trips are the chips without an icon.
Before
!Filter chips before
After
!Filter chips after
Measured on the rendered pixels, in CSS px from the chip's outer edge to the first ink, between the label and the ×, and from the × to the right edge:
| Chips | Left | Label to × | Right |
|---|---|---|---|
| Text only, before | 7.0 to 8.0 | 8.0 to 8.5 | 10.0 to 11.0 |
| Text only, after | 11.0 to 12.0 | 12.0 to 12.5 | 10.0 to 11.0 |
| Icon chips with
px-1(unchanged) | 11.0 to 12.5 | 12.0 to 12.5 | 10.0 to 11.0 |I also tried
pl-1. It fixes the left edge but leaves the label 8 px from the ×, against 12 px on the icon chips, so this usespx-1like the existing branches.Checks:
bin/rails test(12435 runs, 0 failures, 0 errors), the transactions, category filter cascading, currency totals and dark theme system tests (20 runs, 0 failures),bin/rubocopanderb_lintclean, Brakeman 0 warnings. No JavaScript changed. I didn't add a test because a markup assertion would only repeat the four class attributes.Merge Danger
Door: two-way. Four class attributes in one partial, reverted with one commit. Blast Radius: the filter chips on the Transactions page. Chips without an icon get 8 px wider, so a long row can wrap one chip sooner. None of the nine open PRs that touch this partial gets a new conflict from it (checked with
git merge-tree).<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
- Improved spacing and readability for transaction filter badges, including merchant, tag, category, and fallback values.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->