Skip to content

fix: allow logging overdue recurring habits and future one-time tasks - #115

Merged
thomasluizon merged 1 commit into
mainfrom
fix/overdue-habit-logging
Apr 2, 2026
Merged

fix: allow logging overdue recurring habits and future one-time tasks#115
thomasluizon merged 1 commit into
mainfrom
fix/overdue-habit-logging

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

Summary

  • Overdue recurring habits (weekly/monthly/yearly with missed past occurrence) can now be completed on today's date
  • One-time tasks can be completed before their due date (no more "Cannot log a future date" for tasks without frequency)
  • Added HasMissedPastOccurrence helper to HabitScheduleService for reusable overdue detection

Test plan

  • Monthly habit due yesterday (overdue) -> can complete today
  • Weekly habit missed last week (overdue, not due today) -> can complete today
  • One-time task due next week -> can complete today
  • Recurring habit due tomorrow (not overdue) -> still blocked from future logging
  • Daily habit -> unaffected (always due today)

🤖 Generated with Claude Code

Overdue recurring habits can now be completed on today's date even when
not scheduled for today. One-time tasks can be completed before their
due date.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@thomasluizon
thomasluizon merged commit 923c091 into main Apr 2, 2026
3 checks passed
@thomasluizon
thomasluizon deleted the fix/overdue-habit-logging branch April 2, 2026 15:09
thomasluizon added a commit that referenced this pull request Jun 4, 2026
…181)

* chore(api): fix integration-test Jwt:SecretKey length (>=32 bytes)

WebApplicationFactory<Program> loads config from the Orbit.Api content
root, where appsettings.json carries a 27-byte "REPLACE-IN-DEVELOPMENT-JSON"
placeholder for Jwt:SecretKey. JwtSettings.Validate() requires >=32 bytes,
so every integration test threw at startup
("Jwt:SecretKey must be at least 32 bytes (27 provided)").

The test project's own appsettings.json is never loaded by the factory
(content root resolves to src/Orbit.Api), so its valid key was dead config.
Inject a test-only secret via UseSetting in the factory instead. Production
validator is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(api): encrypt Google tokens backfill + user data export (#115)

Add User to the DataEncryptionMigrationService backfill loop (versioned the
EncryptionMigrationComplete flag to EncryptionMigrationComplete_v2 so existing
User rows with plaintext Google OAuth tokens are re-encrypted once). Verified
the GoogleAccessToken/GoogleRefreshToken converter wiring with a real-key
round-trip test.

Add an authenticated GET /api/profile/export (ExportUserDataQuery + UserDataExport
model) returning all of the user's habits, logs, goals, progress logs, tags, facts,
and settings as a downloadable JSON attachment (LGPD Art. 18 / GDPR Art. 20).
Integration-tested for content and per-user scoping.

Refs thomasluizon/orbit-ui-mobile#115

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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