Skip to content

feat(domain): seasonal tagging for maintenance items#733

Merged
cpcloud merged 6 commits intomainfrom
worktree-dreamy-jingling-hopcroft
Mar 10, 2026
Merged

feat(domain): seasonal tagging for maintenance items#733
cpcloud merged 6 commits intomainfrom
worktree-dreamy-jingling-hopcroft

Conversation

@cpcloud
Copy link
Owner

@cpcloud cpcloud commented Mar 9, 2026

Summary

  • Add Season string field to MaintenanceItem with constants: spring, summer, fall, winter (empty = no season)
  • New "Season" table column with cellStatus badge rendering and pin-filtering support
  • Season select field in add/edit forms and inline edit overlay
  • "Seasonal" dashboard section showing items tagged with the current calendar season (Mar-May spring, Jun-Aug summer, Sep-Nov fall, Dec-Feb winter)
  • Short labels in compact mode: spr/sum/fall/win
  • Status styles for all four seasons (Wong palette colors)

closes #686

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements seasonal tagging for maintenance items, addressing issue #686 which requests a "what should I do this season?" dashboard view that makes the app feel domain-aware for homeowners.

Changes:

  • Adds a Season string field to MaintenanceItem (with spring/summer/fall/winter constants) stored as-is in SQLite via GORM AutoMigrate, plus season select in add/edit forms and inline edit overlay
  • Adds a "Season" table column (badge-styled cellStatus, pin-filterable) and a new "Seasonal" dashboard section displaying items tagged with the current calendar season (northern-hemisphere mapping)
  • Adds compact display labels (spr/sum/fall/win), Wong-palette status styles for all four seasons, and comprehensive tests covering CRUD round-trips, inline edit, dashboard rendering, and the data layer

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
plans/seasonal-tagging.md Design document for the feature
internal/data/models.go Adds Season field to MaintenanceItem and season constants
internal/data/meta_generated.go Regenerated to include ColSeason constant and season in TableExtractColumns
internal/data/dashboard.go Adds SeasonForMonth helper and ListMaintenanceBySeason query
internal/data/dashboard_test.go Tests for ListMaintenanceBySeason (including soft-delete exclusion) and SeasonForMonth
internal/app/tables.go Adds maintenanceColSeason enum value, column spec, and maintenanceSeasonCell helper used by both row builders
internal/app/styles.go Adds StatusStyle cases for all four seasons
internal/app/forms.go Adds Season to maintenanceFormData, seasonOptions(), season select in both add/edit forms and inline edit
internal/app/compact.go Adds short season labels to statusLabels map
internal/app/handlers.go Adds season to SyncFixedValues for pin-filter support
internal/app/dashboard.go Adds Seasonal field to dashboardData, loads and renders the "Seasonal" dashboard section
internal/app/rows_test.go Tests season cell rendering in maintenanceRows
internal/app/handler_form_wiring_test.go Tests season inline edit opens form overlay (not inline input)
internal/app/handler_crud_test.go Tests SyncFixedValues for season and season create/edit round-trips
internal/app/form_save_test.go User-level tests for create/edit/inline-edit with season
internal/app/dashboard_test.go Tests seasonal section display and empty-state behavior
AGENTS.md Extends the TDD rule from regression bugs to all feature work

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 94.39252% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.69%. Comparing base (73f87f3) to head (71a0785).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/app/dashboard.go 90.00% 2 Missing and 1 partial ⚠️
internal/data/dashboard.go 84.21% 2 Missing and 1 partial ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
internal/app/compact.go 100.00% <ø> (ø)
internal/app/forms.go 86.04% <100.00%> (+0.24%) ⬆️
internal/app/handlers.go 84.13% <100.00%> (+0.27%) ⬆️
internal/app/styles.go 94.56% <100.00%> (+0.18%) ⬆️
internal/app/tables.go 99.09% <100.00%> (+0.01%) ⬆️
internal/data/meta_generated.go 100.00% <ø> (ø)
internal/data/models.go 88.23% <ø> (ø)
internal/app/dashboard.go 87.31% <90.00%> (+0.10%) ⬆️
internal/data/dashboard.go 70.32% <84.21%> (+3.66%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings March 10, 2026 08:30
@cpcloud cpcloud force-pushed the worktree-dreamy-jingling-hopcroft branch from e9209ba to 795c20e Compare March 10, 2026 08:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 10, 2026 09:18
@cpcloud cpcloud force-pushed the worktree-dreamy-jingling-hopcroft branch from 081edbb to 795c20e Compare March 10, 2026 09:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 10, 2026 10:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

cpcloud and others added 5 commits March 10, 2026 06:44
The previous rule only covered regression tests. Reframe as
"tests are the spec" -- if they pass but the feature is incomplete,
the tests are wrong.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a Season field to MaintenanceItem so homeowners can tag tasks by
season (spring, summer, fall, winter). Surfaces across the full stack:
table column with cellStatus badge, add/edit forms, inline edit,
pin-filtering, and a new "Seasonal" dashboard section showing items
tagged with the current calendar season.

closes #686

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…table

The new Season column shifted Appliance from index 3 to 4. Use the
typed maintenanceColAppliance constant instead of a bare integer so the
sub-table inline edit dispatches to the correct full-table column.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The comment claimed skipColEdit remaps sub-table col 3 to full-table
col 4 (maintenanceColSeason). In reality, maintenanceColSeason is 3
and since 3 < skipAt (maintenanceColAppliance=4), no remap occurs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cpcloud cpcloud force-pushed the worktree-dreamy-jingling-hopcroft branch from b397332 to 9ee2834 Compare March 10, 2026 10:45
Use constant names only; the whole point of named constants is to
abstract over their numeric values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 10, 2026 10:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cpcloud cpcloud merged commit 0d591ac into main Mar 10, 2026
29 checks passed
@cpcloud cpcloud deleted the worktree-dreamy-jingling-hopcroft branch March 10, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(domain): seasonal tagging for maintenance items

2 participants