Commit Graph

181 Commits

Author SHA1 Message Date
Elisiário Couto
b3eab6ae26 chore(ci): Bump version to 2025.9.9 2025.9.9 2025-09-12 00:35:04 +01:00
copilot-swe-agent[bot]
a5d10b3539 feat: Remove config.toml file - should be created when needed
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-12 00:32:06 +01:00
copilot-swe-agent[bot]
1c901a9dda feat(frontend): Improve transactions table mobile UX with responsive card layout
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-12 00:32:06 +01:00
copilot-swe-agent[bot]
1e94333d8f feat(frontend): Improve transactions table mobile UX with responsive card layout
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-12 00:32:06 +01:00
copilot-swe-agent[bot]
4006dd128e fix(core): Handle permission errors gracefully in database path creation.
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-12 00:01:05 +01:00
copilot-swe-agent[bot]
7d9744a40e refactor(core): Integrate directory creation with database path retrieval and remove backup file.
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-12 00:01:05 +01:00
copilot-swe-agent[bot]
8654471042 Add tests for configurable paths and finalize implementation
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-12 00:01:05 +01:00
copilot-swe-agent[bot]
e9711339bd Add centralized path management and sample database generator
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-12 00:01:05 +01:00
Elisiário Couto
0c030efef2 chore(ci): Bump version to 2025.9.8 2025.9.8 2025-09-11 18:50:09 +01:00
copilot-swe-agent[bot]
e4e04ea34e feat: update CI workflow to use Node.js 20 instead of 18
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-11 18:48:01 +01:00
copilot-swe-agent[bot]
f4bf549b99 fix: change branch name from develop to dev in CI workflow
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-11 18:48:01 +01:00
copilot-swe-agent[bot]
8cc4f567f8 Update README with CI/CD pipeline information
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-11 18:48:01 +01:00
copilot-swe-agent[bot]
a939b841f3 Add GitHub Actions CI workflow and enhance release workflow
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
2025-09-11 18:48:01 +01:00
Elisiário Couto
caa43e8eb0 chore(ci): Bump version to 2025.9.7 2025.9.7 2025-09-11 14:26:40 +01:00
Elisiário Couto
0a8750ea36 Fix tests. 2025-09-11 14:26:20 +01:00
Elisiário Couto
2d6800eff8 feat: improve transactions API pagination and search
- Update backend /transactions endpoint to use PaginatedResponse
- Change from limit/offset to page/per_page parameters for consistency
- Implement server-side pagination with proper metadata
- Add search debouncing to prevent excessive API calls (300ms delay)
- Add First/Last page buttons to pagination controls
- Fix pagination state reset when filters return 0 results
- Reset pagination to page 1 when filters are applied
- Add visual loading indicator during search debouncing
- Update frontend types and API client to handle new response structure
- Fix TypeScript errors and improve type safety
2025-09-11 14:13:58 +01:00
Elisiário Couto
544527f282 feat(frontend): implement TanStack Table for transactions view
- Add @tanstack/react-table package for advanced table functionality
- Create new TransactionsTable component with sorting, pagination, and filtering
- Implement column sorting for description, amount, and date
- Add pagination with configurable page sizes (10, 25, 50, 100)
- Implement global search across multiple fields (description, creditor, debtor, reference)
- Add quick date filters (Last 7 days, Last 30 days, This month)
- Add amount range filtering (min/max)
- Ensure mobile responsiveness with proper table layout
- Integrate RawTransactionModal with table actions
- Replace TransactionsList with TransactionsTable in routes
- Fix table freezing issue by removing conflicting filtering logic
- Optimize performance with TanStack Table's built-in state management
2025-09-11 12:39:42 +01:00
Elisiário Couto
91020e32ea fix: Simplify notification settings and fix notification test on dashboard. 2025-09-11 12:16:47 +01:00
Elisiário Couto
5a823d62f0 chore(ci): Bump version to 2025.9.6 2025.9.6 2025-09-10 23:37:08 +01:00
Elisiário Couto
a00d6ce2ce feat(db): migrate transactions table to composite primary key
- Change primary key from internalTransactionId to (accountId, transactionId)
- Add transactionId as stable bank-provided identifier
- Update INSERT to INSERT OR REPLACE for upsert behavior
- Update migration detection logic for composite key structure
- Update tests to include transactionId in sample data
2025-09-10 23:36:09 +01:00
Elisiário Couto
f47644e8c6 chore(ci): Bump version to 2025.9.5 2025.9.5 2025-09-10 23:17:19 +01:00
Elisiário Couto
c0ee21d6fa fix: correct composite key migration check
- Fix _check_composite_key_migration_needed to properly check if internalTransactionId is the primary key
- Use PRAGMA table_info pk flag instead of just checking column existence
- This ensures migration only runs when internalTransactionId is actually the primary key
2025-09-10 23:16:42 +01:00
Elisiário Couto
7dd33084f5 chore(ci): Bump version to 2025.9.4 2025.9.4 2025-09-10 22:55:24 +01:00
Elisiário Couto
ca41b7af0a feat(frontend): implement TanStack Router with mobile sidebar
- Install and configure TanStack Router for type-safe routing
- Create route structure with __root.tsx layout and individual route files
- Implement mobile-responsive sidebar with collapse functionality
- Add clickable logo in sidebar that navigates to overview page
- Extract Header and Sidebar components from Dashboard for reusability
- Configure Vite with TanStack Router plugin for development
- Update main.tsx to use RouterProvider instead of direct App rendering
- Maintain existing TanStack Query integration seamlessly
- Add proper TypeScript types for all route components
- Implement responsive design with mobile overlay and hamburger menu

This replaces the tab-based navigation with URL-based routing while
maintaining the same user experience and adding powerful features like:
- Bookmarkable URLs (/transactions, /analytics, /notifications)
- Browser back/forward button support
- Direct linking capabilities
- Mobile-responsive sidebar with smooth animations
- Type-safe navigation with auto-completion
2025-09-10 22:45:01 +01:00
Elisiário Couto
aa97f36819 feat(frontend): add account name editing functionality
- Add AccountUpdate interface to TypeScript types
- Add updateAccount method to API client for PUT /api/v1/accounts/{id}
- Implement inline editing UI in AccountsOverview component
- Add edit/save/cancel buttons with proper state management
- Handle keyboard shortcuts (Enter to save, Escape to cancel)
- Add loading states and error handling for account updates
- Use React Query mutations for optimistic updates
- Refresh account data after successful updates

This enables users to edit account names directly in the Accounts view
using the new API endpoint that was added in the backend.
2025-09-10 22:07:32 +01:00
Elisiário Couto
d9c50d1298 feat(api): add currency extraction and account name updates
- Extract currency from balances and populate account currency field
- Add PUT /api/v1/accounts/{account_id} endpoint for updating account names
- Add AccountUpdate Pydantic model for request validation
- Modify sync service to enrich account details with balance currency

This resolves the issue where account currency and name fields were NULL
by extracting currency from GoCardless balance data and providing an API
endpoint for manual account name updates.
2025-09-10 21:48:07 +01:00
Elisiário Couto
61fafecb78 feat(frontend): adapt to composite key transaction structure
- Update Transaction interface to include stable transaction_id field
- Modify TransactionsList to use stable transaction_id for React keys
- Update API models to handle new transactionId field from database
- Fix API routes to properly map transaction_id in responses
- Update test mocks to include transactionId field
- Ensure backward compatibility with internal_transaction_id

This adapts the frontend to work with the new composite primary key
(accountId, transactionId) structure that prevents duplicate transactions.
2025-09-10 21:11:26 +01:00
Elisiário Couto
13e92ccd34 fix(api): resolve duplicate transactions with composite key migration
- Migrate transactions table to use (accountId, transactionId) composite primary key
- Replace unstable internalTransactionId with stable bank-provided transactionId
- Update persistence logic to use INSERT OR REPLACE for automatic conflict resolution
- Maintain API compatibility by preserving internalTransactionId field
- Update tests to match new transaction processing format

This resolves the issue where GoCardless returns different internalTransactionId
values for the same transaction across sync operations, causing duplicates.
2025-09-10 20:00:43 +01:00
Elisiário Couto
433ba3faf9 feat(web): Add modal to view raw transaction. 2025-09-10 19:57:38 +01:00
Elisiário Couto
da6c7bbf3e chore(ci): Bump version to 2025.9.3 2025.9.3 2025-09-10 01:21:49 +01:00
Elisiário Couto
90e58734ad chore(ci): Fix GitHub Actions syntax. 2025-09-10 01:21:39 +01:00
Elisiário Couto
03e16a9b54 chore(ci): Bump version to 2025.9.2 2025.9.2 2025-09-10 01:12:08 +01:00
Elisiário Couto
53e08e8e4b fix(ci): Prevent duplicate Docker tags in GitHub Actions
- Add latest=false flavor to both backend and frontend jobs
- Fix confusion between latest and latest-frontend tags
- Ensure proper image separation in Docker registries
2025-09-10 01:11:38 +01:00
Elisiário Couto
84fe79b37b feat(docker): Add Docker containerization for React frontend
- Add production compose.yml using published ghcr.io images
- Rename compose.yml to compose.dev.yml for development
- Create config.example.toml configuration template
- Update README.md with Docker setup instructions
- Use ./data directory for configuration and database storage
- Separate development and production Docker workflows
2025-09-10 00:53:49 +01:00
Elisiário Couto
1a6578100a chore(ci): Bump version to 2025.9.1 2025.9.1 2025-09-10 00:40:37 +01:00
Elisiário Couto
3270dc4585 chore: Improve AGENTS.md. 2025-09-10 00:39:46 +01:00
Elisiário Couto
8fabaf7b86 fix: handle duplicate transactionId values in migration
- Fix UNIQUE constraint violation in null transaction ID migration
- Generate unique IDs for records with duplicate transactionId values
- Use pattern: original_transactionId + '_' + 8_char_hex_suffix
- Successfully migrated records with duplicate IDs
- All transaction records now have valid internalTransactionId values

The migration now handles cases where multiple transactions have the same
transactionId in their raw data by generating unique identifiers.
2025-09-10 00:39:46 +01:00
Elisiário Couto
8006e5e1f6 refactor: remove unused hide_missing_ids functionality
- Remove hide_missing_ids parameter from all database functions
- Remove hide_missing_ids from API routes and query parameters
- Remove hide_missing_ids filtering logic from SQLite queries
- Update all tests to remove hide_missing_ids assertions
- Clean up codebase since internalTransactionId extraction is now fixed

This functionality was added as a workaround for missing internalTransactionId
values, but we've now fixed the root cause by properly extracting transaction
IDs from raw data during sync, making this workaround unnecessary.
2025-09-10 00:39:45 +01:00
Elisiário Couto
5e0b8eb2a4 chore(ci): Bump version to 2025.9.0 2025.9.0 2025-09-09 19:44:14 +01:00
Elisiário Couto
f2e05484dc feat: Change versioning scheme to calver. 2025-09-09 19:43:04 +01:00
Elisiário Couto
37949a4e1f feat: make API URL configurable and improve code quality
- Add configurable API URL support via environment variables
- Update nginx configuration with environment variable substitution
- Create nginx template for dynamic proxy configuration
- Update Docker configuration for environment variable handling
- Fix hardcoded localhost:8000 references in error messages
- Add proper TypeScript types for health check API
- Format all code with Prettier for consistency
- Update documentation with configuration instructions
- Improve error messages to be environment-agnostic
- Fix duplicate imports and type safety issues

BREAKING: API URL is now configurable via VITE_API_URL (dev) and API_BACKEND_URL (prod)
2025-09-09 19:39:11 +01:00
Elisiário Couto
abf39abe74 feat: add notifications view and update branding
- Add complete notifications management view with:
  - Service status display (Discord, Telegram)
  - Test notification functionality
  - Service management (delete/disable)
  - Filter settings display (case sensitive/insensitive)
- Update API types to match current backend structure
- Fix NotificationFilters type (remove deprecated fields)
- Update page title from 'Vite + React + TS' to 'Leggen'
- Replace Vite favicon with custom Leggen favicon
- Add notifications tab to main navigation
- Ensure full API compatibility with current backend
2025-09-09 19:39:11 +01:00
Elisiário Couto
957099786c refactor: remove unused amount_threshold and keywords from notification filters
- Remove amount_threshold and keywords fields from NotificationFilters model
- Remove handling of these fields from API routes (GET/PUT)
- Update test to remove amount_threshold reference
- Simplify notification filtering to focus on case-sensitive/insensitive keywords only

These fields were not being used in the actual filtering logic and were just
adding unnecessary complexity to the configuration.
2025-09-09 19:39:11 +01:00
Elisiário Couto
2191fe9066 feat: improve notification filters configuration format
- Change filters config from nested dict to simple arrays
- Update NotificationFilters model to use List[str] instead of Dict[str, str]
- Modify notification service to handle list-based filters
- Update API routes and tests for new format
- Update README with new configuration example

Before: [filters.case-insensitive] salary = 'salary'
After: [filters] case-insensitive = ['salary', 'utility']
2025-09-09 19:39:11 +01:00
Elisiário Couto
bc947183e3 Cleanup agent documentation. 2025-09-09 19:39:11 +01:00
Elisiário Couto
16afa1ed8a Fix notification channels returning null by connecting API to real implementations
- Update notification service to handle both old (api-key/chat-id) and new (token/chat_id) config formats
- Connect API service to actual Discord/Telegram notification implementations from CLI codebase
- Fix API routes to properly detect configured services using correct config keys
- Telegram notifications now work correctly, Discord properly shows as not configured
2025-09-09 19:39:11 +01:00
Elisiário Couto
541cb262ee fix: use account status for balance records instead of hardcoded 'active'
- Modified sync service to pass account status to balance persistence
- Updated database service to use account_status from balance data
- Fixed 8 balance records that had incorrect 'active' status
- All balance records now have consistent 'READY' status matching accounts
- Future balance records will inherit correct status from account data
2025-09-09 19:39:11 +01:00
Elisiário Couto
eaaea6e459 fix: merge account details into balance data to prevent unknown/N/A values
- Modified sync service to include institution_id and iban in balance persistence
- Fixed data flow issue where balance records were missing account metadata
- Prevents future balance records from having 'unknown' bank or 'N/A' IBAN
- Successfully fixed 8 existing records with one-off script
2025-09-09 19:39:11 +01:00
Elisiário Couto
34501f5f0d feat: add automatic balance timestamp migration mechanism
- Add migration system to convert Unix timestamps to datetime strings
- Integrate migration into FastAPI lifespan for automatic startup execution
- Update balance persistence to use consistent ISO datetime format
- Fix mixed timestamp types causing API parsing issues
- Add comprehensive error handling and progress logging
- Successfully migrated 7522 balance records to consistent format
2025-09-09 19:39:11 +01:00
Elisiário Couto
dcac53d181 Fix frontend health check to properly detect API unavailability
- Add isError to useQuery destructuring to handle network errors
- Improve health check query function to throw on HTTP errors
- Update status display logic to show 'Disconnected' when API is unreachable
- Ensure proper error handling for both network failures and HTTP status errors
2025-09-09 19:39:11 +01:00