release: promote beta to main (cost basis filter, diary fix, auto-itemize refactor)#1789
Closed
steilerDev wants to merge 4 commits into
Closed
release: promote beta to main (cost basis filter, diary fix, auto-itemize refactor)#1789steilerDev wants to merge 4 commits into
steilerDev wants to merge 4 commits into
Conversation
…ows (#1780) * refactor(auto-itemize): harmonize existing-invoice and new-invoice flows Extract shared logic duplicated between AutoItemizePage and PaperlessInvoiceReviewPage into three reusable units: - `materializeInlineDrafts` (autoItemizeDraftUtils.ts) — pure async helper that resolves inline budget-line drafts at save time. Financial fields (includesVat, quantity, unitPrice, totalAmount) now come from the LIVE line state rather than the draft snapshot, so the created budget line always matches the invoice line item as the user sees it at save time. - `AutoItemizePdfPreview` component — shared PDF preview column (iframe + loading overlay + fallback) previously copy-pasted verbatim. - `useAutoItemizeLines` hook — encapsulates all line-state management and picker integration (useBudgetLinePicker, all CRUD handlers, initializeStaticData effect, budgetSourceId re-defaulting). Both pages now call one hook instead of ~150 lines of duplicated boilerplate each. Also aligns confidence derivation: both flows now derive confidence from the Paperless documentType (Invoice/Quotation) before falling back to the ML score, closing a behavioral divergence that previously only PaperlessInvoiceReviewPage implemented. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(auto-itemize): absorb two-way VAT sync and fix mock types in tests - Absorb beta's two-way VAT sync (from #1775/#1779) into useAutoItemizeLines: - onFieldChange: when field=includesVat, mirrors to inlineCreatedBudgetLineDraft - onInlineDraftChange: when updates.includesVat set, mirrors back to line - Fix jest.fn() mock type annotations in autoItemizeDraftUtils.test.ts (TS2345: never inference with untyped mocks in Jest 30) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Frank Steiler <frank@steilerdev.de> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(diary): update E2E tests for default filter mode change from 'all' to 'manual' - In diary-r2-uat.spec.ts: rename test and flip assertions so Manual chip is expected aria-pressed=true by default, All and Automatic are false - In diary-list.spec.ts: add Scenario 12 (@smoke) asserting the Manual mode chip is the default when navigating to /diary with no params, and that the initial API request includes the daily_log type param Co-Authored-By: Claude e2e-test-engineer (Sonnet 4.6) <noreply@anthropic.com> * fix(diary): default filter to 'manual' instead of 'all' Change the diary page initial filter mode from 'all' to 'manual' so that users land on a focused view of manually authored entries by default, rather than seeing all auto-generated events mixed in. - DiaryPage.tsx: default filterMode state reads 'manual' when no URL param is present - DiaryPage.tsx: handleClearAll resets filterMode to 'manual' instead of 'all' - DiaryPage.test.tsx: add 4 unit tests covering default mode, explicit URL param overrides (all, automatic), and Clear All reset behaviour Fixes #1781 Co-Authored-By: Claude dev-team-lead (Sonnet 4.6) <noreply@anthropic.com> Co-Authored-By: Claude frontend-developer (Haiku 4.5) <noreply@anthropic.com> Co-Authored-By: Claude qa-integration-tester (Sonnet 4.5) <noreply@anthropic.com> Co-Authored-By: Claude e2e-test-engineer (Sonnet 4.5) <noreply@anthropic.com> * test(diary): fix handleClearAll test to use search query so clear button renders Co-Authored-By: Claude dev-team-lead (Sonnet 4.6) <noreply@anthropic.com> Co-Authored-By: Claude qa-integration-tester (Sonnet 4.5) <noreply@anthropic.com> * chore(diary): fix comment typo budget_update -> budget_breach in E2E spec Co-Authored-By: Claude e2e-test-engineer (Sonnet) <noreply@anthropic.com> --------- Co-authored-by: Frank Steiler <frank@steilerdev.de> Co-authored-by: Claude e2e-test-engineer (Sonnet 4.6) <noreply@anthropic.com>
Owner
Author
Detailed Validation Steps1. Cost Basis Filter — Budget Overview (#1786)Setup: Open the Budget Overview page with some invoices in different states (pending/paid/claimed). All (default)
Paid mode
Outstanding mode
URL persistence
Independence from perspective toggle
2. Diary Default Filter (#1782)
3. Auto-itemize Harmonization (#1780)
|
Diary default changed from 'all' to 'manual' in #1782. Three test scenarios in diary-r2-uat.spec.ts were asserting the old default ('All' chip pressed) or trying to click 'Manual' when it was already active (causing timeout). Co-authored-by: Frank Steiler <frank@steilerdev.de> Co-authored-by: Claude e2e-test-engineer (claude-sonnet-4-6) <noreply@anthropic.com>
Owner
Author
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release Summary
This release ships a Cost Basis payment-status filter for the Cost Breakdown table, a diary UX fix, and an auto-itemize workflow harmonization.
Changes
Features
Fixes
Refactoring
Change Inventory
Backend (
server/,shared/)shared/src/types/budgetBreakdown.ts— newactualCostPaid,actualCostPendingfields on all breakdown entitiesserver/src/services/budgetBreakdownService.ts— deposit-aware paid/pending rollup viacomputeDepositAwareAggregatesserver/src/services/budgetBreakdownService.paid.test.ts— 11 new integration testsFrontend (
client/)client/src/components/CostBreakdownTable/CostBreakdownTable.tsx—CostBasisSelectcomponent,resolveBudgetLineCost/resolveAggregateCosthelpersclient/src/components/CostBreakdownTable/CostBreakdownTable.module.css— new.controlBar,.costBasisField,.costBasisSelectstylesclient/src/pages/BudgetOverviewPage/BudgetOverviewPage.tsx— URL state via?paymentStatus=paid|outstandingclient/src/i18n/en/budget.json,client/src/i18n/de/budget.json— Cost Basis i18n keysclient/src/pages/DiaryPage/DiaryPage.tsx— default filter set tomanualE2E Tests (
e2e/)e2e/tests/budget/budget-cost-basis.spec.ts— 16 new E2E scenarios for Cost Basis filtere2e/pages/BudgetOverviewPage.ts— newcostBasisSelectandcostBasisLabellocatorsManual Validation Checklist
Cost Basis Filter (#1786)
?paymentStatus=paid.?paymentStatus=outstanding.?paymentStatus=paidin the URL — "Paid" is pre-selected.Diary Default Filter (#1782)
Auto-itemize Harmonization (#1780)
Testing
docker pull steilerdev/cornerstone:betadocker pull steilerdev/cornerstone:pr-1789Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com