Repository navigation
Freeze a billing period as an immutable month-end snapshot - #82
Merged
Merged
Conversation
Closes #77 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Confirm before freezing, keep Freeze beside the month switcher, make the frozen-against-current tables sortable, and let a row open the charges behind it. Show the snapshot id and how fresh the ledger's batch is, and keep months older than the latest six reachable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 3, 2026
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.
Closes #77
Adds a Month-end snapshots card to Account detail. A user can freeze a month's bill and later compare that frozen copy with whatever the ledger holds now.
What it does
billing_snapshotandbilling_snapshot_charge(schema v10) hold a full copy of the month's charges, not a pointer to a batch. Whole-period replacement never touches them. Nothing updates a snapshot.The web demo has the same surface, held in memory. The arithmetic is shared in
src/analytics/snapshot.rs.Worth a look in review
charge_idsmoved fromsrc/ledger/mod.rstosrc/analytics/snapshot.rsso both targets share it. The key and format are unchanged, so existing ids stay stable.sha2andhexmoved to the dependencies shared by both targets, because the web demo computes checksums too.Cargo.lockis unchanged.Testing
Run locally on Windows against this branch before the changelog-only commit:
cargo test: 581 passed, 2 ignored. New tests cover refresh, re-import, credits and adjustments, multiple currencies, absent-cost rows, repeat freezes, a corrected AWS FOCUS export and account deletion.cargo clippy --all-targets -- -D warningsandcargo fmt --check: clean.cargo +nightly-2026-07-28 check --lib --target wasm32-unknown-unknown: passes. This is a type-check, not the fullbuild-web.sh.Not tested in a real window. Nothing here has been clicked. Please check on desktop, using demo data:
🤖 Generated with Claude Code