Address all Gemini code review feedback for SimpleFin integration

- Remove debug console.log statements from JavaScript controller
- Consolidate duplicate SimpleFin account creation methods into single method
- Refactor SimplefinItemsController to reduce complexity with helper methods
- Fix HTTParty thread-safety by moving SSL options to class level
- Remove redundant HTTParty options from individual requests
- Add proper error logging for invalid currency URIs
- Extract sync button path logic to AccountsHelper#sync_path_for method
- DRY up repeated subtype dropdown code with reusable partial and data structure

All SimpleFin tests passing (16/16). Code quality improvements maintain
backward compatibility while following Rails best practices.
This commit is contained in:
Sholom Ber
2025-08-07 16:19:11 -04:00
parent 1d6718833a
commit 7fee3fe45c
9 changed files with 82 additions and 124 deletions

View File

@@ -5,7 +5,6 @@ export default class extends Controller {
static values = { accountId: String }
connect() {
console.log('Account type selector connected for account:', this.accountIdValue)
// Show initial subtype dropdown based on current selection
this.updateSubtype()
}
@@ -16,8 +15,6 @@ export default class extends Controller {
const container = this.subtypeContainerTarget
const accountId = this.accountIdValue
console.log('Updating subtype for account:', accountId, 'Selected type:', selectedType)
// Hide all subtype selects
const subtypeSelects = container.querySelectorAll('.subtype-select')
subtypeSelects.forEach(select => {