Fix plan days with no chapters, add a way out of ink mode, harden ntfy reminders
Build and Push Docker Image / build-and-push (push) Failing after 19s

Plans can no longer have more days than chapters (existing ones heal), and
opening a plan never strands the Reader on an empty day. The Reader shows
Done drawing while inking (Escape also exits). Reminders use the user's own
timezone, send within a 3 hour grace window, and Settings has a Send test
notification button.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-09-29 10:34:46 -04:00
1 parent ecb1c701fa
commit 297f2c7e84
14 files changed
+335 -58

No files matched your search

+8 -5
View File
@@ -1,5 +1,5 @@
import { lazy, Suspense, useEffect, useRef, useState } from 'react';
import { getPlanSchedule } from './utils/readingPlans.js';
import { getPlanSchedule, nearestReadingDay } from './utils/readingPlans.js';
import { AppContext, useApp } from './context/AppContext.js';
import { useAudio } from './hooks/useAudio.js';
import { useAuth } from './hooks/useAuth.js';
@@ -140,11 +140,14 @@ const App = () => {
const openPlanReading = (progressId, dayIndex, ref) => {
const progress = readingPlans.planProgress.find((p) => p.id === progressId);
if (!progress) return;
const refs = getPlanSchedule(progress.planId)[dayIndex] ?? [];
const done = progress.completedDays.includes(dayIndex);
const read = new Set(done ? [] : progress.chaptersRead?.[dayIndex] ?? []);
const schedule = getPlanSchedule(progress.planId);
// A day with nothing scheduled would leave the Reader where it was — use the nearest real day.
const day = schedule[dayIndex]?.length ? dayIndex : Math.max(0, nearestReadingDay(schedule, dayIndex));
const refs = schedule[day] ?? [];
const done = progress.completedDays.includes(day);
const read = new Set(done ? [] : progress.chaptersRead?.[day] ?? []);
const target = ref ?? refs.find((r) => !read.has(`${r.book}.${r.chapter}`)) ?? refs[0];
setReaderPlan({ progressId, dayIndex });
setReaderPlan({ progressId, dayIndex: day });
if (target) {
reader.setReaderBookAbbrev(target.book);
reader.setReaderChapter(target.chapter);