Repository navigation
feat(crew-companion): edit a reminder's text in place - #14496
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify the panel's add box surfaces the new Suggestions
[DESIGN-REVIEWED] eae694a |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Only breaking piece to confirm: What this change shipsInventory (10 items) — 10 justifiedIntent: let the user fix a reminder's text in place instead of deleting and re-adding it — an ADDITION (linked issue #5552).
[FIRST-PRINCIPLES-REVIEWED] eae694a |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Edit has no visible finish or cancel — blur silently saves, Escape is undiscoverable, and a failed save names no next step. Watch
[UX-REVIEWED] eae694a |
Opus 5 Review — ✅ no blocking findingsReviewed Review detailsNothing blocks; two advisory findings in the new in-place reminder editor. FINDING — website/src/apps/crew-companion/RemindersSection.tsx:57 — FINDING — website/src/apps/crew-companion/RemindersSection.tsx:117 — the new hold promises to "keep its row until save or cancel", but every case that actually retains a row is one where the reminder left the store ( [OPUS-REVIEWED] eae694a Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
4f92cdd to
be1a3ca
Compare
be1a3ca to
6f5ade2
Compare
|
|
|
|
|
|
|
6f5ade2 to
694ce0b
Compare
|
|
|
d5a6700 to
c53f66b
Compare
|
|
|
|
|
|
c53f66b to
a479378
Compare
|
a479378 to
93fab5f
Compare
|
The catalogs-chunk budget change is no longer part of this PR. Main landed its own ceiling for chunk |
|
|
|
A pencil on each reminder row opens an inline editor: Enter or blur saves, Escape cancels, and a failed save keeps the draft open with an error. POST reminders/update changes only the text, reusing the add route's text rule; an unknown id answers 404 reminder_not_found.
93fab5f to
eae694a
Compare
|
Problem / Motivation
Goal: Let the user fix a Crew Companion reminder's text in place instead of deleting it and adding it again.
Each row in the Companion page's reminder list has only a remove (x) button. A typo in a captured task can only be fixed by deleting the row and typing the whole reminder again, time included.
Why it matters
Delete-and-re-add loses the reminder's schedule and repeat setting, and the user has to type them again. Editing the text should not cost that.
Not a goal
PanelViews.tsx). This PR changes the dashboard page only.What changed (motivation → approach → change)
POST /api/apps/crew-companion/reminders/updatetakes{id, text}. It uses the same text rule asreminders/add(now shared through_text_error, which also caps text at 500 characters) and changes only the text. The time and repeat stay as they were. An unknown id answers 404reminder_not_found.CompanionStore.updatesaves under the store lock, like the other mutations.website/src/apps/crew-companion/RemindersSection.tsxgets an Edit control, wired to the new route inCrewCompanionPage.tsx. A one-time row shows a pencil button. A repeating row already has Skip, so Skip and Edit move into one "More actions" menu (the sharedcomponents/ui/dropdown-menu) and Remove stays visible: every row holds two actions, as the blockingmax-two-buttons-per-rowrule requires.ErrorNotice. Only one save runs at a time, and text typed while a save is in flight is kept. Remove is hidden while the editor is open, so the only control beside it is not a delete.ErrorNotice, reworded to "Couldn’t refresh your reminders. Retrying…") above the list instead of replacing it, so an open edit is not unmounted. A reminder that fires mid-edit drops out of the next poll; its row is held until the user saves or cancels, so the draft is not lost. Below 480px the reminder text takes its own line (styles.ts), so time, tag and actions cannot squeeze it to nothing.offlinetext is reworded in every catalog. One new key,edit_aria, inwebsite/src/i18n/locales/en.manual.jsonand every translated catalog. The error text and the menu's "Edit" label reuse existing keys. The Skip button's ownskipandskip_ariastrings are removed, since the menu item usesskip_title.en-XAis regenerated.Backwards compatibility
Breaking: reminder text over 500 characters is now refused with 400
text_too_longonreminders/add, as on the newreminders/update, because a fire copies the text into the persisted pending queue and an unbounded text could push the store past its load cap and stop every tick. Only new writes are refused: existing longer reminders still load (row_from_dictdoes not check length) and still fire. Writer sweep on origin/main @ 20ed6a1: the dashboard page's add box (CrewCompanionPage.tsx) and the overlay panel's add (panel.tsx) both POSTreminders/addand keep the draft on a refused write; no other caller of the route exists, and no companion MCP tool or store path had a text limit to reuse.Tests
crew_companion/tests/test_routes.py: update changes only the text (trimmed); time and recurrence are kept. Blank text answers 400text_required, a missing idid_required, an unknown id 404reminder_not_found, and the stored row is unchanged. The new route is in the "every route is gated" list.website/src/test/CrewCompanionEditReminder.test.tsx: Enter saves trimmed text and closes; blur saves; Escape cancels; blank text does not save; a failed save keeps the draft with the reason; a second Enter during an in-flight save is ignored and newer typing is kept; Remove is hidden while editing and the editor survives a failed poll; an open edit survives its reminder dropping out of the list, and Escape then removes the row; Edit opens from the More menu on a repeating row with focus in the editor.Manual verification
Captured the real
RemindersSectionwith its shipped stylesheet in a stubbed harness, at this revision, in dark and light themes and at 360px. Each scene asserts before it saves: no Skip button on the repeating row, the open menu lists "Skip just the next one" and "Edit", Remove is gone while editing, a failed save shows its reason with the draft still in the input, and a failed poll shows the offline alert above the list.Screenshots / video
A one-time row with the pencil, and a repeating row with More and Remove:
The More menu open on the repeating row:
Editing in place (dark, light); Remove is hidden while the editor is open:
A failed save keeps the draft and shows the reason:
At 360px the text takes its own line:
A failed poll: the offline alert sits above the list, which stays usable:
Related Issues
Closes #5552
Checklist