Skip to content

Sunday email nudge, touched dreams, deeper questions, turn history - #21

Merged
sarthakagrawal927 merged 1 commit into
mainfrom
feat/weekly-log-depth
Sep 20, 2026
Merged

sarthakagrawal927 merged 1 commit into
mainfrom
feat/weekly-log-depth

Conversation

@sarthakagrawal927

Copy link
Copy Markdown
Member

Summary

Closes the four gaps between the weekly log and "a life you want to live":

  • Sunday pull (opt-in): a users.weeklyEmailOptIn toggle on the log flips on a quiet Sunday email — Cloudflare Email Sending (EMAIL binding) fired by a cron (0 22 * * 6 + 0 14 * * *). The handler emails only owners whose local day is Sunday and whose current week has no entry — a written week is never nudged. Copy is no-streak, no-guilt by contract.
  • Reconciliation: detectDreamTouches matches entry prose to dream titles/categories on-device-read-only; the log now shows "This week touched" chips and removes touched dreams from "Still calling?". No fake state written.
  • Question depth: bank 30→50 (5/family); when a classifier-picked family is exhausted, Workers AI generates a question from the same categorical context — prose still never leaves the app.
  • Turns persist: interview Q&A stored on WeeklyLogEntry.turnsJson (+ local record), so Weeks on record renders the prompts alongside answers.
  • Migration 0006 (additive: weeklyEmailOptIn, turnsJson) — apply remote before deploy.

Test plan

  • pnpm quality — all gates green
  • Unit: sender (Sunday filter, skip-written, opt-in, failure resilience), detectDreamTouches, turn-aware context
  • E2E: interview flow, persistence, axe — green in both modes
  • wrangler deploy --dry-runenv.EMAIL (unrestricted) Send Email binding resolves
  • Cron handler smoke-fired locally via --test-scheduled
  • pnpm db:migrate:remote for 0006
  • Post-merge deploy via workflow

Generated with Devin

Four gaps closed around the weekly log loop:

- Sunday pull: opt-in nudge email via Cloudflare Email Sending, sent by
  a cron on the owner's *local* Sunday; a written week is never nudged.
- Reconciliation: entries now show which held dreams the week touched —
  plain keyword matching, no fake dream state written.
- Question depth: bank grown to 50 and Workers AI generates a question
  when a classifier-picked family is exhausted — context stays
  categorical, user prose never leaves.
- Turns persist: interview Q&A is stored on the entry (turnsJson + local
  record) so Weeks on record keeps the prompts that produced it.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@sarthakagrawal927
sarthakagrawal927 merged commit a26c332 into main Sep 20, 2026
2 checks passed
@sarthakagrawal927
sarthakagrawal927 deleted the feat/weekly-log-depth branch September 20, 2026 16:17
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