Skip to content

feat(chat): add habit rows and calendar event metadata (#1476) - #726

Merged
thomasluizon merged 1 commit into
redesign/mainfrom
thomasluizon/ticket-1476-astra
Oct 17, 2026
Merged

thomasluizon merged 1 commit into
redesign/mainfrom
thomasluizon/ticket-1476-astra

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

Closes thomasluizon/orbit-tickets#1476.

Day summary blocks now carry up to 20 habit rows plus the full row count. Calendar block events now carry their Google event id and source calendar name so the consumer can render actions in place.

  • StatusCards.cs appends optional nullable response fields and caps day rows at 20. Calendar ordering and its 10-event cap stay intact.
  • ProcessUserChatCommand.cs builds day rows with HabitListCardBuilder.Build from context.TodayHabits and context.TodayFacts, using the same done-status capability as the habit list block. Existing summary counts keep their calculation.
  • Builder and handler tests cover schedule facts, row order, legacy status behavior, child depth, bad habits, empty lists, limits, calendar metadata, and compatibility of existing serialized fields. src/Orbit.Api/openapi.json is regenerated.

The calendar tool payload, prompts, tool schemas, and write paths are unchanged. The added metadata reads the repository's existing CalendarEventItem.Id and CalendarEventItem.CalendarName properties; no external response fields are added to the implementation. This response-only change adds no user input or domain mutation requiring new validation rules.

Assumptions

  • Existing BuildDay callers that omit rows receive an empty list and TotalRows = 0, rather than requiring changes to callers outside this feature. The chat response path always supplies the shared habit-list rows.

Test evidence

  • dotnet build Orbit.slnx: passed with 0 errors.
  • dotnet test tests/Orbit.Application.Tests --no-build --filter 'FullyQualifiedName~StatusCardBuilderTests|FullyQualifiedName~ProcessUserChatCommandHandlerTests': 178 passed, 0 failed.
  • dotnet test: 9,456 passed, 0 failed, 0 skipped across analyzer (32), domain (661), application (5,464), and infrastructure (3,299) projects.
  • git diff --exit-code -- src/Orbit.Api/openapi.json: passed after regeneration during the full suite.
  • Pre-commit formatting, dash, timelessness, root-allowlist, and suppression-allowlist checks passed. No new narration comments.

@sonarqubecloud

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found within the required Critical/High review scope.

Reviewed changes Reviewed all five changed files, the chat context and persistence paths, and the web/mobile consumer schemas and day-summary renderers.

  • Day-summary rows: Adds optional habit rows and a full row count, reusing the existing habit-list builder and done-status capability while limiting the response to 20 rows.
  • Calendar metadata: Adds optional event IDs and source calendar names without changing existing event ordering, timestamps, or the ten-event limit.
  • Contract compatibility: Preserves existing response fields and appends nullable optional metadata; existing consumers do not require these additions.
  • Verification: All 178 focused builder and chat-handler tests passed. The optional cross-model check was unavailable because codex is not installed.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@thomasluizon
thomasluizon merged commit 97c39fb into redesign/main Oct 17, 2026
26 checks passed
@thomasluizon
thomasluizon deleted the thomasluizon/ticket-1476-astra branch October 17, 2026 12:18
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.

1 participant