Skip to content

Add repeat_every (fixed-schedule) mode with guided multi-step flow alongside existing repeat_after (completion-coupled) mode#33

Draft
Copilot wants to merge 22 commits intomainfrom
copilot/feature-repeat-every-vs-after
Draft

Add repeat_every (fixed-schedule) mode with guided multi-step flow alongside existing repeat_after (completion-coupled) mode#33
Copilot wants to merge 22 commits intomainfrom
copilot/feature-repeat-every-vs-after

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 12, 2026

  • Fix DONE no-op for all callers (previous task)
  • sensor.py: Emit only mode-relevant attributes — repeat_aftertask_interval_value/type; repeat_everyrepeat_every_type + only the sub-fields for that type; no more Unknown values for irrelevant attrs
  • Translations (strings.json, en.json, de.json): Added keys for schedule, every, on, day_of_month_prefix, of_month, days_before_end_of_month_singular/plural, last_day_of_month, weekday names, occurrence_1/2/3/4/last
  • task-tracker-card.js: Added _scheduleStr() helper; repeat_after shows "Interval: 7 Days"; repeat_every shows human-readable "Schedule: Every 2 Weeks on Monday" / "Day 15 of month" / "1st Monday of month" / "5 days before end of month" etc.
  • task-tracker-panel.js: Same _scheduleStr() helper in _renderTaskCard
  • All 233 unit tests pass

Copilot AI linked an issue Apr 12, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add feature for repeat every vs repeat after functionality Add repeat_every (fixed-schedule) mode alongside existing repeat_after (completion-coupled) mode Apr 12, 2026
Copilot AI requested a review from gensyn April 12, 2026 17:24
@gensyn
Copy link
Copy Markdown
Owner

gensyn commented Apr 12, 2026

@copilot While this solution probably works, this is a very minimalistic approach and not very user friendly. I would prefer a solution that supports the following for repeat_every:

  • repeat every nth [monday ... sunday]
  • repeat on every nth day of the month
  • repeat every nth [monday ... sunday] of the month

With this functionality, repeat_after and repeat_every would need fundamentally different options and could not be entered into the existing config_flow. Is there a way to first ask what kind of functionality is needed and then present different options based on the selection?

Copilot AI and others added 2 commits April 12, 2026 20:21
- 3 repeat_every sub-types: every N weeks on weekday, every Nth day
  of month, every Nth weekday of month
- Multi-step config_flow and options_flow (name+mode → mode-specific
  steps → sub-type details for repeat_every)
- Calendar-based due date calculations in sensor.py
- validate_options handles both modes with clean defaults
- Migration 1.4→1.5 backfills new repeat_every fields
- MINOR_VERSION bumped to 5
- strings.json, en.json, de.json updated for all new steps/selectors
- Unit tests fully updated (168 pass)

Agent-Logs-Url: https://github.com/gensyn/task_tracker/sessions/6e72bf5f-d9b6-4f98-8c8a-ec5f7f62d5f7

Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 12, 2026

@copilot While this solution probably works, this is a very minimalistic approach and not very user friendly. I would prefer a solution that supports the following for repeat_every:

  • repeat every ...

Done in commit 11373ab. The repeat_every mode now supports three calendar-based schedule types, presented via a guided multi-step flow:

Step 1 – name + repeat mode (repeat_after or repeat_every)

For repeat_after (step 2a):

  • Interval value + unit (day/week/month/year) — same as before

For repeat_every (step 2b → step 3):

  • Every N weeks on a weekday – pick weekday (Mon–Sun) + interval (e.g. every Wednesday, every other Monday)
  • Every Nth day of the month – pick day 1–31 (clamped to month length, e.g. day 31 → Feb 28/29)
  • Every Nth weekday of the month – pick weekday + occurrence (1st, 2nd, 3rd, 4th, last) — e.g. "2nd Monday" or "last Friday"

The coordinator async_mark_as_done already uses due_date (not today) for repeat_every, so the schedule stays anchored after each completion regardless of when the task was checked off.

Copilot AI changed the title Add repeat_every (fixed-schedule) mode alongside existing repeat_after (completion-coupled) mode Add repeat_every (fixed-schedule) mode with guided multi-step flow alongside existing repeat_after (completion-coupled) mode Apr 12, 2026
Copilot AI and others added 2 commits April 13, 2026 08:27
Copilot AI and others added 2 commits April 13, 2026 10:52
…move catch-up loop)

Agent-Logs-Url: https://github.com/gensyn/task_tracker/sessions/1ccf1a50-147c-4cf1-bc0a-65b82ec57bb9

Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Copilot AI and others added 2 commits April 13, 2026 11:34
…so gets correct behaviour

Agent-Logs-Url: https://github.com/gensyn/task_tracker/sessions/4c15afc1-b624-4bd0-b04f-12fb997d500d

Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
…aware schedule in card/panel

Agent-Logs-Url: https://github.com/gensyn/task_tracker/sessions/f6f47c48-4385-41fd-b147-84dfd92d3653

Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.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.

Feature Suggestion: Repeat Every vs Repeat After

2 participants