Repository navigation
refactor(chores): one shared New Chore dialog for admin and widget - #382
Merged
jherforth merged 4 commits intoNov 6, 2026
Merged
Conversation
added 2 commits
November 5, 2026 17:29
The dashboard widget baked in one fixed schedule (one person, weekly days or one-time, no due date, no duration). Add now creates the chore, then opens ScheduleChoreDialog — the Admin → Chores flow — so it can do every-N-days, monthly, any-day, repeat-after-completion, keep-until-completed, several people, and joining an existing schedule, all through the same schedulePayload save path. The widget's usage=chart schedule list leaves out the sticky durations, so the dialog gets the full list for its join-an-existing-schedule section. Tests: schedulePayload cases pin the 2026-10-05 once-completed case (null crontab + due date) and repeat-after-completion.
The widget's Add Chore opened its own lookalike identity dialog while Admin → Chores' New Chore button opened the real one (title, description, clam value, icon, follow-ups, Create and Schedule). The widget's copy had no follow-ups section, no Create-only path, no follow-up validation or save, and no error feedback on a failed save. Extract the admin dialog into ChoreFormDialog.jsx, used by both entries, with the follow-up row/rule helpers in utils/choreFollowups.js (pure, so tested). The tab keeps only which chore is edited and whether to offer Schedule; the widget passes its non-routine chores and users, refreshes with fetchData, and opens ScheduleChoreDialog for a chore saved with Schedule. No layout change, no behaviour change on either path.
Owner
|
Good catch! |
ChoreWidget.jsx: keep jherforth#382's removal of the ChoreIconPicker import (the picker is in ChoreFormDialog now) and jherforth#380's routine imports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the dashboard a chore with no schedule never shows, and the widget has no toast, so Create (or Enter in the title) saved a chore that seemed to vanish, and a parent would add it again. ChoreFormDialog takes scheduleOnly: Create is hidden and Enter does what Schedule does. Admin's dialog keeps Create and Schedule as before. Also drops chores:add.* from both locales, the old widget form's strings, no longer used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adamecker
pushed a commit
to adamecker/HomeGlow
that referenced
this pull request
Nov 7, 2026
…rforth#382, jherforth#384) and origin/test/all-combined into test/all-combined Upstream: Stacks/display Modes/takeovers (jherforth#378), routine complete-all (jherforth#380), mirror re-measure (jherforth#381), shared New Chore dialog (jherforth#382), admin PIN chooses the mode helper (jherforth#384). Fork side: Open-Meteo provider, precipitation probability, bonus-chore return to pool, Google Tasks no-due-date fix, dock-hide-on-dialog, HA panel test seed. Conflicts (fork's jherforth#380/jherforth#382 branches vs upstream's merged versions): took upstream's refinements (scheduleOnly, tickRemainingStepsOrThrow); app.jsx combines both (dock stays hidden while dragging is false and a dialog is open). Auto-seed now strips the HA mode-helper link from seeded settings, so a new display never inherits another display's helper (jherforth#384: only the admin PIN chooses it). The Stacks tests pre-create their devices in before(), while no device has widgets yet, so auto-seed leaves them empty.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
The Chores widget's Add Chore button opened a create-only form, while Admin → New Chore opened the full schedule flow — two dialogs for the same chore, with the widget one unable to set follow-ups or assign multiple people.
ChoreFormDialogcomponent is now used by both the widget and Admin, so both open the identical dialog: title, description, clam value, icon, follow-ups, and Cancel/Create/Schedule.choreFollowups.jshelper with tests;ChoreSchedulesTab.jsxandChoreWidget.jsxuse the shared dialog.Testing
Tested end to end with demo data:
Screenshots
Widget Add Chore opening the shared dialog:
Schedule flow with multiple people picked:
Admin → New Chore, the identical dialog:
Generated with Muse AI 🤖