-
Notifications
You must be signed in to change notification settings - Fork 121
Transactions & Activities pages improvements #452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Transactions & Activities pages improvements #452
Conversation
…ler compatible also in this view.
WalkthroughAdds 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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 ternarytransaction.transfer&.payment? ? payment_category : transfer_categoryis 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-labelattribute 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-2class on line 38 has no effect since the parent container usesflexlayout 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 endThis would reduce template complexity and make the logic easier to test.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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.cssapp/views/entries/_selection_bar.html.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/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.cssfor 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 inapp/javascript/, and styles/assets inapp/assets/(Tailwind, images, fonts)
Files:
app/assets/tailwind/maybe-design-system.cssapp/controllers/transaction_categories_controller.rbapp/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 lintandnpm run format
Files:
app/assets/tailwind/maybe-design-system.cssapp/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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/javascript/controllers/checkbox_toggle_controller.jsapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erb
app/views/**/*.erb
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
app/views/**/*.erb: Always use theiconhelper for icons in views, never uselucide_icondirectly
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-sideViews should use ERB and avoid heavy logic; prefer helpers and components instead (ERB checked by
erb-lintper.erb_lint.yml)
Files:
app/views/entries/_selection_bar.html.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erb
**/*.{rb,erb,html.erb}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{rb,erb,html.erb}: UseCurrent.userfor the current user context in controllers and views. Do NOT usecurrent_user.
UseCurrent.familyfor the current family context. Do NOT usecurrent_family.
Files:
app/views/entries/_selection_bar.html.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/controllers/transaction_categories_controller.rbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/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 inapp/assets/tailwind/maybe-design-system.css. Always use functional tokens (e.g.,text-primarynottext-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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/components/UI/account/activity_feed.html.erb
**/*.{erb,html.erb}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{erb,html.erb}: Useiconhelper for icons, never uselucide_icondirectly.
Leverage Turbo frames for page sections over client-side solutions.
Pass data to Stimulus controllers viadata-*-valueattributes, 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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/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 thet()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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/controllers/transaction_categories_controller.rbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/components/UI/account/activity_feed.html.erb
**/*.erb
📄 CodeRabbit inference engine (CLAUDE.md)
Run
bundle exec erb_lint ./app/**/*.erb -afor ERB linting with auto-correct before pull requests.
Files:
app/views/entries/_selection_bar.html.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/components/UI/account/activity_feed.html.erb
**/*.{rb,erb}
📄 CodeRabbit inference engine (.cursor/rules/general-rules.mdc)
**/*.{rb,erb}: UseCurrent.userfor accessing the current user. Do NOT usecurrent_user
UseCurrent.familyfor accessing the current family. Do NOT usecurrent_family
Files:
app/views/entries/_selection_bar.html.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/controllers/transaction_categories_controller.rbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/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 theiconhelper from application_helper.rb for icons. Never uselucide_iconhelper directly
Files:
app/views/entries/_selection_bar.html.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/controllers/transaction_categories_controller.rbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/javascript/controllers/checkbox_toggle_controller.jsapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/controllers/transaction_categories_controller.rbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/views/entries/_entry_group.html.erbapp/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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/javascript/controllers/checkbox_toggle_controller.jsapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/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.erbapp/views/transactions/_transfer_match.html.erbapp/views/valuations/_valuation.html.erbapp/views/categories/_menu.html.erbapp/views/transactions/_transaction_category.html.erbapp/views/accounts/_logo.html.erbapp/views/shared/_ruler.html.erbapp/views/categories/_badge_mobile.html.erbapp/views/categories/_category_name_mobile.html.erbapp/views/category/dropdowns/_row.html.erbapp/views/transactions/index.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/views/accounts/show/_activity.html.erbapp/views/transactions/_transaction.html.erbapp/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).
Runbin/rubocop -f github -afor Ruby linting with auto-correct before pull requests.
**/*.rb: Ruby code should use 2-space indent,snake_casefor methods and variables, andCamelCasefor 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/brakemansecurity 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 inapp/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-actionanddata-*-targetattributes. Keep controllers lightweight and simple (< 7 targets).
Files:
app/javascript/controllers/checkbox_toggle_controller.jsapp/components/UI/account/activity_date.html.erbapp/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 inapp/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
lowerCamelCasefor variables and functions, andPascalCasefor 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.erbapp/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.cssapp/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.erbapp/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.erbapp/views/categories/_menu.html.erbapp/views/shared/_ruler.html.erbapp/views/shared/_pagination.html.erbapp/views/transactions/searches/_form.html.erbapp/components/UI/account/activity_date.html.erbapp/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.erbapp/views/categories/_menu.html.erbapp/views/shared/_ruler.html.erbapp/views/shared/_pagination.html.erbapp/components/UI/account/activity_date.html.erbapp/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.erbapp/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.erbapp/controllers/transaction_categories_controller.rbapp/views/category/dropdowns/_row.html.erbapp/views/accounts/show/_activity.html.erbapp/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.erbapp/views/category/dropdowns/_row.html.erbapp/views/shared/_pagination.html.erbapp/views/accounts/show/_activity.html.erbapp/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.jsapp/components/UI/account/activity_date.html.erbapp/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.jsapp/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.jsapp/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.erbapp/views/categories/_badge_mobile.html.erbapp/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.erbapp/views/accounts/show/_activity.html.erbapp/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.erbapp/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-3is 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 considerdom_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, considerdom_id(transaction, :category_name_mobile)instead of a hard-coded string target.app/components/UI/account/activity_date.html.erb (1)
7-12: Wiring tocheckbox-toggletarget 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 thecategory_dropdownTurbo 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: Confirmentries.size == 0class override is intentional (Tailwind class conflict ordering)
Whenentries.size == 0, this renders bothlg:blockandlg: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: Verifybottom-30exists in your Tailwind v4 config
Ifbottom-30isn’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: composingbulk-select+checkbox-toggleis 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-togglewiring 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_toggleStimulus 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-togglecontroller 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_toggleStimulus controller, matching the PR objectives perfectly.
42-42: Replaceborder-1withborder.The
border-1class is not defined in your Tailwind configuration. Use the standardborderutility class (which applies a 1px border) instead.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Alessio Cappa <[email protected]>
This reverts commit 9766c50.
There was a problem hiding this 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
📒 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 theiconhelper for icons in views, never uselucide_icondirectly
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-sideViews should use ERB and avoid heavy logic; prefer helpers and components instead (ERB checked by
erb-lintper.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}: UseCurrent.userfor the current user context in controllers and views. Do NOT usecurrent_user.
UseCurrent.familyfor the current family context. Do NOT usecurrent_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 inapp/assets/tailwind/maybe-design-system.css. Always use functional tokens (e.g.,text-primarynottext-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}: Useiconhelper for icons, never uselucide_icondirectly.
Leverage Turbo frames for page sections over client-side solutions.
Pass data to Stimulus controllers viadata-*-valueattributes, 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 thet()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 -afor 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}: UseCurrent.userfor accessing the current user. Do NOT usecurrent_user
UseCurrent.familyfor accessing the current family. Do NOT usecurrent_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 theiconhelper from application_helper.rb for icons. Never uselucide_iconhelper 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-selectandcheckbox_toggleStimulus 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) andml-autoalignment properly support the mobile layout improvements.
There was a problem hiding this 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
📒 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 theiconhelper for icons in views, never uselucide_icondirectly
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-sideViews should use ERB and avoid heavy logic; prefer helpers and components instead (ERB checked by
erb-lintper.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}: UseCurrent.userfor the current user context in controllers and views. Do NOT usecurrent_user.
UseCurrent.familyfor the current family context. Do NOT usecurrent_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 inapp/assets/tailwind/maybe-design-system.css. Always use functional tokens (e.g.,text-primarynottext-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}: Useiconhelper for icons, never uselucide_icondirectly.
Leverage Turbo frames for page sections over client-side solutions.
Pass data to Stimulus controllers viadata-*-valueattributes, 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 thet()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 -afor 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}: UseCurrent.userfor accessing the current user. Do NOT usecurrent_user
UseCurrent.familyfor accessing the current family. Do NOT usecurrent_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 theiconhelper from application_helper.rb for icons. Never uselucide_iconhelper 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
| <%= 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 %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
rg "toggle_selection_checkboxes" config/locales/ -A 2 -B 2Repository: 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 -20Repository: 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 textThe 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.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this 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 thet()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-400class is a raw Tailwind color. Per coding guidelines, prefer functional design system tokens (e.g.,text-tertiaryortext-disabled) frommaybe-design-system.cssinstead 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-600class for income amounts is a raw Tailwind color. Per coding guidelines, prefer functional design system tokens frommaybe-design-system.css(e.g.,text-successor a transaction-specific token liketext-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
📒 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 theiconhelper for icons in views, never uselucide_icondirectly
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-sideViews should use ERB and avoid heavy logic; prefer helpers and components instead (ERB checked by
erb-lintper.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}: UseCurrent.userfor the current user context in controllers and views. Do NOT usecurrent_user.
UseCurrent.familyfor the current family context. Do NOT usecurrent_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 inapp/assets/tailwind/maybe-design-system.css. Always use functional tokens (e.g.,text-primarynottext-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}: Useiconhelper for icons, never uselucide_icondirectly.
Leverage Turbo frames for page sections over client-side solutions.
Pass data to Stimulus controllers viadata-*-valueattributes, 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 thet()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 -afor 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}: UseCurrent.userfor accessing the current user. Do NOT usecurrent_user
UseCurrent.familyfor accessing the current family. Do NOT usecurrent_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 theiconhelper from application_helper.rb for icons. Never uselucide_iconhelper 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-targetfollows 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:hiddenbreakpoint 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_mobilepartial at line 103 follows the component-based approach described in the PR objectives.
This PR aims to improve the transactions and activities pages on mobile.
Here are the changes:
Summary by CodeRabbit
New Features
UI Improvements
✏️ Tip: You can customize this high-level summary in your review settings.