Studying: daily five minutes, reading list, plan-day studies use your template

- Home: "Your five minutes": a rotating Observe/Interpret/Apply prompt on the
  passage whose matching note is thinnest in your own words, a 5:00 clock and a
  box that appends to that note. Pasting is blocked; sessions show in Insights.
- Study: a Reading list tab (R) for the study: books and articles to consult,
  with a note and a tick; merges across devices.
- Starting a study from a reading-plan day now uses the notes template you last
  picked when starting a study by hand (logic moved to utils/planStudy.js).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-14 13:51:49 -04:00
1 parent 0781fa3476
commit eccc5e509d
20 files changed
+376 -32

No files matched your search

+9 -3
View File
@@ -221,8 +221,8 @@ export function useProjectLibrary({
});
};
// Saves a weekly recall (what you remembered, and how it went) on one chunk of a stored study.
const saveChunkRecall = (id, chunkId, recall) => {
// Changes one chunk of a stored study (from Home, without opening it) and syncs it. `change` takes the chunk, returns the new one.
const updateStoredChunk = (id, chunkId, change) => {
const loaded = loadProjectById(id);
if (!loaded) return;
const updated = {
@@ -230,7 +230,7 @@ export function useProjectLibrary({
lastEdited: Date.now(),
chapters: loaded.chapters.map((ch) => ({
...ch,
chunks: ch.chunks.map((c) => (c.id === chunkId ? { ...c, recalls: [...(c.recalls ?? []), recall] } : c)),
chunks: ch.chunks.map((c) => (c.id === chunkId ? change(c) : c)),
})),
};
saveProjectToStorage(updated);
@@ -247,6 +247,11 @@ export function useProjectLibrary({
});
};
// A weekly recall (what you remembered, and how it went) on one chunk.
const saveChunkRecall = (id, chunkId, recall) => updateStoredChunk(id, chunkId, (c) => ({ ...c, recalls: [...(c.recalls ?? []), recall] }));
// Notes written from Home (the daily five minutes): counts as editing the chunk.
const saveChunkPatch = (id, chunkId, patch) => updateStoredChunk(id, chunkId, (c) => ({ ...c, ...patch, editedAt: Date.now() }));
// Deleting is immediate here, with an Undo for a few seconds; only after that is the server copy
// removed (and straight away if the tab is closed first, so a deleted project never comes back).
const finishDelete = (id) => {
@@ -314,6 +319,7 @@ export function useProjectLibrary({
renameProjectInStorage,
setProjectSeries,
saveChunkRecall,
saveChunkPatch,
deleteProject,
pullLatestFromServer,
};