Tidy: fix stale-dated sparkline test + gitignore agent worktrees #30

Merged
steve merged 2 commits from tidy-sparkline-test-and-gitignore into main 2026-06-15 22:32:54 +01:00
Owner

Two small main-bound hygiene fixes (unrelated to any feature branch).

test(dashboard): TestDashboard_HostRowSparklineRendersWithHistory seeded history on hard-coded dates (2026-05-05/06) and asserted a <polyline>. The dashboard only pulls a rolling 30-day window (since = now-30d), so once the clock passed ~2026-06-05 those fixtures aged out of the window, the query returned nothing, and the sparkline fell back to its em-dash placeholder with no polyline. Switched to relative dates (now-2d / now-1d) so it can't age out again.

chore(gitignore): ignore /.claude/worktrees/ — transient worktrees created by the agent harness.

Test plan

  • go test ./internal/server/http/ -run TestDashboard_HostRowSparkline passes (both render + empty-state)
  • go vet ./... clean
Two small main-bound hygiene fixes (unrelated to any feature branch). **test(dashboard):** `TestDashboard_HostRowSparklineRendersWithHistory` seeded history on hard-coded dates (2026-05-05/06) and asserted a `<polyline>`. The dashboard only pulls a rolling 30-day window (`since = now-30d`), so once the clock passed ~2026-06-05 those fixtures aged out of the window, the query returned nothing, and the sparkline fell back to its em-dash placeholder with no polyline. Switched to relative dates (now-2d / now-1d) so it can't age out again. **chore(gitignore):** ignore `/.claude/worktrees/` — transient worktrees created by the agent harness. ## Test plan - [ ] `go test ./internal/server/http/ -run TestDashboard_HostRowSparkline` passes (both render + empty-state) - [ ] `go vet ./...` clean
steve added 2 commits 2026-06-15 22:18:57 +01:00
test(dashboard): use relative dates so sparkline test doesn't age out of the 30-day window
CI / Test (store) (pull_request) Successful in 8s
CI / Test (rest) (pull_request) Successful in 45s
CI / Lint (pull_request) Successful in 33s
CI / Build (windows/amd64) (pull_request) Successful in 44s
CI / Build (linux/amd64) (pull_request) Successful in 47s
CI / Build (linux/arm64) (pull_request) Successful in 45s
CI / Test (server-http) (pull_request) Successful in 2m26s
e2e / Playwright vs docker-compose (pull_request) Successful in 2m50s
239d55b65b
steve merged commit a30f824a3c into main 2026-06-15 22:32:54 +01:00
steve deleted branch tidy-sparkline-test-and-gitignore 2026-06-15 22:32:54 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: steve/restic-manager#30