Skip to content

Add daily planning, projects, routines, and offline capture - #6

Merged
joewolly merged 2 commits into
mainfrom
codex/daily-planning-projects-capture
Sep 20, 2026
Merged

joewolly merged 2 commits into
mainfrom
codex/daily-planning-projects-capture

Conversation

@joewolly

@joewolly joewolly commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Changes

Task Hub now supports daily planning and reliable mobile capture alongside its existing Inbox and maintenance workflows. Users can select and order Today tasks, snooze work, track waiting reasons and follow-up dates, add checklists, organize projects, save filtered views, and create calendar-based or completion-based routines.

The iPhone-friendly capture screen saves text and attachment drafts locally. Explicit submission can resume after expired authentication or lost responses without duplicating tasks or uploads. The installable app caches its capture interface; existing server tasks are not cached for offline browsing.

Includes additive SQLite migrations, configurable civil-date handling, follow-up notifications, export/calendar integration, and usage, upgrade, and Apple Shortcut instructions in docs/planning.md. Existing fixed-interval schedules retain their previous behavior.

Validation

  • The initial 211 tests passed on Node 22, 24, and 26 on Windows and Node 22/24 Alpine. The final 213-test suite includes regressions for edited routine starts and snoozed calendar follow-ups; it passes locally on Node 26, with Node 22/24 exercised by PR CI.
  • Docker image build, Compose configuration, health check, non-root runtime, restart persistence, and isolated backup restoration passed.
  • Automated Chromium/WebKit checks covered capture with attachments, Today ordering, snooze/waiting, checklists, projects, saved views, recurrence, responsive layout, storage errors, expired sessions, and lost-response recovery.
  • Chromium verified offline reload and a fresh offline launch from the home URL.
  • git diff --check passed.

Remaining manual verification

Physical iPhone installation, share-sheet integration, and standalone offline launch have not been verified. Windows WebKit could not verify service-worker offline reload; its loaded-page offline edits and submission recovery passed. A physical-device checklist is included in the documentation.

No deployment is included.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 38028662-6fe0-4517-a267-b6f92befab85


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 3/5

The PR is not yet safe to merge because routine edits can schedule the next occurrence from a stale anchor and snoozed follow-ups leak into the calendar feed.

Fix All in CodexFindings

  1. P1 Snoozed follow-ups stay visible ▶
Fix with agent prompt
### Issue 1
src/api/calendar.js:68-70
Snoozing a waiting task is supposed to defer its follow-up visibility, and the dashboard, digest, and notification queries honor that state. This calendar query emits every follow-up without checking `snoozed_until`, so a follow-up due today but snoozed until next week still appears on today's calendar.

```suggestion
  for (const task of db.prepare(`SELECT id,title,waiting_on,follow_up_date FROM tickets WHERE status NOT IN (${CLOSED_LIST}) AND waiting_on IS NOT NULL AND follow_up_date IS NOT NULL AND (snoozed_until IS NULL OR snoozed_until <= app_today())`).all()) {
    lines.push(...event({ uid: `followup-${task.id}@homelab`, stamp, date: task.follow_up_date, summary: `Follow up: ${task.title}`, description: task.waiting_on }));
  }
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR adds a broad planning and offline-capture layer to Task Hub while preserving the existing queue and maintenance workflows.

  • Adds Today ordering, snooze/waiting state, checklists, projects, saved views, civil-date handling, and follow-up surfaces.
  • Adds calendar- and completion-based routines with migration support for existing schedules.
  • Adds device-local capture drafts, service-worker caching, and transactional idempotency for task and attachment retries.
  • Extends notifications, calendar feeds, exports, metrics, documentation, and the responsive frontend.
  • All 211 automated tests pass, but routine edits can use a stale recurrence anchor and snoozed follow-ups remain visible in the calendar.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Capture[Online or offline capture] --> Draft[IndexedDB draft]
  Draft -->|Explicit submission| Idempotency[Idempotent task and attachment writes]
  Idempotency --> Ticket[Ticket]
  Ticket --> Planning[Today / snooze / waiting / checklist]
  Ticket --> Project[Project and saved views]
  Ticket -->|Completion| Recurrence[Recurrence synchronization]
  Recurrence --> Schedule[Routine schedule]
  Schedule -->|Maintenance sweep| Ticket
  Planning --> FollowUp[Follow-up query]
  FollowUp --> Dashboard[Dashboard and digest]
  FollowUp --> Notify[Webhook notification]
  FollowUp --> Calendar[Calendar feed]
Loading

Reviews (1) · Last reviewed commit: "Add daily planning, projects, routines, ..."

Comment thread src/api/calendar.js Outdated
Comment on lines +68 to +70
for (const task of db.prepare(`SELECT id,title,waiting_on,follow_up_date FROM tickets WHERE status NOT IN (${CLOSED_LIST}) AND waiting_on IS NOT NULL AND follow_up_date IS NOT NULL`).all()) {
lines.push(...event({ uid: `followup-${task.id}@homelab`, stamp, date: task.follow_up_date, summary: `Follow up: ${task.title}`, description: task.waiting_on }));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Snoozed follow-ups stay visible

Snoozing a waiting task is supposed to defer its follow-up visibility, and the dashboard, digest, and notification queries honor that state. This calendar query emits every follow-up without checking snoozed_until, so a follow-up due today but snoozed until next week still appears on today's calendar.

Suggested change
for (const task of db.prepare(`SELECT id,title,waiting_on,follow_up_date FROM tickets WHERE status NOT IN (${CLOSED_LIST}) AND waiting_on IS NOT NULL AND follow_up_date IS NOT NULL`).all()) {
lines.push(...event({ uid: `followup-${task.id}@homelab`, stamp, date: task.follow_up_date, summary: `Follow up: ${task.title}`, description: task.waiting_on }));
}
for (const task of db.prepare(`SELECT id,title,waiting_on,follow_up_date FROM tickets WHERE status NOT IN (${CLOSED_LIST}) AND waiting_on IS NOT NULL AND follow_up_date IS NOT NULL AND (snoozed_until IS NULL OR snoozed_until <= app_today())`).all()) {
lines.push(...event({ uid: `followup-${task.id}@homelab`, stamp, date: task.follow_up_date, summary: `Follow up: ${task.title}`, description: task.waiting_on }));
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/api/calendar.js
Line: 68-70

Comment:
**Snoozed follow-ups stay visible**

Snoozing a waiting task is supposed to defer its follow-up visibility, and the dashboard, digest, and notification queries honor that state. This calendar query emits every follow-up without checking `snoozed_until`, so a follow-up due today but snoozed until next week still appears on today's calendar.

```suggestion
  for (const task of db.prepare(`SELECT id,title,waiting_on,follow_up_date FROM tickets WHERE status NOT IN (${CLOSED_LIST}) AND waiting_on IS NOT NULL AND follow_up_date IS NOT NULL AND (snoozed_until IS NULL OR snoozed_until <= app_today())`).all()) {
    lines.push(...event({ uid: `followup-${task.id}@homelab`, stamp, date: task.follow_up_date, summary: `Follow up: ${task.title}`, description: task.waiting_on }));
  }
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex

@greptile-apps

greptile-apps Bot commented Sep 20, 2026

Copy link
Copy Markdown

Comments Outside Diff

These findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.

  • P1 Routine edits keep stale anchors src/api/schedules.js:114 ▶

    Editing a routine while its current occurrence is open updates next_due and the recurrence rule but leaves last_due unchanged. When that occurrence is completed, syncRecurrence gives the stale last_due priority over the edited start date. For example, changing a weekly routine due September 1 to a monthly routine starting October 15 can schedule its successor from September 1 instead of the new start date.

@joewolly
joewolly merged commit 171c47c into main Sep 20, 2026
9 checks passed
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