feat(user): construction cart remembers what is already built, with or without fio - #67
Merged
Merged
Conversation
…r without fio
- PlanOverrideSerializer gains optional constructionBuilt: building ticker
to built count (int >= 0), default {}
- Keys must match ^[A-Z0-9]{1,3}$, at most 100 entries, else 400
- No migration; stored overrides without the field read back as {}
- Tests: round-trip, invalid values, 100-entry limit, default on read
Spec: specs/2026-10-01-construction-cart-manual-built.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 5 |
| Duplication | 0 |
🟢 Coverage 100.00% diff coverage · +0.01% coverage variation
Metric Results Coverage variation ✅ +0.01% coverage variation (-1.00%) Diff coverage ✅ 100.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (de0376a) 4635 4424 95.45% Head commit (0addc06) 4646 (+11) 4435 (+11) 95.46% (+0.01%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#67) 11 11 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
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.
What and why
The construction cart's top NPS request: users want to enter how many buildings already stand on the planet, once per plan, and have the cart show only what is left to build and buy. 56% of cart users have no FIO, so today they can't do this at all. This adds per-plan storage for those counts to the user preferences.
Changes
PlanOverrideSerializergains optionalconstructionBuilt: building ticker → built count (int ≥ 0), default{}^[A-Z0-9]{1,3}$, at most 100 entries, else 400{}F-1, 1.5, 101 entries), 100-entry limit, default on read, other override fields untouchedHow it was verified
checks.sh)uv run ruff check,uv run ty check,uv run pytest: all pass-1,frm,ABCD→ 400; valid built counts round-trip and load on a second device; old preferences still load/sync-api: additive,spectacular --validatecleanDeploy order
Deploy backend first; it is backward compatible. Frontend PR: PRUNplanner/frontend#541
Spec:
specs/2026-10-01-construction-cart-manual-built.md🤖 Generated with Claude Code