# fix\(spend\): preserve calendar gaps in activity heatmaps \(\#241\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/4ed508f5c1bf08403fc9b57f7274eb1721ce583e)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: 4ed508f5c1bf08403fc9b57f7274eb1721ce583e

Requested commit: 4ed508f5c1bf08403fc9b57f7274eb1721ce583e

Commit: 4ed508f5c1bf08403fc9b57f7274eb1721ce583e

Tree: a2f45e6cf9265104459ddbcc416f68072786558a

Author: Simone

Committer: GitHub

## Message

```
fix(spend): preserve calendar gaps in activity heatmaps (#241)

* fix(spend): preserve calendar gaps in activity heatmaps

Keep unavailable metric days as empty calendar slots so the heatmap retains weekday alignment and its calendar span. Preserve measured zero and legacy labels, with bounded UTC date arithmetic.

Documentation: update usage, cost-history rules, and Unreleased. TODO is unchanged because this fixes existing frontend presentation without a new CLI contract.

* fix(spend): retain unavailable heatmap boundary days

Use the unfiltered normalized history dates to preserve first and last calendar slots when the selected metric is absent. Share the expanded calendar between heatmap visibility, column count, and cells.

Documentation: clarify boundary-day behavior in usage and cost history. TODO remains unaffected. Reproduced all four review cases before the fix; 124 presentation QtTests pass.
```

## Parents

- [9acf5eba828b4dc2fac119c7871589be2412fdcb](https://git.cafe/lucenx/codexbar-plasma/commit/9acf5eba828b4dc2fac119c7871589be2412fdcb?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/4ed508f5c1bf08403fc9b57f7274eb1721ce583e?format=markdown)
