Implement ExpenseListScreen, AddEditExpenseScreen, AddEditRecurringScreen #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Implements three screens:
ExpenseListScreen— 2-tab screen (Expenses | Recurring) with tab-aware FABAddEditExpenseScreen— shared add & edit formAddEditRecurringScreen— shared add & edit form for recurring templatesDepends on #2, #3, #4.
Prerequisites
Issues #1, #2, #3, #4 must all be merged first.
What to do
1.
ui/screens/expenses/ExpenseListScreen.kt+ExpenseListScreenModel.ktTabRow(Material 3) with 2 tabs: "Expenses", "Recurring".HorizontalPagerfor swipeable content; bind pager state to tab selection.ExpenseWithCategory. Tap row →navigator.push(AddEditExpenseScreen(expenseId = expense.id)). Long-press → delete confirmation dialog.RecurringExpenseWithCategory. Tap row →navigator.push(AddEditRecurringScreen(recurringId = recurring.id)). ToggleisActiveinline.AddEditExpenseScreen(null)) + "Import Bank Statement" (pushImportBankStatementScreen). Same asHomeScreen.AddEditRecurringScreen(null)).ExportActionhelper from #7 — if #7 is not merged, stub inline).2.
ui/screens/add_edit_expense/AddEditExpenseScreen.kt+AddEditExpenseScreenModel.ktVoyager
Screenparameterized by anexpenseId: Long?:expenseId == null, this is "add". If non-null, this is "edit" — prefill fromgetExpenses.awaitOne(expenseId).getCategories.subscribeAll(); current selection)DatePickerdialog)upsertExpense.await(Expense(...))→navigator.pop().navigator.push(CategoryScreen). When user returns, the category dropdown auto-refreshes via thegetCategories.subscribeAll()flow.3.
ui/screens/add_edit_recurring/AddEditRecurringScreen.kt+AddEditRecurringScreenModel.ktVoyager
Screenparameterized byrecurringId: Long?:getRecurringExpenses.awaitOne(recurringId).true)RecurringExpense(..., nextDueDate = startDate)andupsertRecurringExpense.await(...)→navigator.pop().Acceptance
ExpenseListScreenhas 2 tabs with plain ComposeTabRow+HorizontalPagerAddEditExpenseScreenworks for both add and editAddEditRecurringScreenworks for both add and edit, withnextDueDate = startDateon initial insert./gradlew assembleDebugsucceedsImplementation rule
Per
AGENTS.md— do not start implementation without explicit user sign-off on this issue. When working, check for related issues in the remote repo first.