Skip to content

Conversation

@alessiocappa
Copy link
Collaborator

@alessiocappa alessiocappa commented Dec 13, 2025

This PR aims to improve the transactions and activities pages on mobile.

Here are the changes:

  • Spacing and column sizes have been adjusted to ensure amounts are displayed properly.
  • The category icon is now displayed instead of the transaction initial, providing additional information on small screens. The icon is clickable, allowing users to change the category directly from its icon, similar to what happens on desktop. The category name is also displayed under the transaction name.
  • If available, the merchant name is now visible next to the category name. The merchant logo is also visible as a small badge on top of the category icon.
  • Checkboxes to select multiple transactions are now hidden to optimise space. They can be displayed by clicking a dedicated button next to the filter.
Before After
Screenshot 2025-12-13 alle 14 27 48 Screenshot 2025-12-13 alle 14 28 27

Summary by CodeRabbit

  • New Features

    • Mobile-friendly checkbox toggle to show/hide bulk-selection controls
    • Live update of mobile category labels after category edits
    • Separate mobile-specific category badges and name displays
  • UI Improvements

    • Improved responsive spacing and layout across lists, cards, and transaction rows
    • Optimized merchant/category layouts for different screen sizes
    • Tighter pagination and divider spacing for visual consistency
    • Selection checkboxes now respect screen size for clearer UX

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 13, 2025

Walkthrough

Adds a Stimulus controller and mobile toggle to show/hide per-entry checkboxes, updates many views to make checkboxes responsive and wired to the new controller, introduces mobile-specific category badge/name partials, small responsive layout tweaks, and a Turbo Stream replacement for mobile category name in transaction category updates.

Changes

Cohort / File(s) Summary
New Checkbox Toggle Controller
app/javascript/controllers/checkbox_toggle_controller.js
New Stimulus controller with targets selectionEntry and toggleButton; toggles hidden on selection entries, updates toggle button styling, and calls deselectAll on the bulk-select controller when hiding.
Mobile Category Partials
app/views/categories/_badge_mobile.html.erb, app/views/categories/_category_name_mobile.html.erb
New small-screen partials for category badge and category name (visible on lg:hidden) with color/icon rendering and transfer/category name logic.
Activity & Feed Views
app/components/UI/account/activity_date.html.erb, app/components/UI/account/activity_feed.html.erb, app/views/accounts/show/_activity.html.erb
Added checkbox-toggle wiring and a mobile toggle button; per-entry checkboxes now hidden lg:block and include checkbox_toggle_target: "selectionEntry", preserving bulk-select actions.
Transactions & Entry Selection
app/views/transactions/_transaction.html.erb, app/views/transactions/index.html.erb, app/views/transactions/_transaction_category.html.erb, app/views/transactions/_transfer_match.html.erb, app/views/entries/_entry_group.html.erb, app/views/entries/_selection_bar.html.erb, app/views/valuations/_valuation.html.erb
Responsive layout/padding adjustments; per-entry checkboxes switched to hidden lg:block with checkbox_toggle_target: "selectionEntry"; large vs mobile badge partials introduced; selection bar and amount/merchant layout tweaked.
Search Form & UI Utilities
app/views/transactions/searches/_form.html.erb, app/views/categories/_menu.html.erb, app/views/category/dropdowns/_row.html.erb, app/views/shared/_pagination.html.erb, app/views/shared/_ruler.html.erb
Added checkbox toggle button (click->checkbox-toggle#toggle, toggleButton target); category menu renders badge on large and badge_mobile on small screens; added data-turbo-frame="category_dropdown" to dropdown row button; small spacing tweaks in pagination and ruler.
Controller Turbo Stream Update
app/controllers/transaction_categories_controller.rb
In update, added an extra turbo_stream.replace for category_name_mobile_#{transaction.id} rendering the mobile category name partial alongside the existing menu replacement.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ToggleButton as Toggle Button (DOM)
  participant CheckboxToggle as checkbox-toggle Controller
  participant BulkSelect as bulk-select Controller
  participant Entries as Selection Entries (DOM)

  User->>ToggleButton: click
  ToggleButton-->>CheckboxToggle: click->checkbox-toggle#toggle
  CheckboxToggle->>Entries: remove/add `hidden` class on `selectionEntry` targets
  alt Hiding entries
    CheckboxToggle->>BulkSelect: call `deselectAll()` if present
    BulkSelect-->>Entries: clear selection state
    CheckboxToggle-->>ToggleButton: remove `bg-surface` class
  else Showing entries
    CheckboxToggle-->>ToggleButton: add `bg-surface` class
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Files meriting extra attention:
    • app/javascript/controllers/checkbox_toggle_controller.js — target selection, class toggling, and bulk-select integration.
    • app/controllers/transaction_categories_controller.rb — verify turbo_stream target IDs match partial IDs.
    • Representative transaction/entry/valuation partials — consistent checkbox_toggle_target usage and conditional lg:hidden/lg:block logic.

Possibly related PRs

Suggested labels

enhancement, mobile/PWA

Suggested reviewers

  • jjmata
  • sokie

Poem

🐇 I nibbled a toggle, then hopped out of sight,
Large screens keep boxes, small screens keep it light.
Badges shrink to pockets, names snug and right,
A rabbit taps the toggle — checkboxes take flight!

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Transactions & Activities pages improvements' accurately summarizes the main objective of this PR, which focuses on enhancing the mobile layout and behavior of the Transactions and Activities pages.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 10

🧹 Nitpick comments (5)
app/views/transactions/_transaction_category.html.erb (1)

7-12: Avoid duplicate conditional + keep the category expression DRY
The ternary transaction.transfer&.payment? ? payment_category : transfer_category is duplicated; consider computing once to reduce template noise and future drift.

 <% else %>
+  <% category = transaction.transfer&.payment? ? payment_category : transfer_category %>
   <div class="hidden lg:flex">
-    <%= render "categories/badge", category: transaction.transfer&.payment? ? payment_category :  transfer_category %>
+    <%= render "categories/badge", category: category %>
   </div>
   <div class="flex lg:hidden">
-    <%= render "categories/badge_mobile", category: transaction.transfer&.payment? ? payment_category :  transfer_category %>
+    <%= render "categories/badge_mobile", category: category %>
   </div>
 <% end %>
app/views/transactions/index.html.erb (1)

64-69: Consider adding a non-mobile fallback to reveal checkboxes if JS fails
On small screens the checkboxes are fully hidden by CSS; if Stimulus doesn’t connect, multi-select becomes inaccessible. Consider a minimal non-JS fallback (e.g., show checkboxes by default + hide via controller, or provide server-rendered toggle state).

app/components/UI/account/activity_feed.html.erb (1)

50-58: Add accessible label to the toggle button.

The button currently displays only an icon without visible text. For better accessibility, consider adding a text label or an aria-label attribute to describe the button's purpose.

Apply this diff to add an accessible label:

 <%= button_tag type: "button",
       id: "toggle-checkboxes-button",
       class: "lg:hidden font-medium whitespace-nowrap inline-flex items-center gap-1 rounded-lg px-3 py-2 text-sm text-primary border border-secondary hover:bg-surface-hover",
+      "aria-label": t("accounts.show.activity.toggle_selection"),
       data: {
         action: "click->checkbox-toggle#toggle",
         checkbox_toggle_target: "toggleButton"
       } do %>
       <%= helpers.icon("list-todo") %>
   <% end %>

Note: You'll need to add the corresponding i18n key to your locale files.

app/views/transactions/_transaction.html.erb (2)

38-45: Remove unnecessary grid class from flex container.

The col-span-2 class on line 38 has no effect since the parent container uses flex layout on small screens (not grid). This class can be safely removed.

Apply this diff:

-<div class="flex lg:hidden items-center gap-1 col-span-2 relative">
+<div class="flex lg:hidden items-center gap-1 relative">

87-109: Consider simplifying the merchant/category display logic.

The nested conditionals for displaying merchant name and category information across breakpoints are quite complex. While functional, this could be refactored into a helper method or component to improve maintainability.

Consider extracting this logic into a helper method like:

def transaction_metadata_html(transaction, entry)
  # Returns appropriate HTML based on transaction type and available data
end

This would reduce template complexity and make the logic easier to test.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb762ef and 7fa99cd.

📒 Files selected for processing (21)
  • app/assets/tailwind/maybe-design-system.css (1 hunks)
  • app/components/UI/account/activity_date.html.erb (1 hunks)
  • app/components/UI/account/activity_feed.html.erb (3 hunks)
  • app/controllers/transaction_categories_controller.rb (1 hunks)
  • app/javascript/controllers/checkbox_toggle_controller.js (1 hunks)
  • app/views/accounts/_logo.html.erb (1 hunks)
  • app/views/accounts/show/_activity.html.erb (3 hunks)
  • app/views/categories/_badge_mobile.html.erb (1 hunks)
  • app/views/categories/_category_name_mobile.html.erb (1 hunks)
  • app/views/categories/_menu.html.erb (1 hunks)
  • app/views/category/dropdowns/_row.html.erb (1 hunks)
  • app/views/entries/_entry_group.html.erb (1 hunks)
  • app/views/entries/_selection_bar.html.erb (1 hunks)
  • app/views/shared/_pagination.html.erb (1 hunks)
  • app/views/shared/_ruler.html.erb (1 hunks)
  • app/views/transactions/_transaction.html.erb (3 hunks)
  • app/views/transactions/_transaction_category.html.erb (1 hunks)
  • app/views/transactions/_transfer_match.html.erb (1 hunks)
  • app/views/transactions/index.html.erb (2 hunks)
  • app/views/transactions/searches/_form.html.erb (1 hunks)
  • app/views/valuations/_valuation.html.erb (1 hunks)
🧰 Additional context used
📓 Path-based instructions (36)
app/assets/tailwind/maybe-design-system.css

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Never create new styles in design system files without permission

Files:

  • app/assets/tailwind/maybe-design-system.css
app/assets/**/*.css

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Avoid adding new global styles to design system files without permission

Files:

  • app/assets/tailwind/maybe-design-system.css
**/*.{css,erb}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Tailwind CSS v4.x with custom design system for styling

Files:

  • app/assets/tailwind/maybe-design-system.css
  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
app/assets/tailwind/**/*.css

📄 CodeRabbit inference engine (CLAUDE.md)

Never create new styles in design system files without permission. Always reference app/assets/tailwind/maybe-design-system.css for primitives and tokens.

Files:

  • app/assets/tailwind/maybe-design-system.css
app/assets/tailwind/{maybe-design-system,application}.css

📄 CodeRabbit inference engine (.cursor/rules/ui-ux-design-guidelines.mdc)

Never create new styles in maybe-design-system.css or application.css without explicit permission

Files:

  • app/assets/tailwind/maybe-design-system.css
app/**/*.{rb,js,ts,jsx,tsx,css,scss}

📄 CodeRabbit inference engine (AGENTS.md)

Code should be organized in app/ directory (Rails MVC, services, jobs, mailers, components), with JS in app/javascript/, and styles/assets in app/assets/ (Tailwind, images, fonts)

Files:

  • app/assets/tailwind/maybe-design-system.css
  • app/controllers/transaction_categories_controller.rb
  • app/javascript/controllers/checkbox_toggle_controller.js
app/**/*.{js,ts,jsx,tsx,css,scss}

📄 CodeRabbit inference engine (AGENTS.md)

JavaScript and CSS code should be formatted using Biome via npm run lint and npm run format

Files:

  • app/assets/tailwind/maybe-design-system.css
  • app/javascript/controllers/checkbox_toggle_controller.js
{app/**/*.{erb,html},app/javascript/**/*.js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Prefer Hotwire-first approach: use Turbo + Stimulus for reactive UI without heavy JavaScript

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/javascript/controllers/checkbox_toggle_controller.js
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
app/views/**/_*.html.erb

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use partials only for simple, static HTML with minimal logic in specific contexts

app/views/**/_*.html.erb: Use underscore prefix for partial files (e.g., _trend_change.html.erb, _form_errors.html.erb, _sync_indicator.html.erb)
Place context-specific partials in relevant controller view directory (e.g., accounts/_account_sidebar_tabs.html.erb)

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
app/views/**/*.erb

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

app/views/**/*.erb: Always use the icon helper for icons in views, never use lucide_icon directly
Use Tailwind design tokens (e.g., text-primary, bg-container, border-secondary) instead of raw color names
Pass data to Stimulus controllers via data-*-value attributes instead of inline JavaScript
Prefer semantic HTML elements (dialog, details, summary) over JavaScript components
Use Turbo Frames for page sections instead of client-side solutions
Use server-side formatting for currencies, numbers, and dates instead of client-side

Views should use ERB and avoid heavy logic; prefer helpers and components instead (ERB checked by erb-lint per .erb_lint.yml)

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
**/*.{rb,erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{rb,erb,html.erb}: Use Current.user for the current user context in controllers and views. Do NOT use current_user.
Use Current.family for the current family context. Do NOT use current_family.

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/controllers/transaction_categories_controller.rb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
**/*.{erb,html,vue,jsx,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html,vue,jsx,tsx}: Use Tailwind CSS v4.x with custom design system defined in app/assets/tailwind/maybe-design-system.css. Always use functional tokens (e.g., text-primary not text-white).
Prefer semantic HTML elements over JavaScript components (e.g., use <dialog> for modals, <details><summary> for disclosures).

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
**/*.{erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html.erb}: Use icon helper for icons, never use lucide_icon directly.
Leverage Turbo frames for page sections over client-side solutions.
Pass data to Stimulus controllers via data-*-value attributes, not inline JavaScript.

**/*.{erb,html.erb}: Use ViewComponents when: element has complex logic or styling patterns, will be reused across multiple views/contexts, needs structured styling with variants/sizes, requires interactive behavior or Stimulus controllers, has configurable slots or complex APIs, or needs accessibility features or ARIA support
Use Partials when: element is primarily static HTML with minimal logic, used in only one or few specific contexts, is simple template content, doesn't need variants/sizes/complex configuration, or is more about content organization than reusable functionality
Prefer components over partials: if a component is available in app/components, use it; if not, look for a partial; if neither exists, decide between component or partial based on complexity and reusability criteria
Keep domain logic out of views: compute values like button classes, conditional logic, and data transformations in the component file, not the template file
Always use the declarative approach when integrating Stimulus controllers in views: the ERB template should declare what happens using data-* attributes, and the Stimulus controller should respond
Component controllers in app/components/ should only be used within their component templates; global controllers in app/javascript/controllers/ can be used across any view
Pass data from Rails to Stimulus using data-*-value attributes, not inline JavaScript

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
**/*.{erb,html.erb,rb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html.erb,rb}: All user-facing strings must use localization (i18n) via the t() helper. Update locale files for each new or changed element.
Use server-side formatting for currencies, numbers, and dates. Do not format in JavaScript.

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/controllers/transaction_categories_controller.rb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
app/views/**/_*.{erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Partials when element is primarily static HTML with minimal logic, used in only one or few contexts, is simple template content, or doesn't need variants/sizes/complex configuration.

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
{app/components/**/*.html.erb,app/views/**/*.{erb,html.erb}}

📄 CodeRabbit inference engine (CLAUDE.md)

Keep domain logic out of view templates. Logic belongs in component files, not template files.

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
**/*.erb

📄 CodeRabbit inference engine (CLAUDE.md)

Run bundle exec erb_lint ./app/**/*.erb -a for ERB linting with auto-correct before pull requests.

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
**/*.{rb,erb}

📄 CodeRabbit inference engine (.cursor/rules/general-rules.mdc)

**/*.{rb,erb}: Use Current.user for accessing the current user. Do NOT use current_user
Use Current.family for accessing the current family. Do NOT use current_family

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/controllers/transaction_categories_controller.rb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
**/*.html.erb

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

**/*.html.erb: Prefer native HTML elements over JavaScript-based components. Use semantic HTML: for modals,

for disclosures
Leverage Turbo frames to break up pages instead of JavaScript-driven client-side solutions
Use the icon helper from application_helper.rb for icons. Never use lucide_icon helper directly

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
**/*.{rb,js,erb}

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

Format currencies, numbers, dates, and other values server-side, then pass to Stimulus controllers for display only

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/controllers/transaction_categories_controller.rb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/javascript/controllers/checkbox_toggle_controller.js
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
**/*.{rb,html.erb}

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

Use ActiveRecord validations for complex validations and business logic. Simple validations may be mirrored in ActiveRecord for form error handling convenience, but prioritize client-side form validation when possible

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/controllers/transaction_categories_controller.rb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
  • app/components/UI/account/activity_feed.html.erb
{app/views/**,app/helpers/**,app/javascript/controllers/**}

📄 CodeRabbit inference engine (.cursor/rules/ui-ux-design-guidelines.mdc)

{app/views/**,app/helpers/**,app/javascript/controllers/**}: Reference maybe-design-system.css for base primitives, functional tokens, and component tokens before writing styles
Prefer using functional design system tokens (e.g., text-primary, bg-container, border-primary) from maybe-design-system.css instead of raw Tailwind color values

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/javascript/controllers/checkbox_toggle_controller.js
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
{app/views/**,app/helpers/**}

📄 CodeRabbit inference engine (.cursor/rules/ui-ux-design-guidelines.mdc)

Always generate semantic HTML

Files:

  • app/views/entries/_selection_bar.html.erb
  • app/views/transactions/_transfer_match.html.erb
  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/transactions/_transaction_category.html.erb
  • app/views/accounts/_logo.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/transactions/index.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
  • app/views/entries/_entry_group.html.erb
**/*.rb

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.rb: Application supports two modes: 'managed' and 'self_hosted' via Rails.application.config.app_mode
Use Current.user and Current.family instead of current_user / current_family for authentication context
Optimize database queries with proper indexes to prevent N+1 queries using includes/joins

**/*.rb: Use Rails pluralization in i18n: t("transactions.count", count: @transactions.count).
Run bin/rubocop -f github -a for Ruby linting with auto-correct before pull requests.

**/*.rb: Ruby code should use 2-space indent, snake_case for methods and variables, and CamelCase for classes and modules, following Rails conventions for folders and file names
Prefer environment variables over hard-coded values for configuration

Files:

  • app/controllers/transaction_categories_controller.rb
app/controllers/**/*.rb

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Rails strong parameters and CSRF protection throughout the application

app/controllers/**/*.rb: Use strong parameters and CSRF protection throughout the application.
Use query params for state over localStorage/sessions.

Files:

  • app/controllers/transaction_categories_controller.rb
app/**/*.rb

📄 CodeRabbit inference engine (AGENTS.md)

Run bin/brakeman security scan before major PRs to check for static analysis of common Rails issues

Files:

  • app/controllers/transaction_categories_controller.rb
app/javascript/controllers/**/*_controller.js

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

app/javascript/controllers/**/*_controller.js: Keep Stimulus controllers lightweight and simple with fewer than 7 targets
Keep Stimulus controllers small with private methods and clear public API

Files:

  • app/javascript/controllers/checkbox_toggle_controller.js
app/javascript/**/*.js

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use D3.js for financial visualizations (time series, donut, sankey charts)

Files:

  • app/javascript/controllers/checkbox_toggle_controller.js
{app/components/**/*.js,app/components/**/*.ts,app/javascript/controllers/**/*.{js,ts}}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Stimulus Controllers for interactivity, organized alongside components in app/components/ or globally in app/javascript/controllers/.

Files:

  • app/javascript/controllers/checkbox_toggle_controller.js
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use D3.js for financial visualizations including time series, donut, and sankey charts.

Files:

  • app/javascript/controllers/checkbox_toggle_controller.js
{app/components/**/*.{js,ts},app/javascript/controllers/**/*.{js,ts},app/components/**/*.html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

Use declarative Stimulus actions in HTML with data-action and data-*-target attributes. Keep controllers lightweight and simple (< 7 targets).

Files:

  • app/javascript/controllers/checkbox_toggle_controller.js
  • app/components/UI/account/activity_date.html.erb
  • app/components/UI/account/activity_feed.html.erb
{app/components/**/*.{js,ts},app/javascript/controllers/**/*.{js,ts}}

📄 CodeRabbit inference engine (CLAUDE.md)

{app/components/**/*.{js,ts},app/javascript/controllers/**/*.{js,ts}}: Use private methods in Stimulus controllers and expose a clear public API.
Component Stimulus controllers should stay in component directory (app/components/). Global controllers should be in app/javascript/controllers/.

Files:

  • app/javascript/controllers/checkbox_toggle_controller.js
**/*_controller.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/stimulus_conventions.mdc)

**/*_controller.{js,ts}: Use declarative actions in Stimulus controllers, not imperative event listeners - define actions in ERB templates using data-action attributes instead of binding events in the controller's connect() method
Keep Stimulus controllers lightweight and simple - aim for fewer than 7 controller targets as a sign of excessive complexity
Use private methods in Stimulus controllers and expose a clear public API
Keep Stimulus controllers focused on single or highly related responsibilities - domain logic should not belong in Stimulus controllers

Files:

  • app/javascript/controllers/checkbox_toggle_controller.js
app/javascript/controllers/**/*.js

📄 CodeRabbit inference engine (.cursor/rules/view_conventions.mdc)

Use Stimulus targets to reference DOM elements, not manual getElementById calls

Files:

  • app/javascript/controllers/checkbox_toggle_controller.js
app/javascript/**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

JavaScript code should use lowerCamelCase for variables and functions, and PascalCase for classes and components

Files:

  • app/javascript/controllers/checkbox_toggle_controller.js
app/views/shared/_*.html.erb

📄 CodeRabbit inference engine (.cursor/rules/view_conventions.mdc)

Place shared partials in app/views/shared/ directory for reusable content across contexts

Files:

  • app/views/shared/_ruler.html.erb
  • app/views/shared/_pagination.html.erb
🧠 Learnings (41)
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/assets/tailwind/maybe-design-system.css : Never create new styles in design system files without permission

Applied to files:

  • app/assets/tailwind/maybe-design-system.css
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to app/assets/tailwind/**/*.css : Never create new styles in design system files without permission. Always reference `app/assets/tailwind/maybe-design-system.css` for primitives and tokens.

Applied to files:

  • app/assets/tailwind/maybe-design-system.css
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Always reference app/assets/tailwind/maybe-design-system.css for design system tokens and primitives

Applied to files:

  • app/assets/tailwind/maybe-design-system.css
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html,vue,jsx,tsx} : Use Tailwind CSS v4.x with custom design system defined in `app/assets/tailwind/maybe-design-system.css`. Always use functional tokens (e.g., `text-primary` not `text-white`).

Applied to files:

  • app/assets/tailwind/maybe-design-system.css
📚 Learning: 2025-11-24T16:57:09.166Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/ui-ux-design-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:57:09.166Z
Learning: Applies to app/assets/tailwind/{maybe-design-system,application}.css : Never create new styles in maybe-design-system.css or application.css without explicit permission

Applied to files:

  • app/assets/tailwind/maybe-design-system.css
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/assets/**/*.css : Avoid adding new global styles to design system files without permission

Applied to files:

  • app/assets/tailwind/maybe-design-system.css
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to **/*.{css,erb} : Use Tailwind CSS v4.x with custom design system for styling

Applied to files:

  • app/assets/tailwind/maybe-design-system.css
  • app/views/shared/_ruler.html.erb
📚 Learning: 2025-11-24T16:57:09.166Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/ui-ux-design-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:57:09.166Z
Learning: Applies to {app/views/**,app/helpers/**,app/javascript/controllers/**} : Prefer using functional design system tokens (e.g., text-primary, bg-container, border-primary) from maybe-design-system.css instead of raw Tailwind color values

Applied to files:

  • app/assets/tailwind/maybe-design-system.css
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html.erb,rb} : All user-facing strings must use localization (i18n) via the `t()` helper. Update locale files for each new or changed element.

Applied to files:

  • app/views/transactions/_transfer_match.html.erb
  • app/views/shared/_ruler.html.erb
📚 Learning: 2025-11-24T16:56:13.406Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Applies to **/*.html.erb : Prefer native HTML elements over JavaScript-based components. Use semantic HTML: <dialog> for modals, <details><summary> for disclosures

Applied to files:

  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/transactions/searches/_form.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/views/**/*.erb : Prefer semantic HTML elements (dialog, details, summary) over JavaScript components

Applied to files:

  • app/views/valuations/_valuation.html.erb
  • app/views/categories/_menu.html.erb
  • app/views/shared/_ruler.html.erb
  • app/views/shared/_pagination.html.erb
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
📚 Learning: 2025-08-22T18:30:26.758Z
Learnt from: jjmata
Repo: we-promise/sure PR: 116
File: app/views/family_exports/_list.html.erb:16-28
Timestamp: 2025-08-22T18:30:26.758Z
Learning: In the family exports UI (app/views/family_exports/_list.html.erb), raw color utilities like bg-green-500/5, text-green-500, bg-red-500/5, text-red-500 are preferred over design system tokens for status indicators to maintain UI legibility and consistency with the existing import UI patterns. The user has indicated that design token replacements would make the UI illegible in this context.

Applied to files:

  • app/views/valuations/_valuation.html.erb
📚 Learning: 2025-11-24T16:57:20.318Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-11-24T16:57:20.318Z
Learning: Applies to **/*.{erb,html.erb} : Keep domain logic out of views: compute values like button classes, conditional logic, and data transformations in the component file, not the template file

Applied to files:

  • app/views/valuations/_valuation.html.erb
  • app/views/shared/_ruler.html.erb
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/views/**/*.erb : Use Turbo Frames for page sections instead of client-side solutions

Applied to files:

  • app/views/valuations/_valuation.html.erb
  • app/controllers/transaction_categories_controller.rb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:56:13.406Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Applies to **/*.html.erb : Leverage Turbo frames to break up pages instead of JavaScript-driven client-side solutions

Applied to files:

  • app/views/valuations/_valuation.html.erb
  • app/views/category/dropdowns/_row.html.erb
  • app/views/shared/_pagination.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-09-13T11:27:55.271Z
Learnt from: alessiocappa
Repo: we-promise/sure PR: 141
File: app/controllers/enable_banking_items_controller.rb:48-62
Timestamp: 2025-09-13T11:27:55.271Z
Learning: The `create_enable_banking_item!` method in `Family::EnableBankingConnectable` uses `find_or_create_by(id: enable_banking_id)` to either find an existing EnableBankingItem or create a new one, so it automatically handles updates to existing items without creating duplicates.

Applied to files:

  • app/views/accounts/_logo.html.erb
📚 Learning: 2025-09-13T11:36:45.479Z
Learnt from: alessiocappa
Repo: we-promise/sure PR: 141
File: app/models/enable_banking_account/processor.rb:72-79
Timestamp: 2025-09-13T11:36:45.479Z
Learning: The balance_calculator method pattern is consistent across banking integrations in the codebase. Both PlaidAccount::Processor and EnableBankingAccount::Processor use the same approach: `balance = account.current_balance || account.available_balance || 0` followed by `OpenStruct.new(balance: balance, cash_balance: balance)` without explicit requires, and include identical comments about not distinguishing cash vs non-cash balances for non-investment accounts.

Applied to files:

  • app/views/accounts/_logo.html.erb
📚 Learning: 2025-09-23T22:22:00.149Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/stimulus_conventions.mdc:0-0
Timestamp: 2025-09-23T22:22:00.149Z
Learning: Applies to **/*_controller.{js,ts} : Keep Stimulus controllers lightweight: aim for fewer than 7 targets and expose a small public API with other logic in private methods

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/javascript/controllers/**/*_controller.js : Keep Stimulus controllers small with private methods and clear public API

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to {app/components/**/*.{js,ts},app/javascript/controllers/**/*.{js,ts},app/components/**/*.html.erb} : Use declarative Stimulus actions in HTML with `data-action` and `data-*-target` attributes. Keep controllers lightweight and simple (< 7 targets).

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
  • app/components/UI/account/activity_date.html.erb
  • app/views/accounts/show/_activity.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to {app/components/**/*.{js,ts},app/javascript/controllers/**/*.{js,ts}} : Use private methods in Stimulus controllers and expose a clear public API.

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
📚 Learning: 2025-11-24T16:56:51.982Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/stimulus_conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:51.982Z
Learning: Applies to **/*_controller.{js,ts} : Keep Stimulus controllers lightweight and simple - aim for fewer than 7 controller targets as a sign of excessive complexity

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
📚 Learning: 2025-11-24T16:56:51.982Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/stimulus_conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:51.982Z
Learning: Applies to **/*_controller.{js,ts} : Use private methods in Stimulus controllers and expose a clear public API

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/javascript/controllers/**/*_controller.js : Keep Stimulus controllers lightweight and simple with fewer than 7 targets

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to {app/components/**/*.js,app/components/**/*.ts,app/javascript/controllers/**/*.{js,ts}} : Use Stimulus Controllers for interactivity, organized alongside components in `app/components/` or globally in `app/javascript/controllers/`.

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
📚 Learning: 2025-09-23T22:22:00.149Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/stimulus_conventions.mdc:0-0
Timestamp: 2025-09-23T22:22:00.149Z
Learning: Applies to **/*_controller.{js,ts} : Keep Stimulus controllers focused on UI behavior; avoid domain/business logic and prefer single, closely related responsibilities; use Stimulus callbacks, actions, targets, values, and classes

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
📚 Learning: 2025-09-23T22:23:22.963Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-09-23T22:23:22.963Z
Learning: Applies to app/{views,components}/**/*.html.erb : Integrate Stimulus declaratively in ERB: templates declare data-controller/actions/targets; controllers respond to those declarations

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
  • app/views/transactions/searches/_form.html.erb
📚 Learning: 2025-11-24T16:56:13.406Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Keep Stimulus controller code for interactions that significantly improve UX when done client-side, such as bulk selection operations

Applied to files:

  • app/javascript/controllers/checkbox_toggle_controller.js
  • app/views/transactions/index.html.erb
📚 Learning: 2025-09-23T22:23:22.963Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-09-23T22:23:22.963Z
Learning: Applies to app/{views,components}/**/*.html.erb : Keep domain logic out of ERB templates; compute classes and logic in component/Ruby code, not inline in the template

Applied to files:

  • app/views/shared/_ruler.html.erb
📚 Learning: 2025-11-24T16:56:44.818Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/self_improve.mdc:0-0
Timestamp: 2025-11-24T16:56:44.818Z
Learning: Document breaking changes in rules

Applied to files:

  • app/views/shared/_ruler.html.erb
📚 Learning: 2025-11-24T16:57:20.318Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-11-24T16:57:20.318Z
Learning: Applies to app/views/**/_*.html.erb : Use underscore prefix for partial files (e.g., _trend_change.html.erb, _form_errors.html.erb, _sync_indicator.html.erb)

Applied to files:

  • app/views/shared/_ruler.html.erb
  • app/views/categories/_badge_mobile.html.erb
  • app/views/categories/_category_name_mobile.html.erb
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/views/**/*.erb : Use Tailwind design tokens (e.g., text-primary, bg-container, border-secondary) instead of raw color names

Applied to files:

  • app/views/shared/_ruler.html.erb
📚 Learning: 2025-11-24T16:57:20.318Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-11-24T16:57:20.318Z
Learning: Applies to **/*.{erb,html.erb} : Use Partials when: element is primarily static HTML with minimal logic, used in only one or few specific contexts, is simple template content, doesn't need variants/sizes/complex configuration, or is more about content organization than reusable functionality

Applied to files:

  • app/views/shared/_ruler.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html.erb} : Leverage Turbo frames for page sections over client-side solutions.

Applied to files:

  • app/views/category/dropdowns/_row.html.erb
  • app/views/accounts/show/_activity.html.erb
  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to {app/**/*.{erb,html},app/javascript/**/*.js} : Prefer Hotwire-first approach: use Turbo + Stimulus for reactive UI without heavy JavaScript

Applied to files:

  • app/views/category/dropdowns/_row.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.rb : Use Rails pluralization in i18n: `t("transactions.count", count: transactions.count)`.

Applied to files:

  • app/views/transactions/index.html.erb
  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:57:20.318Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-11-24T16:57:20.318Z
Learning: Applies to app/views/**/_*.html.erb : Place context-specific partials in relevant controller view directory (e.g., accounts/_account_sidebar_tabs.html.erb)

Applied to files:

  • app/views/shared/_pagination.html.erb
📚 Learning: 2025-09-23T22:22:00.149Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/stimulus_conventions.mdc:0-0
Timestamp: 2025-09-23T22:22:00.149Z
Learning: Applies to app/{views,components}/**/*.html.erb : In ERB views, wire Stimulus interactions declaratively using data-action to call controller methods

Applied to files:

  • app/views/transactions/searches/_form.html.erb
📚 Learning: 2025-09-23T22:23:22.963Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-09-23T22:23:22.963Z
Learning: Applies to app/views/**/*.html.erb : Use ViewComponents when elements have complex logic/styling, are reused across contexts, need variants/slots/accessibility, or require Stimulus interactivity

Applied to files:

  • app/components/UI/account/activity_date.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html.erb} : Pass data to Stimulus controllers via `data-*-value` attributes, not inline JavaScript.

Applied to files:

  • app/components/UI/account/activity_date.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to config/locales/**/*.yml : Use hierarchical i18n keys by feature: `accounts.index.title`, `transactions.form.amount_label`. Use `t()` helper for all user-facing strings with interpolation for dynamic content.

Applied to files:

  • app/views/transactions/_transaction.html.erb
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci / test
🔇 Additional comments (15)
app/views/shared/_pagination.html.erb (1)

4-4: Spacing tweak looks good.
mr-3 is a safe adjustment and doesn’t affect pagination behavior.

app/views/shared/_ruler.html.erb (1)

2-2: Responsive default margin update is fine.

app/controllers/transaction_categories_controller.rb (1)

30-34: Turbo-stream update is good; ensure the rendered partial has everything it needs (and consider dom_id).
This is a nice addition for keeping mobile UI in sync. The only risk is the partial referencing non-local identifiers (e.g., payment_category / transfer_category). Also, for consistency, consider dom_id(transaction, :category_name_mobile) instead of a hard-coded string target.

app/components/UI/account/activity_date.html.erb (1)

7-12: Wiring to checkbox-toggle target looks correct; verify it’s wrapped by the controller on mobile.
If this component can render without the checkbox-toggle controller/toggle button in its DOM tree, the checkbox will remain hidden on small screens.

app/views/category/dropdowns/_row.html.erb (1)

16-16: Good: scope the PATCH navigation to the category_dropdown Turbo Frame.

app/views/categories/_category_name_mobile.html.erb (1)

1-6: > Likely an incorrect or invalid review comment.

app/views/entries/_entry_group.html.erb (1)

6-12: Confirm entries.size == 0 class override is intentional (Tailwind class conflict ordering)
When entries.size == 0, this renders both lg:block and lg:hidden; Tailwind resolves conflicts by class order, so verify the resulting order consistently hides the checkbox on lg in that case.

app/views/categories/_menu.html.erb (1)

5-10: LGTM: responsive badge swap is clean and keeps Hotwire-first
Simple view-side responsiveness; no extra JS and consistent partial usage.

app/views/entries/_selection_bar.html.erb (1)

1-1: Verify bottom-30 exists in your Tailwind v4 config
If bottom-30 isn’t in your spacing scale, it’ll be a no-op and the bar may overlap content on mobile.

app/views/transactions/index.html.erb (1)

48-52: LGTM: composing bulk-select + checkbox-toggle is the right integration point
Attaching both controllers at the list container keeps concerns scoped to the page section.

app/views/accounts/show/_activity.html.erb (1)

56-61: LGTM: bulk-select checkbox-toggle wiring matches the transactions page
Consistent controller composition across views should keep behavior predictable.

app/views/valuations/_valuation.html.erb (1)

10-17: LGTM! Mobile responsive improvements are well implemented.

The changes successfully optimize the mobile layout with responsive padding/gaps, hide the checkbox on small screens (aligning with the PR objectives), and integrate with the new checkbox_toggle Stimulus controller. The icon size adjustment to "md" improves visual consistency.

app/components/UI/account/activity_feed.html.erb (1)

2-2: Excellent Stimulus controller integration!

The checkbox-toggle controller is properly wired to the container, and the header checkbox correctly declares both the bulk-select action and the checkbox_toggle target. The responsive visibility classes ensure the checkboxes are hidden on mobile and shown on larger screens.

Also applies to: 77-82

app/views/transactions/_transaction.html.erb (2)

7-18: Responsive layout and checkbox integration look great!

The transition from flex on mobile to grid on desktop is well implemented. The checkbox is properly hidden on small screens and integrated with the checkbox_toggle Stimulus controller, matching the PR objectives perfectly.


42-42: Replace border-1 with border.

The border-1 class is not defined in your Tailwind configuration. Use the standard border utility class (which applies a 1px border) instead.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/views/transactions/_transaction.html.erb (1)

76-78: Use i18n for the title attribute.

The title text "One-time income/expense" is hardcoded. Per coding guidelines, all user-facing strings should use the t() helper.

-                    <span class="text-orange-500" title="One-time <%= entry.amount.negative? ? "income" : "expense" %> (excluded from averages)">
+                    <span class="text-orange-500" title="<%= t('transactions.one_time_indicator', type: entry.amount.negative? ? t('transactions.income') : t('transactions.expense')) %>">

Add corresponding keys to your locale files.

♻️ Duplicate comments (1)
app/views/transactions/_transaction.html.erb (1)

28-35: Redundant wrapper div still present.

The inner <div class="hidden lg:flex"> on line 28 is unnecessary since the parent container (line 22) already handles the responsive visibility. This was flagged previously and marked as addressed, but the redundant wrapper remains.

       <% else %>
-        <div class="hidden lg:flex">
-          <%= render DS::FilledIcon.new(
-            variant: :text,
-            text: entry.name,
-            size: "lg",
-            rounded: true
-          ) %>
-        </div>
+        <%= render DS::FilledIcon.new(
+          variant: :text,
+          text: entry.name,
+          size: "lg",
+          rounded: true
+        ) %>
       <% end %>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 11b451c and ba549c9.

📒 Files selected for processing (2)
  • app/javascript/controllers/checkbox_toggle_controller.js (1 hunks)
  • app/views/transactions/_transaction.html.erb (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/javascript/controllers/checkbox_toggle_controller.js
🧰 Additional context used
📓 Path-based instructions (17)
{app/**/*.{erb,html},app/javascript/**/*.js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Prefer Hotwire-first approach: use Turbo + Stimulus for reactive UI without heavy JavaScript

Files:

  • app/views/transactions/_transaction.html.erb
app/views/**/_*.html.erb

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use partials only for simple, static HTML with minimal logic in specific contexts

app/views/**/_*.html.erb: Use underscore prefix for partial files (e.g., _trend_change.html.erb, _form_errors.html.erb, _sync_indicator.html.erb)
Place context-specific partials in relevant controller view directory (e.g., accounts/_account_sidebar_tabs.html.erb)

Files:

  • app/views/transactions/_transaction.html.erb
app/views/**/*.erb

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

app/views/**/*.erb: Always use the icon helper for icons in views, never use lucide_icon directly
Use Tailwind design tokens (e.g., text-primary, bg-container, border-secondary) instead of raw color names
Pass data to Stimulus controllers via data-*-value attributes instead of inline JavaScript
Prefer semantic HTML elements (dialog, details, summary) over JavaScript components
Use Turbo Frames for page sections instead of client-side solutions
Use server-side formatting for currencies, numbers, and dates instead of client-side

Views should use ERB and avoid heavy logic; prefer helpers and components instead (ERB checked by erb-lint per .erb_lint.yml)

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{css,erb}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Tailwind CSS v4.x with custom design system for styling

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{rb,erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{rb,erb,html.erb}: Use Current.user for the current user context in controllers and views. Do NOT use current_user.
Use Current.family for the current family context. Do NOT use current_family.

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{erb,html,vue,jsx,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html,vue,jsx,tsx}: Use Tailwind CSS v4.x with custom design system defined in app/assets/tailwind/maybe-design-system.css. Always use functional tokens (e.g., text-primary not text-white).
Prefer semantic HTML elements over JavaScript components (e.g., use <dialog> for modals, <details><summary> for disclosures).

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html.erb}: Use icon helper for icons, never use lucide_icon directly.
Leverage Turbo frames for page sections over client-side solutions.
Pass data to Stimulus controllers via data-*-value attributes, not inline JavaScript.

**/*.{erb,html.erb}: Use ViewComponents when: element has complex logic or styling patterns, will be reused across multiple views/contexts, needs structured styling with variants/sizes, requires interactive behavior or Stimulus controllers, has configurable slots or complex APIs, or needs accessibility features or ARIA support
Use Partials when: element is primarily static HTML with minimal logic, used in only one or few specific contexts, is simple template content, doesn't need variants/sizes/complex configuration, or is more about content organization than reusable functionality
Prefer components over partials: if a component is available in app/components, use it; if not, look for a partial; if neither exists, decide between component or partial based on complexity and reusability criteria
Keep domain logic out of views: compute values like button classes, conditional logic, and data transformations in the component file, not the template file
Always use the declarative approach when integrating Stimulus controllers in views: the ERB template should declare what happens using data-* attributes, and the Stimulus controller should respond
Component controllers in app/components/ should only be used within their component templates; global controllers in app/javascript/controllers/ can be used across any view
Pass data from Rails to Stimulus using data-*-value attributes, not inline JavaScript

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{erb,html.erb,rb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html.erb,rb}: All user-facing strings must use localization (i18n) via the t() helper. Update locale files for each new or changed element.
Use server-side formatting for currencies, numbers, and dates. Do not format in JavaScript.

Files:

  • app/views/transactions/_transaction.html.erb
app/views/**/_*.{erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Partials when element is primarily static HTML with minimal logic, used in only one or few contexts, is simple template content, or doesn't need variants/sizes/complex configuration.

Files:

  • app/views/transactions/_transaction.html.erb
{app/components/**/*.html.erb,app/views/**/*.{erb,html.erb}}

📄 CodeRabbit inference engine (CLAUDE.md)

Keep domain logic out of view templates. Logic belongs in component files, not template files.

Files:

  • app/views/transactions/_transaction.html.erb
**/*.erb

📄 CodeRabbit inference engine (CLAUDE.md)

Run bundle exec erb_lint ./app/**/*.erb -a for ERB linting with auto-correct before pull requests.

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{rb,erb}

📄 CodeRabbit inference engine (.cursor/rules/general-rules.mdc)

**/*.{rb,erb}: Use Current.user for accessing the current user. Do NOT use current_user
Use Current.family for accessing the current family. Do NOT use current_family

Files:

  • app/views/transactions/_transaction.html.erb
**/*.html.erb

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

**/*.html.erb: Prefer native HTML elements over JavaScript-based components. Use semantic HTML: for modals,

for disclosures
Leverage Turbo frames to break up pages instead of JavaScript-driven client-side solutions
Use the icon helper from application_helper.rb for icons. Never use lucide_icon helper directly

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{rb,js,erb}

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

Format currencies, numbers, dates, and other values server-side, then pass to Stimulus controllers for display only

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{rb,html.erb}

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

Use ActiveRecord validations for complex validations and business logic. Simple validations may be mirrored in ActiveRecord for form error handling convenience, but prioritize client-side form validation when possible

Files:

  • app/views/transactions/_transaction.html.erb
{app/views/**,app/helpers/**,app/javascript/controllers/**}

📄 CodeRabbit inference engine (.cursor/rules/ui-ux-design-guidelines.mdc)

{app/views/**,app/helpers/**,app/javascript/controllers/**}: Reference maybe-design-system.css for base primitives, functional tokens, and component tokens before writing styles
Prefer using functional design system tokens (e.g., text-primary, bg-container, border-primary) from maybe-design-system.css instead of raw Tailwind color values

Files:

  • app/views/transactions/_transaction.html.erb
{app/views/**,app/helpers/**}

📄 CodeRabbit inference engine (.cursor/rules/ui-ux-design-guidelines.mdc)

Always generate semantic HTML

Files:

  • app/views/transactions/_transaction.html.erb
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-09-23T22:23:22.963Z
Learning: Applies to app/views/**/*.html.erb : Use ViewComponents when elements have complex logic/styling, are reused across contexts, need variants/slots/accessibility, or require Stimulus interactivity
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/components/**/*.rb : Use viewComponents and Stimulus controllers organized alongside components in app/components/
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-11-24T16:57:20.318Z
Learning: Applies to **/*.{erb,html.erb} : Use ViewComponents when: element has complex logic or styling patterns, will be reused across multiple views/contexts, needs structured styling with variants/sizes, requires interactive behavior or Stimulus controllers, has configurable slots or complex APIs, or needs accessibility features or ARIA support
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-09-23T22:23:22.963Z
Learning: Applies to app/{views,components}/**/*.html.erb : Integrate Stimulus declaratively in ERB: templates declare data-controller/actions/targets; controllers respond to those declarations
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to {app/components/**/*.js,app/components/**/*.ts,app/javascript/controllers/**/*.{js,ts}} : Use Stimulus Controllers for interactivity, organized alongside components in `app/components/` or globally in `app/javascript/controllers/`.
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to {app/components/**/*.{js,ts},app/javascript/controllers/**/*.{js,ts},app/components/**/*.html.erb} : Use declarative Stimulus actions in HTML with `data-action` and `data-*-target` attributes. Keep controllers lightweight and simple (< 7 targets).
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to app/components/**/*.rb : Use ViewComponents when element has complex logic, will be reused across views, needs structured styling with variants/sizes, requires interactive behavior, has configurable slots, or needs accessibility/ARIA support.
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Keep Stimulus controller code for interactions that significantly improve UX when done client-side, such as bulk selection operations
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/javascript/controllers/**/*_controller.js : Keep Stimulus controllers small with private methods and clear public API
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/stimulus_conventions.mdc:0-0
Timestamp: 2025-09-23T22:22:00.149Z
Learning: Applies to app/{views,components}/**/*.html.erb : In ERB views, wire Stimulus interactions declaratively using data-action to call controller methods
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to config/locales/**/*.yml : Use hierarchical i18n keys by feature: `accounts.index.title`, `transactions.form.amount_label`. Use `t()` helper for all user-facing strings with interpolation for dynamic content.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html.erb} : Use `icon` helper for icons, never use `lucide_icon` directly.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:56:13.406Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Applies to **/*.html.erb : Prefer native HTML elements over JavaScript-based components. Use semantic HTML: <dialog> for modals, <details><summary> for disclosures

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html.erb,rb} : All user-facing strings must use localization (i18n) via the `t()` helper. Update locale files for each new or changed element.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.rb : Use Rails pluralization in i18n: `t("transactions.count", count: transactions.count)`.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-10-07T09:51:02.265Z
Learnt from: jjmata
Repo: we-promise/sure PR: 189
File: app/views/password_resets/new.html.erb:14-14
Timestamp: 2025-10-07T09:51:02.265Z
Learning: In the we-promise/sure repository, use i18n methods (like `t()` or `I18n.t`) for all user-facing strings to maintain proper internationalization infrastructure. While translations should be provided, extensive localization work is not a priority at this stage of development.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-10-01T11:40:36.711Z
Learnt from: jjmata
Repo: we-promise/sure PR: 173
File: app/mailers/email_confirmation_mailer.rb:9-9
Timestamp: 2025-10-01T11:40:36.711Z
Learning: In the we-promise/sure repository, i18n (internationalization) is used throughout the application for translations. When making branding configurable (e.g., product names), it's appropriate to add parameters like `product: product_name` to existing `t()` translation calls rather than replacing them with hardcoded strings.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:56:13.406Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Applies to **/*.{rb,js,erb} : Format currencies, numbers, dates, and other values server-side, then pass to Stimulus controllers for display only

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:56:13.406Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Applies to **/*.html.erb : Leverage Turbo frames to break up pages instead of JavaScript-driven client-side solutions

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/views/**/*.erb : Use Turbo Frames for page sections instead of client-side solutions

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html.erb} : Leverage Turbo frames for page sections over client-side solutions.

Applied to files:

  • app/views/transactions/_transaction.html.erb
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci / test
🔇 Additional comments (2)
app/views/transactions/_transaction.html.erb (2)

10-18: LGTM on checkbox wiring.

The checkbox setup correctly integrates with both the bulk-select and checkbox_toggle Stimulus controllers via declarative data attributes, following the project's Stimulus conventions.


120-124: LGTM on amount container.

The responsive column span adjustments (col-span-4 lg:col-span-2) and ml-auto alignment properly support the mobile layout improvements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ba549c9 and de24ced.

📒 Files selected for processing (2)
  • app/components/UI/account/activity_feed.html.erb (3 hunks)
  • app/views/transactions/searches/_form.html.erb (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/components/UI/account/activity_feed.html.erb
🧰 Additional context used
📓 Path-based instructions (17)
{app/**/*.{erb,html},app/javascript/**/*.js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Prefer Hotwire-first approach: use Turbo + Stimulus for reactive UI without heavy JavaScript

Files:

  • app/views/transactions/searches/_form.html.erb
app/views/**/_*.html.erb

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use partials only for simple, static HTML with minimal logic in specific contexts

app/views/**/_*.html.erb: Use underscore prefix for partial files (e.g., _trend_change.html.erb, _form_errors.html.erb, _sync_indicator.html.erb)
Place context-specific partials in relevant controller view directory (e.g., accounts/_account_sidebar_tabs.html.erb)

Files:

  • app/views/transactions/searches/_form.html.erb
app/views/**/*.erb

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

app/views/**/*.erb: Always use the icon helper for icons in views, never use lucide_icon directly
Use Tailwind design tokens (e.g., text-primary, bg-container, border-secondary) instead of raw color names
Pass data to Stimulus controllers via data-*-value attributes instead of inline JavaScript
Prefer semantic HTML elements (dialog, details, summary) over JavaScript components
Use Turbo Frames for page sections instead of client-side solutions
Use server-side formatting for currencies, numbers, and dates instead of client-side

Views should use ERB and avoid heavy logic; prefer helpers and components instead (ERB checked by erb-lint per .erb_lint.yml)

Files:

  • app/views/transactions/searches/_form.html.erb
**/*.{css,erb}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Tailwind CSS v4.x with custom design system for styling

Files:

  • app/views/transactions/searches/_form.html.erb
**/*.{rb,erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{rb,erb,html.erb}: Use Current.user for the current user context in controllers and views. Do NOT use current_user.
Use Current.family for the current family context. Do NOT use current_family.

Files:

  • app/views/transactions/searches/_form.html.erb
**/*.{erb,html,vue,jsx,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html,vue,jsx,tsx}: Use Tailwind CSS v4.x with custom design system defined in app/assets/tailwind/maybe-design-system.css. Always use functional tokens (e.g., text-primary not text-white).
Prefer semantic HTML elements over JavaScript components (e.g., use <dialog> for modals, <details><summary> for disclosures).

Files:

  • app/views/transactions/searches/_form.html.erb
**/*.{erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html.erb}: Use icon helper for icons, never use lucide_icon directly.
Leverage Turbo frames for page sections over client-side solutions.
Pass data to Stimulus controllers via data-*-value attributes, not inline JavaScript.

**/*.{erb,html.erb}: Use ViewComponents when: element has complex logic or styling patterns, will be reused across multiple views/contexts, needs structured styling with variants/sizes, requires interactive behavior or Stimulus controllers, has configurable slots or complex APIs, or needs accessibility features or ARIA support
Use Partials when: element is primarily static HTML with minimal logic, used in only one or few specific contexts, is simple template content, doesn't need variants/sizes/complex configuration, or is more about content organization than reusable functionality
Prefer components over partials: if a component is available in app/components, use it; if not, look for a partial; if neither exists, decide between component or partial based on complexity and reusability criteria
Keep domain logic out of views: compute values like button classes, conditional logic, and data transformations in the component file, not the template file
Always use the declarative approach when integrating Stimulus controllers in views: the ERB template should declare what happens using data-* attributes, and the Stimulus controller should respond
Component controllers in app/components/ should only be used within their component templates; global controllers in app/javascript/controllers/ can be used across any view
Pass data from Rails to Stimulus using data-*-value attributes, not inline JavaScript

Files:

  • app/views/transactions/searches/_form.html.erb
**/*.{erb,html.erb,rb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html.erb,rb}: All user-facing strings must use localization (i18n) via the t() helper. Update locale files for each new or changed element.
Use server-side formatting for currencies, numbers, and dates. Do not format in JavaScript.

Files:

  • app/views/transactions/searches/_form.html.erb
app/views/**/_*.{erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Partials when element is primarily static HTML with minimal logic, used in only one or few contexts, is simple template content, or doesn't need variants/sizes/complex configuration.

Files:

  • app/views/transactions/searches/_form.html.erb
{app/components/**/*.html.erb,app/views/**/*.{erb,html.erb}}

📄 CodeRabbit inference engine (CLAUDE.md)

Keep domain logic out of view templates. Logic belongs in component files, not template files.

Files:

  • app/views/transactions/searches/_form.html.erb
**/*.erb

📄 CodeRabbit inference engine (CLAUDE.md)

Run bundle exec erb_lint ./app/**/*.erb -a for ERB linting with auto-correct before pull requests.

Files:

  • app/views/transactions/searches/_form.html.erb
**/*.{rb,erb}

📄 CodeRabbit inference engine (.cursor/rules/general-rules.mdc)

**/*.{rb,erb}: Use Current.user for accessing the current user. Do NOT use current_user
Use Current.family for accessing the current family. Do NOT use current_family

Files:

  • app/views/transactions/searches/_form.html.erb
**/*.html.erb

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

**/*.html.erb: Prefer native HTML elements over JavaScript-based components. Use semantic HTML: for modals,

for disclosures
Leverage Turbo frames to break up pages instead of JavaScript-driven client-side solutions
Use the icon helper from application_helper.rb for icons. Never use lucide_icon helper directly

Files:

  • app/views/transactions/searches/_form.html.erb
**/*.{rb,js,erb}

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

Format currencies, numbers, dates, and other values server-side, then pass to Stimulus controllers for display only

Files:

  • app/views/transactions/searches/_form.html.erb
**/*.{rb,html.erb}

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

Use ActiveRecord validations for complex validations and business logic. Simple validations may be mirrored in ActiveRecord for form error handling convenience, but prioritize client-side form validation when possible

Files:

  • app/views/transactions/searches/_form.html.erb
{app/views/**,app/helpers/**,app/javascript/controllers/**}

📄 CodeRabbit inference engine (.cursor/rules/ui-ux-design-guidelines.mdc)

{app/views/**,app/helpers/**,app/javascript/controllers/**}: Reference maybe-design-system.css for base primitives, functional tokens, and component tokens before writing styles
Prefer using functional design system tokens (e.g., text-primary, bg-container, border-primary) from maybe-design-system.css instead of raw Tailwind color values

Files:

  • app/views/transactions/searches/_form.html.erb
{app/views/**,app/helpers/**}

📄 CodeRabbit inference engine (.cursor/rules/ui-ux-design-guidelines.mdc)

Always generate semantic HTML

Files:

  • app/views/transactions/searches/_form.html.erb
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Keep Stimulus controller code for interactions that significantly improve UX when done client-side, such as bulk selection operations
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-09-23T22:23:22.963Z
Learning: Applies to app/{views,components}/**/*.html.erb : Integrate Stimulus declaratively in ERB: templates declare data-controller/actions/targets; controllers respond to those declarations
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to {app/components/**/*.js,app/components/**/*.ts,app/javascript/controllers/**/*.{js,ts}} : Use Stimulus Controllers for interactivity, organized alongside components in `app/components/` or globally in `app/javascript/controllers/`.
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to {app/components/**/*.{js,ts},app/javascript/controllers/**/*.{js,ts},app/components/**/*.html.erb} : Use declarative Stimulus actions in HTML with `data-action` and `data-*-target` attributes. Keep controllers lightweight and simple (< 7 targets).
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/components/**/*.rb : Use viewComponents and Stimulus controllers organized alongside components in app/components/
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/javascript/controllers/**/*_controller.js : Keep Stimulus controllers small with private methods and clear public API
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-09-23T22:23:22.963Z
Learning: Applies to app/javascript/controllers/**/*.js : Global Stimulus controllers under app/javascript/controllers/ can be used across any view
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to {app/**/*.{erb,html},app/javascript/**/*.js} : Prefer Hotwire-first approach: use Turbo + Stimulus for reactive UI without heavy JavaScript
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Place component-specific Stimulus controllers in component directory, global controllers in app/javascript/controllers/
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/stimulus_conventions.mdc:0-0
Timestamp: 2025-09-23T22:22:00.149Z
Learning: Applies to app/{views,components}/**/*.html.erb : In ERB views, wire Stimulus interactions declaratively using data-action to call controller methods
📚 Learning: 2025-09-23T22:22:00.149Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/stimulus_conventions.mdc:0-0
Timestamp: 2025-09-23T22:22:00.149Z
Learning: Applies to app/{views,components}/**/*.html.erb : In ERB views, wire Stimulus interactions declaratively using data-action to call controller methods

Applied to files:

  • app/views/transactions/searches/_form.html.erb
📚 Learning: 2025-11-24T16:56:13.406Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Applies to **/*.html.erb : Prefer native HTML elements over JavaScript-based components. Use semantic HTML: <dialog> for modals, <details><summary> for disclosures

Applied to files:

  • app/views/transactions/searches/_form.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html.erb,rb} : All user-facing strings must use localization (i18n) via the `t()` helper. Update locale files for each new or changed element.

Applied to files:

  • app/views/transactions/searches/_form.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to config/locales/**/*.yml : Use hierarchical i18n keys by feature: `accounts.index.title`, `transactions.form.amount_label`. Use `t()` helper for all user-facing strings with interpolation for dynamic content.

Applied to files:

  • app/views/transactions/searches/_form.html.erb
📚 Learning: 2025-10-07T09:51:02.265Z
Learnt from: jjmata
Repo: we-promise/sure PR: 189
File: app/views/password_resets/new.html.erb:14-14
Timestamp: 2025-10-07T09:51:02.265Z
Learning: In the we-promise/sure repository, use i18n methods (like `t()` or `I18n.t`) for all user-facing strings to maintain proper internationalization infrastructure. While translations should be provided, extensive localization work is not a priority at this stage of development.

Applied to files:

  • app/views/transactions/searches/_form.html.erb
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci / test

Comment on lines +34 to +43
<%= button_tag type: "button",
id: "toggle-checkboxes-button",
aria: { label: t(".toggle_selection_checkboxes") },
class: "lg:hidden font-medium whitespace-nowrap inline-flex items-center gap-1 rounded-lg px-3 py-2 text-sm text-primary border border-secondary hover:bg-surface-hover",
data: {
action: "click->checkbox-toggle#toggle",
checkbox_toggle_target: "toggleButton"
} do %>
<%= icon("list-todo") %>
<% end %>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

rg "toggle_selection_checkboxes" config/locales/ -A 2 -B 2

Repository: we-promise/sure

Length of output: 41


🏁 Script executed:

cat -n app/views/transactions/searches/_form.html.erb | sed -n '34,43p'

Repository: we-promise/sure

Length of output: 618


🏁 Script executed:

# Check for any related i18n keys in the transactions search form locale
rg "transactions\.searches\.form\." config/locales/ | head -20

Repository: we-promise/sure

Length of output: 41


Add the missing i18n key to your locale files.

The button uses t(".toggle_selection_checkboxes") but the translation key transactions.searches.form.toggle_selection_checkboxes does not exist in config/locales/. Without this key, the aria-label will not render properly and the application may display the translation key as fallback text.

Add the key to your locale files:

# config/locales/en.yml (or appropriate locale)
en:
  transactions:
    searches:
      form:
        toggle_selection_checkboxes: "Toggle all checkboxes"  # or appropriate label text

The rest of the implementation (Stimulus bindings, icon helper, Tailwind tokens, semantic HTML) is correct.

🤖 Prompt for AI Agents
In app/views/transactions/searches/_form.html.erb around lines 34 to 43, the
button calls t(".toggle_selection_checkboxes") but the i18n key
transactions.searches.form.toggle_selection_checkboxes is missing from
config/locales, causing the aria-label fallback to display the key; add the
missing key to your locale YAML (e.g., en) under transactions -> searches ->
form with an appropriate string like "Toggle all checkboxes" so the translation
resolves correctly.

@alessiocappa
Copy link
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Dec 16, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/views/transactions/_transaction.html.erb (1)

76-76: Internationalize hardcoded strings in title attribute.

The title attribute contains hardcoded English strings "One-time", "income", and "expense" that should use the t() helper for consistency with the project's i18n guidelines.

Apply this diff:

-                      <span class="text-orange-500" title="One-time <%= entry.amount.negative? ? "income" : "expense" %> (excluded from averages)">
+                      <span class="text-orange-500" title="<%= t('transactions.one_time_tooltip', type: entry.amount.negative? ? t('transactions.income') : t('transactions.expense')) %>">
                         <%= icon "asterisk", size: "sm", color: "current" %>
                       </span>

Remember to add the corresponding keys to your locale files (e.g., transactions.one_time_tooltip: "One-time %{type} (excluded from averages)", transactions.income: "income", transactions.expense: "expense").

As per coding guidelines: all user-facing strings must use i18n.

♻️ Duplicate comments (1)
app/views/transactions/_transaction.html.erb (1)

28-35: Remove redundant wrapper div.

The inner <div class="hidden lg:flex"> on line 28 is redundant since it's already nested inside the outer <div class="hidden lg:flex"> container starting at line 22. The parent container already handles the responsive visibility.

Apply this diff to remove the redundant wrapper:

       <% else %>
-        <div class="hidden lg:flex">
-          <%= render DS::FilledIcon.new(
-            variant: :text,
-            text: entry.name,
-            size: "lg",
-            rounded: true
-          ) %>
-        </div>
+        <%= render DS::FilledIcon.new(
+          variant: :text,
+          text: entry.name,
+          size: "lg",
+          rounded: true
+        ) %>
       <% end %>
🧹 Nitpick comments (2)
app/views/transactions/_transaction.html.erb (2)

7-7: Consider using a design system token for the excluded state color.

The text-gray-400 class is a raw Tailwind color. Per coding guidelines, prefer functional design system tokens (e.g., text-tertiary or text-disabled) from maybe-design-system.css instead of raw color values.

Based on coding guidelines for functional token usage.


123-123: Consider using a design system token for income amount color.

The text-green-600 class for income amounts is a raw Tailwind color. Per coding guidelines, prefer functional design system tokens from maybe-design-system.css (e.g., text-success or a transaction-specific token like text-income) instead of raw color values.

Based on coding guidelines for functional token usage.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b61e2f and 9f54836.

📒 Files selected for processing (1)
  • app/views/transactions/_transaction.html.erb (3 hunks)
🧰 Additional context used
📓 Path-based instructions (17)
{app/**/*.{erb,html},app/javascript/**/*.js}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Prefer Hotwire-first approach: use Turbo + Stimulus for reactive UI without heavy JavaScript

Files:

  • app/views/transactions/_transaction.html.erb
app/views/**/_*.html.erb

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use partials only for simple, static HTML with minimal logic in specific contexts

app/views/**/_*.html.erb: Use underscore prefix for partial files (e.g., _trend_change.html.erb, _form_errors.html.erb, _sync_indicator.html.erb)
Place context-specific partials in relevant controller view directory (e.g., accounts/_account_sidebar_tabs.html.erb)

Files:

  • app/views/transactions/_transaction.html.erb
app/views/**/*.erb

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

app/views/**/*.erb: Always use the icon helper for icons in views, never use lucide_icon directly
Use Tailwind design tokens (e.g., text-primary, bg-container, border-secondary) instead of raw color names
Pass data to Stimulus controllers via data-*-value attributes instead of inline JavaScript
Prefer semantic HTML elements (dialog, details, summary) over JavaScript components
Use Turbo Frames for page sections instead of client-side solutions
Use server-side formatting for currencies, numbers, and dates instead of client-side

Views should use ERB and avoid heavy logic; prefer helpers and components instead (ERB checked by erb-lint per .erb_lint.yml)

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{css,erb}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Tailwind CSS v4.x with custom design system for styling

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{rb,erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{rb,erb,html.erb}: Use Current.user for the current user context in controllers and views. Do NOT use current_user.
Use Current.family for the current family context. Do NOT use current_family.

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{erb,html,vue,jsx,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html,vue,jsx,tsx}: Use Tailwind CSS v4.x with custom design system defined in app/assets/tailwind/maybe-design-system.css. Always use functional tokens (e.g., text-primary not text-white).
Prefer semantic HTML elements over JavaScript components (e.g., use <dialog> for modals, <details><summary> for disclosures).

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html.erb}: Use icon helper for icons, never use lucide_icon directly.
Leverage Turbo frames for page sections over client-side solutions.
Pass data to Stimulus controllers via data-*-value attributes, not inline JavaScript.

**/*.{erb,html.erb}: Use ViewComponents when: element has complex logic or styling patterns, will be reused across multiple views/contexts, needs structured styling with variants/sizes, requires interactive behavior or Stimulus controllers, has configurable slots or complex APIs, or needs accessibility features or ARIA support
Use Partials when: element is primarily static HTML with minimal logic, used in only one or few specific contexts, is simple template content, doesn't need variants/sizes/complex configuration, or is more about content organization than reusable functionality
Prefer components over partials: if a component is available in app/components, use it; if not, look for a partial; if neither exists, decide between component or partial based on complexity and reusability criteria
Keep domain logic out of views: compute values like button classes, conditional logic, and data transformations in the component file, not the template file
Always use the declarative approach when integrating Stimulus controllers in views: the ERB template should declare what happens using data-* attributes, and the Stimulus controller should respond
Component controllers in app/components/ should only be used within their component templates; global controllers in app/javascript/controllers/ can be used across any view
Pass data from Rails to Stimulus using data-*-value attributes, not inline JavaScript

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{erb,html.erb,rb}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{erb,html.erb,rb}: All user-facing strings must use localization (i18n) via the t() helper. Update locale files for each new or changed element.
Use server-side formatting for currencies, numbers, and dates. Do not format in JavaScript.

Files:

  • app/views/transactions/_transaction.html.erb
app/views/**/_*.{erb,html.erb}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Partials when element is primarily static HTML with minimal logic, used in only one or few contexts, is simple template content, or doesn't need variants/sizes/complex configuration.

Files:

  • app/views/transactions/_transaction.html.erb
{app/components/**/*.html.erb,app/views/**/*.{erb,html.erb}}

📄 CodeRabbit inference engine (CLAUDE.md)

Keep domain logic out of view templates. Logic belongs in component files, not template files.

Files:

  • app/views/transactions/_transaction.html.erb
**/*.erb

📄 CodeRabbit inference engine (CLAUDE.md)

Run bundle exec erb_lint ./app/**/*.erb -a for ERB linting with auto-correct before pull requests.

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{rb,erb}

📄 CodeRabbit inference engine (.cursor/rules/general-rules.mdc)

**/*.{rb,erb}: Use Current.user for accessing the current user. Do NOT use current_user
Use Current.family for accessing the current family. Do NOT use current_family

Files:

  • app/views/transactions/_transaction.html.erb
**/*.html.erb

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

**/*.html.erb: Prefer native HTML elements over JavaScript-based components. Use semantic HTML: for modals,

for disclosures
Leverage Turbo frames to break up pages instead of JavaScript-driven client-side solutions
Use the icon helper from application_helper.rb for icons. Never use lucide_icon helper directly

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{rb,js,erb}

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

Format currencies, numbers, dates, and other values server-side, then pass to Stimulus controllers for display only

Files:

  • app/views/transactions/_transaction.html.erb
**/*.{rb,html.erb}

📄 CodeRabbit inference engine (.cursor/rules/project-conventions.mdc)

Use ActiveRecord validations for complex validations and business logic. Simple validations may be mirrored in ActiveRecord for form error handling convenience, but prioritize client-side form validation when possible

Files:

  • app/views/transactions/_transaction.html.erb
{app/views/**,app/helpers/**,app/javascript/controllers/**}

📄 CodeRabbit inference engine (.cursor/rules/ui-ux-design-guidelines.mdc)

{app/views/**,app/helpers/**,app/javascript/controllers/**}: Reference maybe-design-system.css for base primitives, functional tokens, and component tokens before writing styles
Prefer using functional design system tokens (e.g., text-primary, bg-container, border-primary) from maybe-design-system.css instead of raw Tailwind color values

Files:

  • app/views/transactions/_transaction.html.erb
{app/views/**,app/helpers/**}

📄 CodeRabbit inference engine (.cursor/rules/ui-ux-design-guidelines.mdc)

Always generate semantic HTML

Files:

  • app/views/transactions/_transaction.html.erb
🧠 Learnings (17)
📓 Common learnings
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/view_conventions.mdc:0-0
Timestamp: 2025-09-23T22:23:22.963Z
Learning: Applies to app/{views,components}/**/*.html.erb : Integrate Stimulus declaratively in ERB: templates declare data-controller/actions/targets; controllers respond to those declarations
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Keep Stimulus controller code for interactions that significantly improve UX when done client-side, such as bulk selection operations
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to {app/components/**/*.js,app/components/**/*.ts,app/javascript/controllers/**/*.{js,ts}} : Use Stimulus Controllers for interactivity, organized alongside components in `app/components/` or globally in `app/javascript/controllers/`.
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/components/**/*.rb : Use viewComponents and Stimulus controllers organized alongside components in app/components/
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to {app/**/*.{erb,html},app/javascript/**/*.js} : Prefer Hotwire-first approach: use Turbo + Stimulus for reactive UI without heavy JavaScript
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to {app/components/**/*.{js,ts},app/javascript/controllers/**/*.{js,ts},app/components/**/*.html.erb} : Use declarative Stimulus actions in HTML with `data-action` and `data-*-target` attributes. Keep controllers lightweight and simple (< 7 targets).
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/stimulus_conventions.mdc:0-0
Timestamp: 2025-09-23T22:22:00.149Z
Learning: Applies to app/{views,components}/**/*.html.erb : In ERB views, wire Stimulus interactions declaratively using data-action to call controller methods
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/javascript/controllers/**/*_controller.js : Keep Stimulus controllers small with private methods and clear public API
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to config/locales/**/*.yml : Use hierarchical i18n keys by feature: `accounts.index.title`, `transactions.form.amount_label`. Use `t()` helper for all user-facing strings with interpolation for dynamic content.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html.erb} : Use `icon` helper for icons, never use `lucide_icon` directly.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:56:13.406Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Applies to **/*.html.erb : Prefer native HTML elements over JavaScript-based components. Use semantic HTML: <dialog> for modals, <details><summary> for disclosures

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html.erb,rb} : All user-facing strings must use localization (i18n) via the `t()` helper. Update locale files for each new or changed element.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.rb : Use Rails pluralization in i18n: `t("transactions.count", count: transactions.count)`.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-10-07T09:51:02.265Z
Learnt from: jjmata
Repo: we-promise/sure PR: 189
File: app/views/password_resets/new.html.erb:14-14
Timestamp: 2025-10-07T09:51:02.265Z
Learning: In the we-promise/sure repository, use i18n methods (like `t()` or `I18n.t`) for all user-facing strings to maintain proper internationalization infrastructure. While translations should be provided, extensive localization work is not a priority at this stage of development.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-10-01T11:40:36.711Z
Learnt from: jjmata
Repo: we-promise/sure PR: 173
File: app/mailers/email_confirmation_mailer.rb:9-9
Timestamp: 2025-10-01T11:40:36.711Z
Learning: In the we-promise/sure repository, i18n (internationalization) is used throughout the application for translations. When making branding configurable (e.g., product names), it's appropriate to add parameters like `product: product_name` to existing `t()` translation calls rather than replacing them with hardcoded strings.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:56:13.406Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Applies to **/*.{rb,js,erb} : Format currencies, numbers, dates, and other values server-side, then pass to Stimulus controllers for display only

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html,vue,jsx,tsx} : Use Tailwind CSS v4.x with custom design system defined in `app/assets/tailwind/maybe-design-system.css`. Always use functional tokens (e.g., `text-primary` not `text-white`).

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to **/*.{css,erb} : Use Tailwind CSS v4.x with custom design system for styling

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:57:09.166Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/ui-ux-design-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:57:09.166Z
Learning: Applies to {app/views/**,app/helpers/**,app/javascript/controllers/**} : Prefer using functional design system tokens (e.g., text-primary, bg-container, border-primary) from maybe-design-system.css instead of raw Tailwind color values

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/views/**/*.erb : Use Tailwind design tokens (e.g., text-primary, bg-container, border-secondary) instead of raw color names

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to app/assets/tailwind/**/*.css : Never create new styles in design system files without permission. Always reference `app/assets/tailwind/maybe-design-system.css` for primitives and tokens.

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:56:13.406Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .cursor/rules/project-conventions.mdc:0-0
Timestamp: 2025-11-24T16:56:13.406Z
Learning: Applies to **/*.html.erb : Leverage Turbo frames to break up pages instead of JavaScript-driven client-side solutions

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:54:59.198Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:54:59.198Z
Learning: Applies to app/views/**/*.erb : Use Turbo Frames for page sections instead of client-side solutions

Applied to files:

  • app/views/transactions/_transaction.html.erb
📚 Learning: 2025-11-24T16:55:43.069Z
Learnt from: CR
Repo: we-promise/sure PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:55:43.069Z
Learning: Applies to **/*.{erb,html.erb} : Leverage Turbo frames for page sections over client-side solutions.

Applied to files:

  • app/views/transactions/_transaction.html.erb
🔇 Additional comments (3)
app/views/transactions/_transaction.html.erb (3)

10-18: LGTM!

The declarative Stimulus integration using data-checkbox_toggle-target follows the project's conventions. Hiding the checkbox on mobile (hidden lg:block) aligns with the PR's goal to save space on smaller screens.


38-45: LGTM!

The mobile category rendering with merchant logo badge overlay is well-implemented. The flex md:hidden breakpoint aligns correctly with the desktop category section at line 116 (hidden md:flex), eliminating the overlap issue from earlier reviews.


93-107: LGTM!

The responsive merchant and category metadata rendering effectively handles desktop vs. mobile layouts. The use of the new categories/category_name_mobile partial at line 103 follows the component-based approach described in the PR objectives.

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.

1 participant