← Back to Pull requests

Pad text-only filter chips like the icon chips #4357

Closed
unknown closed this pull request without merging on Oct 20, 2026 22:44 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 20:24 UTC
Author

Summary

   <% else %>
-    <div class="flex items-center gap-2">
+    <div class="flex items-center gap-2 px-1">
       <p><%= param_value %></p>
     </div>

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 in px-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 uses px-1 like 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/rubocop and erb_lint clean, 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

  • Style

  • - 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 -->

    Diff: 321 lines (+240 / -81) across 4 files Reviewer: jjmata Review duration: 140m
    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
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 41.9% (MEDIUM) · Higher = larger blast radius
    41.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.6% · Safe to merge
    16.6%