Repository navigation
Task sheet: done and snooze for you only (the sheet is unchanged) - #63
Conversation
Published from the private repository by oss-sync. - Task sheet: done and snooze for you only (the sheet is unchanged) 37 files changed, 1328 insertions(+), 176 deletions(-)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88ad0cd1b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| overdue: counts.overdue, today: counts.today, doneToday, | ||
| nextDue: upcoming ? (upcoming.kind === 'task' ? upcoming.todo.dueDate : upcoming.item.dueDate) : null, | ||
| snoozed: allSnoozed.length, | ||
| nextBack: first?.snoozedUntil ? { title: first.title, at: new Date(first.snoozedUntil) } : null, |
There was a problem hiding this comment.
Include sheet rows in summary snooze totals
When the owner snoozes a sheet row, the Snoozed fold and header count include it, but the default summary pane still derives both snoozed and nextBack solely from local tasks. If only sheet rows are snoozed, the summary omits the snooze line entirely; with mixed rows, it understates the count and may name the wrong next return. Combine the unfiltered sheetSnoozed(feed, now) rows with allSnoozed when building this summary.
Useful? React with 👍 / 👎.
| const now = new Date() | ||
| const asleepRows = sheetSnoozed(board.sheet, now) | ||
| const source = sheetName(board.sheet) |
There was a problem hiding this comment.
Load sheet data when opening the snoozed panel cold
When this lifecycle route is restored or opened directly before the Tasks screen has loaded, board.sheet is null and sheetSnoozed therefore returns no rows. The only cold-load effect above calls loadBoard(), which does not fetch the sheet, so sheet rows remain absent for the lifetime of this screen even though local snoozed tasks appear. Trigger loadSheet() for the snoozed panel when the feed has not been loaded.
Useful? React with 👍 / 👎.
| const found = findSheetItem(items, ref) | ||
| // Found by its title alone, the same row moved only if its due date and assignee | ||
| // held. A done row re-dated or reassigned in place (a weekly row bumped to next | ||
| // week) is the next one to do, so its done mark goes too; a snooze ends anyway. | ||
| const item = found && ((found.id === ref && mark.state !== 'done') || sameRow(mark, found)) ? found : null |
There was a problem hiding this comment.
Scope saved marks to the configured spreadsheet
When TASK_SHEET_ID is changed to a replacement or unrelated spreadsheet, existing marks are still matched against the new feed because findSheetItem sees only sheet:<gid>:<row>:<title-hash>, with no spreadsheet identity. Sheet IDs and row layouts are scoped per spreadsheet, so a cloned/template sheet can readily contain the same ref; an old snooze then hides that new row unconditionally, and a done mark can also carry over when its due date and assignee match. Persist the spreadsheet identity with each mark or clear/namespace marks when the configured sheet changes.
AGENTS.md reference: AGENTS.md:L71-L71
Useful? React with 👍 / 👎.
| else if (next === 'snoozed' && until) undoable(`Snoozed until ${wakeLabel(until, nowRef.current())}`, undo) | ||
| } catch (cause) { | ||
| fail(cause, next ? 'The row could not be marked.' : 'The row could not be put back.') | ||
| void loadSheet() |
There was a problem hiding this comment.
Roll back optimistic marks when recovery reads fail
If the mark request fails during an outage, this catch reports the error but leaves the optimistic withSheetMark result in state and relies entirely on loadSheet() to restore it. That recovery read commonly fails for the same outage, so a row that was never marked on the server remains hidden or shown as completed until a later successful refresh. Restore the captured feed when this sequence is still current; mobile/src/features/todos/store.ts has the same failure pattern in its markSheet catch.
AGENTS.md reference: AGENTS.md:L72-L72
Useful? React with 👍 / 👎.
Published from the private repository by oss-sync.
37 files changed, 1328 insertions(+), 176 deletions(-)