From ce1b20790663c17ca4c2f35297b971d10ee31f48 Mon Sep 17 00:00:00 2001 From: agent Date: Fri, 6 Nov 2026 21:27:53 +0000 Subject: [PATCH 1/3] Pull down to add an expense On touch screens, dragging the Expenses or Balances tab down from the top slides a "Pull to add expense" pill out from under the header; releasing once it reads "Release to add" opens the add sheet. Sideways swipes, upward scrolls and touches on form controls are left alone, and the browser's pull-to-refresh is suppressed only while a pull is in progress. The visible Add buttons stay; the pill is aria-hidden. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HA82gVKYyo9BHLHPW4qr4x --- SPEC.md | 4 + apps/web/src/components/GroupPage.svelte | 6 ++ apps/web/src/components/PullToAdd.svelte | 123 +++++++++++++++++++++++ apps/web/src/lib/locales/cs.ts | 2 + apps/web/src/lib/locales/en.ts | 2 + 5 files changed, 137 insertions(+) create mode 100644 apps/web/src/components/PullToAdd.svelte diff --git a/SPEC.md b/SPEC.md index 48cb35f..1c5d7b7 100644 --- a/SPEC.md +++ b/SPEC.md @@ -283,6 +283,10 @@ the minimum in practice, and is easy to reason about. one row of 12 when wider) with the chosen name beside the label; date and payer side by side ("Several people" is the last payer option); photo, note and repeat stay folded behind small buttons; Save is pinned to the bottom. +- Pull to add: on a touch screen, dragging the Expenses or Balances tab down + from the very top shows a "Pull to add expense" pill under the header; + releasing once it reads "Release to add" opens the add sheet. It replaces + the browser's pull-to-refresh there (sync is live anyway). - **One photo per expense** (receipt), see 9. - Category, date, note. - Comments thread on each expense. diff --git a/apps/web/src/components/GroupPage.svelte b/apps/web/src/components/GroupPage.svelte index 4115412..91c8450 100644 --- a/apps/web/src/components/GroupPage.svelte +++ b/apps/web/src/components/GroupPage.svelte @@ -13,6 +13,7 @@ import GroupSettings from './GroupSettings.svelte'; import Icon from './Icon.svelte'; import IdentityPicker from './IdentityPicker.svelte'; + import PullToAdd from './PullToAdd.svelte'; import Stats from './Stats.svelte'; // Keyed by group id in App.svelte, so reading it once is enough. @@ -121,6 +122,11 @@ nav(e, `${base}/e/new`)} aria-label={t('add_expense')}> {/if} + router.go(`${base}/e/new`)} + /> + {#if route.name === 'expense'} {:else if route.name === 'expense-edit'} diff --git a/apps/web/src/components/PullToAdd.svelte b/apps/web/src/components/PullToAdd.svelte new file mode 100644 index 0000000..68b8780 --- /dev/null +++ b/apps/web/src/components/PullToAdd.svelte @@ -0,0 +1,123 @@ + + + + + diff --git a/apps/web/src/lib/locales/cs.ts b/apps/web/src/lib/locales/cs.ts index 134594f..d9dd88d 100644 --- a/apps/web/src/lib/locales/cs.ts +++ b/apps/web/src/lib/locales/cs.ts @@ -62,6 +62,8 @@ const cs: Messages = { stats: 'Statistiky', activity: 'Aktivita', add_expense: 'Přidat výdaj', + pull_to_add: 'Táhněte dolů pro nový výdaj', + release_to_add: 'Pusťte a přidejte', no_expenses: 'Zatím žádné výdaje. Klepněte na + a přidejte první.', total_spent: 'Celkem utraceno', summary: 'Přehled', diff --git a/apps/web/src/lib/locales/en.ts b/apps/web/src/lib/locales/en.ts index dd48b74..ffe52a8 100644 --- a/apps/web/src/lib/locales/en.ts +++ b/apps/web/src/lib/locales/en.ts @@ -68,6 +68,8 @@ const en = { stats: 'Stats', activity: 'Activity', add_expense: 'Add expense', + pull_to_add: 'Pull to add expense', + release_to_add: 'Release to add', no_expenses: 'No expenses yet. Tap + to add the first one.', total_spent: 'Total spent', summary: 'Summary', From 3d2f87c967e31948b0e8fc8ed2efcc8b270c6c96 Mon Sep 17 00:00:00 2001 From: agent Date: Fri, 6 Nov 2026 23:59:44 +0000 Subject: [PATCH 2/3] Pull up to add, swipe between tabs; shorter group settings Gestures (GroupGestures.svelte replaces PullToAdd.svelte): - Pull-to-add moves to the bottom: pulling up past the end of the Expenses or Balances tab raises a pill from behind the tab bar. The top is left to the browser's pull-to-refresh. - Swiping left/right switches between Expenses, Balances, Stats and Activity; the list follows the finger and the new tab slides in. Touches within 24px of the screen edge (OS back gesture), in form controls or in sideways-scrolling elements are ignored. Group settings, same features in less space: - Share: one row (Copy link, Share icon, QR); shorter intro. - Group: currency and default category side by side; Save appears only when something changed; hints trimmed. - Members: "You are" picker merged in; rename/archive as icon buttons; add member is the last row. - Notifications: a single switch. Repeating expenses: hidden when none. - Danger zone: two rows; the delete confirmation opens on tap. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HA82gVKYyo9BHLHPW4qr4x --- SPEC.md | 22 +- apps/web/src/components/GroupGestures.svelte | 215 +++++++++++++++++++ apps/web/src/components/GroupPage.svelte | 26 ++- apps/web/src/components/GroupSettings.svelte | 197 ++++++++++------- apps/web/src/components/Icon.svelte | 2 + apps/web/src/components/PullToAdd.svelte | 123 ----------- apps/web/src/lib/locales/cs.ts | 16 +- apps/web/src/lib/locales/en.ts | 16 +- 8 files changed, 390 insertions(+), 227 deletions(-) create mode 100644 apps/web/src/components/GroupGestures.svelte delete mode 100644 apps/web/src/components/PullToAdd.svelte diff --git a/SPEC.md b/SPEC.md index 1c5d7b7..2fc6d56 100644 --- a/SPEC.md +++ b/SPEC.md @@ -283,10 +283,13 @@ the minimum in practice, and is easy to reason about. one row of 12 when wider) with the chosen name beside the label; date and payer side by side ("Several people" is the last payer option); photo, note and repeat stay folded behind small buttons; Save is pinned to the bottom. -- Pull to add: on a touch screen, dragging the Expenses or Balances tab down - from the very top shows a "Pull to add expense" pill under the header; - releasing once it reads "Release to add" opens the add sheet. It replaces - the browser's pull-to-refresh there (sync is live anyway). +- Touch gestures on the group page (shortcuts; every action also has a + button): pull up past the end of the Expenses or Balances tab to add an + expense (a "Pull up to add expense" pill rises from behind the tab bar and + reads "Release to add" once far enough; at the bottom so the browser's + pull-to-refresh still works), and swipe left/right to move between the + Expenses, Balances, Stats and Activity tabs. Swipes starting within 24px + of the screen edge are left to the OS back gesture. - **One photo per expense** (receipt), see 9. - Category, date, note. - Comments thread on each expense. @@ -455,10 +458,17 @@ which group ids exist. "who am I" isn't set), the group's total spent, and round quick actions: Add · Payment · Settle up · Share. Tabs: Expenses · Balances (settle up) · Stats · Activity. A floating "+" appears only once the quick actions have - scrolled off screen. + scrolled off screen. Touch gestures: pull up at the end of the page to + add, swipe sideways to change tab (see 7.2). 3. **Expense editor** (sheet on mobile, dialog on desktop). 4. **Expense detail**: photo, split breakdown, comments, history. -5. **Group settings**. +5. **Group settings**, kept short: Share (copy link, native share, QR), + Group (icon, name, main currency and default category side by side; Save + appears only when something changed), Members ("You are" picker on top; + rename/archive as icon buttons; add member as the last row), + Notifications (one switch; hidden where push isn't available), Repeating + expenses (only when there are any), Export, Danger zone (delete asks for + the group name only after it is tapped). 6. **App settings**: language, theme, notifications. ### 10.3 Language diff --git a/apps/web/src/components/GroupGestures.svelte b/apps/web/src/components/GroupGestures.svelte new file mode 100644 index 0000000..57ebce3 --- /dev/null +++ b/apps/web/src/components/GroupGestures.svelte @@ -0,0 +1,215 @@ + + + + + diff --git a/apps/web/src/components/GroupPage.svelte b/apps/web/src/components/GroupPage.svelte index 91c8450..7170c2d 100644 --- a/apps/web/src/components/GroupPage.svelte +++ b/apps/web/src/components/GroupPage.svelte @@ -1,5 +1,5 @@ - - - - diff --git a/apps/web/src/lib/locales/cs.ts b/apps/web/src/lib/locales/cs.ts index d9dd88d..8a9e0b1 100644 --- a/apps/web/src/lib/locales/cs.ts +++ b/apps/web/src/lib/locales/cs.ts @@ -43,7 +43,7 @@ const cs: Messages = { creating: 'Vytvářím…', share_group: 'Sdílet skupinu', - share_intro: 'Kdokoli s tímto odkazem může skupinu vidět i upravovat. Posílejte ho jen členům.', + share_intro: 'Kdo má odkaz, může skupinu vidět i upravovat.', save_link_warning: 'Uložte si tento odkaz na bezpečné místo. Pokud se ztratí všechny kopie, skupinu nepůjde obnovit.', copy_link: 'Kopírovat odkaz', copied: 'Zkopírováno', @@ -62,7 +62,7 @@ const cs: Messages = { stats: 'Statistiky', activity: 'Aktivita', add_expense: 'Přidat výdaj', - pull_to_add: 'Táhněte dolů pro nový výdaj', + pull_to_add: 'Táhněte nahoru pro nový výdaj', release_to_add: 'Pusťte a přidejte', no_expenses: 'Zatím žádné výdaje. Klepněte na + a přidejte první.', total_spent: 'Celkem utraceno', @@ -109,7 +109,6 @@ const cs: Messages = { title_ph: 'Večeře', category: 'Kategorie', default_category: 'Výchozí kategorie', - default_category_hint: 'Nové výdaje začnou v této kategorii.', date: 'Datum', currency: 'Měna', rate: 'Směnný kurz', @@ -214,7 +213,7 @@ const cs: Messages = { not_set: 'Nenastaveno', change: 'Změnit', notifications: 'Oznámení', - notifications_hint: 'Dostanete oznámení, když skupinu změní někdo jiný.', + notifications_hint: 'Upozornit mě, když skupinu změní ostatní', notifications_ios: 'Na iPhonu a iPadu nejdřív přidejte OweMe na plochu (Sdílet → Přidat na plochu).', notifications_denied: 'Oznámení jsou pro tento web zablokovaná v nastavení prohlížeče.', notifications_unavailable: 'Oznámení nejsou na tomto serveru nebo v tomto prohlížeči k dispozici.', @@ -226,11 +225,14 @@ const cs: Messages = { export_expenses: 'Výdaje (CSV)', export_balances: 'Zůstatky (CSV)', backup: 'Soubor se zálohou', - backup_hint: 'Obsahuje klíč skupiny: kdokoli se souborem skupinu otevře. Uložte ho bezpečně.', + backup_hint: 'Záloha obsahuje klíč skupiny. Uložte ji bezpečně.', danger_zone: 'Nebezpečná zóna', - remove_from_device_hint: 'Skupina zůstane na serveru i v ostatních zařízeních.', + remove_from_device_hint: 'Zůstane na serveru i v ostatních zařízeních.', delete_group: 'Smazat skupinu pro všechny', - delete_group_hint: 'Smaže ze serveru všechny výdaje a fotky. Pro potvrzení napište název skupiny.', + delete_group_hint: 'Všem smaže všechny výdaje a fotky.', + type_name_to_confirm: 'Pro potvrzení napište název skupiny', + qr_code: 'QR kód', + group: 'Skupina', confirm: 'Potvrdit', saved: 'Uloženo', diff --git a/apps/web/src/lib/locales/en.ts b/apps/web/src/lib/locales/en.ts index ffe52a8..b9f559c 100644 --- a/apps/web/src/lib/locales/en.ts +++ b/apps/web/src/lib/locales/en.ts @@ -47,7 +47,7 @@ const en = { // share share_group: 'Share group', - share_intro: 'Anyone with this link can see and edit the group. Send it only to group members.', + share_intro: 'Anyone with the link can view and edit this group.', save_link_warning: 'Save this link somewhere safe. If every copy is lost, the group can’t be recovered.', copy_link: 'Copy link', copied: 'Copied', @@ -68,7 +68,7 @@ const en = { stats: 'Stats', activity: 'Activity', add_expense: 'Add expense', - pull_to_add: 'Pull to add expense', + pull_to_add: 'Pull up to add expense', release_to_add: 'Release to add', no_expenses: 'No expenses yet. Tap + to add the first one.', total_spent: 'Total spent', @@ -117,7 +117,6 @@ const en = { title_ph: 'Dinner', category: 'Category', default_category: 'Default category', - default_category_hint: 'New expenses start in this category.', date: 'Date', currency: 'Currency', rate: 'Exchange rate', @@ -226,7 +225,7 @@ const en = { not_set: 'Not set', change: 'Change', notifications: 'Notifications', - notifications_hint: 'Get a notification when someone else changes this group.', + notifications_hint: 'Notify me when others change the group', notifications_ios: 'On iPhone and iPad, add OweMe to your home screen first (Share → Add to Home Screen).', notifications_denied: 'Notifications are blocked for this site in your browser settings.', notifications_unavailable: 'Notifications aren’t available on this server or in this browser.', @@ -238,11 +237,14 @@ const en = { export_expenses: 'Expenses (CSV)', export_balances: 'Balances (CSV)', backup: 'Backup file', - backup_hint: 'Contains the group key: anyone with the file can open the group. Store it safely.', + backup_hint: 'The backup file contains the group key. Store it safely.', danger_zone: 'Danger zone', - remove_from_device_hint: 'The group stays on the server and on other devices.', + remove_from_device_hint: 'Stays on the server and other devices.', delete_group: 'Delete group for everyone', - delete_group_hint: 'Deletes all expenses and photos from the server. Type the group name to confirm.', + delete_group_hint: 'Removes all expenses and photos for everyone.', + type_name_to_confirm: 'Type the group name to confirm', + qr_code: 'QR code', + group: 'Group', confirm: 'Confirm', saved: 'Saved', From 9981cf9a9a058ae727e0cd7d5422b2976ece091f Mon Sep 17 00:00:00 2001 From: agent Date: Wed, 18 Nov 2026 19:23:19 +0000 Subject: [PATCH 3/3] Several payers: clearer on phones, plus tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The editor already supported several payers ("Several people" in Paid by); this polishes it after checking it at 390x844 and 360x780 (Czech): - Expense list: "Paid by 3 people" was truncated on phones; now "3 payers" (proper Czech plurals: plátce / plátci / plátců). - Empty payer boxes show the unassigned remainder as a placeholder. - A green "Adds up to the total" line confirms when the payers match. - Tests: core balance + settle-up for a car bought by three people, a foreign-currency multi-payer case, and an e2e flow (remaining, over, validation error, save, balances). - SPEC: describe the actual several-payers UI (no "add payer" button). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HA82gX9UJk6BEyaJJwiWPc --- SPEC.md | 7 ++-- apps/web/src/components/ExpenseEditor.svelte | 10 ++++-- apps/web/src/components/Icon.svelte | 1 + apps/web/src/lib/locales/cs.ts | 3 +- apps/web/src/lib/locales/en.ts | 3 +- e2e/app.spec.ts | 37 ++++++++++++++++++++ packages/core/test/core.test.ts | 25 +++++++++++++ 7 files changed, 80 insertions(+), 6 deletions(-) diff --git a/SPEC.md b/SPEC.md index 2fc6d56..e9767ae 100644 --- a/SPEC.md +++ b/SPEC.md @@ -180,8 +180,11 @@ Split `value` meaning per mode: | `exact` | amount in minor units | sum == amount | | `percent` | basis points (100 % = 10000) | sum == 10000 | -Multiple payers are supported (`payers` list); the default UI shows a single -payer with an "add payer" option. +Multiple payers are supported (`payers` list) — e.g. several people chipping +in for a car. The editor shows a single payer by default; choosing "Several +people" in *Paid by* lists every member with an amount box. Empty boxes show +the unassigned remainder as a placeholder, a live line reads "Remaining" / +"Over by" / "Adds up to the total", and the expense list shows "N payers". --- diff --git a/apps/web/src/components/ExpenseEditor.svelte b/apps/web/src/components/ExpenseEditor.svelte index 29d7e4c..b0b1cbb 100644 --- a/apps/web/src/components/ExpenseEditor.svelte +++ b/apps/web/src/components/ExpenseEditor.svelte @@ -349,14 +349,18 @@
{m.name} - + + 0 ? amountInput(payersRemaining, currency) : ''} />
{/each} - {#if payersRemaining !== 0 && amount} + {#if amount && payersRemaining !== 0} {payersRemaining > 0 ? t('remaining', { amount: money(payersRemaining, currency) }) : t('over_by', { amount: money(-payersRemaining, currency) })} + {:else if amount && payers.length > 1} + {t('adds_up')} {/if} {/if} @@ -507,6 +511,8 @@ .value-wrap { gap: 4px; flex-shrink: 0; } .value { width: 104px; min-height: 36px; padding: 4px 10px; text-align: right; } .value.narrow { width: 64px; } + .value::placeholder { color: var(--muted); opacity: 0.6; } + .adds-up { gap: 4px; } .extras { display: flex; flex-wrap: wrap; gap: 8px; } .extras .btn { flex: 1 1 auto; gap: 6px; padding: 0 12px; } diff --git a/apps/web/src/components/Icon.svelte b/apps/web/src/components/Icon.svelte index 8ccee7e..dda4647 100644 --- a/apps/web/src/components/Icon.svelte +++ b/apps/web/src/components/Icon.svelte @@ -22,6 +22,7 @@ upload: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12', down: 'M6 9l6 6 6-6', up: 'M6 15l6-6 6 6', + check: 'M20 6L9 17l-5-5', archive: 'M3 4h18v5H3zM5 9v11h14V9M10 13h4', } as const; diff --git a/apps/web/src/lib/locales/cs.ts b/apps/web/src/lib/locales/cs.ts index 8a9e0b1..6d40d23 100644 --- a/apps/web/src/lib/locales/cs.ts +++ b/apps/web/src/lib/locales/cs.ts @@ -76,7 +76,7 @@ const cs: Messages = { payment_short: 'Platba', add_payment: 'Zaznamenat platbu', paid_by: 'Platil(a) {name}', - paid_by_many: 'Platilo {n} lidí', + paid_by_many: { one: '{n} plátce', few: '{n} plátci', other: '{n} plátců' }, your_share: 'váš podíl {amount}', you_lent: 'půjčili jste {amount}', you_borrowed: 'dlužíte {amount}', @@ -129,6 +129,7 @@ const cs: Messages = { split_percent: 'Procenta', remaining: 'Zbývá: {amount}', over_by: 'Přebývá: {amount}', + adds_up: 'Součet sedí', select_all: 'Všichni', select_none: 'Nikdo', note: 'Poznámka', diff --git a/apps/web/src/lib/locales/en.ts b/apps/web/src/lib/locales/en.ts index b9f559c..3f0df2d 100644 --- a/apps/web/src/lib/locales/en.ts +++ b/apps/web/src/lib/locales/en.ts @@ -82,7 +82,7 @@ const en = { payment_short: 'Payment', add_payment: 'Record a payment', paid_by: 'Paid by {name}', - paid_by_many: 'Paid by {n} people', + paid_by_many: { one: '{n} payer', few: '{n} payers', other: '{n} payers' }, your_share: 'your share {amount}', you_lent: 'you lent {amount}', you_borrowed: 'you borrowed {amount}', @@ -137,6 +137,7 @@ const en = { split_percent: 'Percent', remaining: 'Remaining: {amount}', over_by: 'Over by: {amount}', + adds_up: 'Adds up to the total', select_all: 'All', select_none: 'None', note: 'Note', diff --git a/e2e/app.spec.ts b/e2e/app.spec.ts index b783720..66c9cf4 100644 --- a/e2e/app.spec.ts +++ b/e2e/app.spec.ts @@ -143,3 +143,40 @@ test('two devices share a group end to end', async ({ browser }) => { await expect(anna.getByRole('heading', { name: 'By category' })).toBeVisible(); await expect(anna.getByRole('heading', { name: 'Paid vs. share' })).toBeVisible(); }); + +test('several people pay for one expense', async ({ browser }) => { + const p = await device(browser, 'en-US'); + await p.goto('/'); + await p.getByRole('link', { name: 'New group' }).click(); + await p.getByLabel('Group name').fill('Shared car'); + await p.getByLabel('Main currency').selectOption('CZK'); + await p.getByLabel('Your name').fill('Anna'); + await p.getByPlaceholder('Name').fill('Petr'); + await p.getByRole('button', { name: 'Add member' }).click(); + await p.getByPlaceholder('Name').nth(1).fill('Jana'); + await p.getByRole('button', { name: 'Create group' }).click(); + await p.getByRole('button', { name: 'Back', exact: true }).click(); + + await p.getByRole('link', { name: 'Add expense' }).click(); + await p.getByLabel('Amount').fill('300000'); + await p.getByLabel('What was it for?').fill('Car'); + await p.getByLabel('Paid by', { exact: true }).selectOption({ label: 'Several people' }); + await p.getByLabel('Paid by: Anna').fill('100000'); + await p.getByLabel('Paid by: Petr').fill('150000'); + await expect(p.getByText('Remaining: CZK 50,000.00')).toBeVisible(); + // The empty box suggests what's left. + await expect(p.getByLabel('Paid by: Jana')).toHaveAttribute('placeholder', '50000.00'); + await p.getByLabel('Paid by: Jana').fill('80000'); + await expect(p.getByText('Over by: CZK 30,000.00')).toBeVisible(); + await p.getByRole('button', { name: 'Save', exact: true }).click(); + await expect(p.getByRole('alert')).toHaveText('The payers don’t add up to the amount.'); + await p.getByLabel('Paid by: Jana').fill('50000'); + await expect(p.getByText('Adds up to the total')).toBeVisible(); + await p.getByRole('button', { name: 'Save', exact: true }).click(); + + await expect(p.getByRole('link', { name: /Car/ })).toContainText('3 payers'); + await p.getByRole('link', { name: 'Balances' }).click(); + await expect(p.getByText('+CZK 50,000.00')).toBeVisible(); + await expect(p.getByText('−CZK 50,000.00')).toBeVisible(); + await expect(p.getByText('Jana → Petr')).toBeVisible(); +}); diff --git a/packages/core/test/core.test.ts b/packages/core/test/core.test.ts index a24f498..063eefe 100644 --- a/packages/core/test/core.test.ts +++ b/packages/core/test/core.test.ts @@ -110,6 +110,31 @@ describe('replay', () => { expect(Object.values(bal).reduce((x, y) => x + y)).toBe(0); }); + it('credits each of several payers (three people buy a car together)', () => { + const car = expense({ + amount: 30000000, + payers: [{ member: 'a', amount: 10000000 }, { member: 'b', amount: 15000000 }, { member: 'c', amount: 5000000 }], + }); + const { state } = replay([...baseGroup(), ev({ type: 'expense.created', data: car })]); + const bal = balances(state); + expect(bal).toEqual({ a: 0, b: 5000000, c: -5000000 }); + expect(settleUp(bal, ['a', 'b', 'c'])).toEqual([{ from: 'c', to: 'b', amount: 5000000 }]); + }); + + it('credits several payers in a foreign currency, summing exactly to the base total', () => { + // €100.01 at 25.1 = 2510.251 Kč → 2510.25; payer and share vectors must each sum to it. + const e = expense({ + currency: 'EUR', amount: 10001, rate: '25.1', + payers: [{ member: 'a', amount: 5001 }, { member: 'b', amount: 5000 }], + }); + const { state } = replay([...baseGroup(), ev({ type: 'expense.created', data: e })]); + const bal = balances(state); + expect(Object.values(bal).reduce((x, y) => x + y)).toBe(0); + expect(bal.a).toBeGreaterThan(0); + expect(bal.b).toBeGreaterThan(0); + expect(bal.c).toBeLessThan(0); + }); + it('ignores invalid expenses (bad sums, unknown members)', () => { const bad1 = expense({ id: 'x2', payers: [{ member: 'a', amount: 1 }] }); const bad2 = expense({ id: 'x3', split: { mode: 'equal', entries: [{ member: 'zzz', value: 1 }] } });