Client computeLiveProjection ignores snowball_exempt bills #60

Closed
opened 2026-05-16 21:43:26 -05:00 by null · 0 comments
Owner

Severity: MEH

Affected Files

  • client/pages/SnowballPage.jsxcomputeLiveProjection() line 43

Problem

The client simulation runs over whatever bills array is passed — which is already server-filtered. But if the array ever includes an exempt bill (e.g., a future UI change passes a superset), the client would include it in the projection where the server wouldn't.

This is a minor invariant break with no current user impact, since the server always filters before sending.

Impact

  • No current user-visible impact
  • Latent correctness issue if the data contract changes
  • No test coverage for this edge case

Fix

Add an explicit filter at the start of computeLiveProjection():

const activeBills = bills.filter(b => !b.snowball_exempt && !b.deleted_at);

This makes the client defensive against future data contract changes.

Acceptance Criteria

  • computeLiveProjection explicitly filters out snowball_exempt bills
  • Client projection matches server projection for all inputs including exempt bills
## Severity: MEH ⚪ ## Affected Files - `client/pages/SnowballPage.jsx` — `computeLiveProjection()` line 43 ## Problem The client simulation runs over whatever bills array is passed — which is already server-filtered. But if the array ever includes an exempt bill (e.g., a future UI change passes a superset), the client would include it in the projection where the server wouldn't. This is a minor invariant break with no current user impact, since the server always filters before sending. ## Impact - No current user-visible impact - Latent correctness issue if the data contract changes - No test coverage for this edge case ## Fix Add an explicit filter at the start of `computeLiveProjection()`: ```javascript const activeBills = bills.filter(b => !b.snowball_exempt && !b.deleted_at); ``` This makes the client defensive against future data contract changes. ## Acceptance Criteria - [ ] `computeLiveProjection` explicitly filters out `snowball_exempt` bills - [ ] Client projection matches server projection for all inputs including exempt bills
null added the
frontend
priority:nice-to-have
labels 2026-05-16 21:43:26 -05:00
null closed this issue 2026-06-03 22:56:32 -05:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: null/BillTracker#60
No description provided.