Skip to content

feat(cards): sticker chart card and logging a job done on an earlier day (#1063) - #1064

Merged
tempus2016 merged 18 commits into
mainfrom
merge/1063-sticker-chart
Oct 14, 2026
Merged

tempus2016 merged 18 commits into
mainfrom
merge/1063-sticker-chart

Conversation

@tempus2016

Copy link
Copy Markdown
Owner

Lands #1063 by @cad861: the Sticker Chart card, and logging a job done on an earlier day (complete_chore with completed_date, plus a "Log a past job" dialog in the admin panel).

#1063 was stacked on #1062. Squash-merging #1062 left #1063 with a conflict in sensor.py: two places where both sides added lines next to each other. The fork branch can't be updated from here, so this branch merges main into #1063's head and resolves it. The resulting tree is identical to #1063's head (54d9648), which passed CI and was tested on the dev HA instance:

  • Past-job logging awards points and is marked backdated; streak and chore count are untouched.
  • Refusals for daily limit, a day the chore wasn't due, more than 7 days ago, a future date, and a non-admin user.
  • A weekly-target bonus earned by past jobs is paid, and is reversed in full on undo.
  • Panel dialog: tap to log for yesterday, hold to undo.
  • Sticker chart renders across designs, including week-goal mode.

Closes #1063.

claude and others added 18 commits October 14, 2026 00:14
Adds an optional per-child picture entity (normally the child's person.*).
Its picture is read on every update and exposed as avatar_image, and a
shared __taskmate_child_visual helper makes every card prefer the photo
and fall back to the MDI avatar. The panel's child dialog gets a
"Photo from" picker.
A child's photo is read from their picture entity, but the sensors' shared
context was cached per coordinator update, so a photo changed on the person
entity stayed stale until the next TaskMate refresh. Track each child's
picture entity and refresh the sensors when its picture really changes, and
make the shared cache aware of external entity changes.
Adds the taskmate-sticker-chart-card Lovelace card and an admin-panel
dialog for logging jobs done on an earlier day. Builds on the child photo
change for the children's faces.

Backdated completions run the same post-approval hooks as a normal
approval (badges, quests, challenges, last_completed, one-shot disabling),
account for weekly-target and open-ended chores, and are marked so undoing
one does not lower the streak.
…chores

A job logged for an earlier day settles that week's weekly target bonus
(#1044), and an every-N-days chore (#1038) can only be logged on one of
its days.
The photo change already adds panel.child_picture_entity_label and _hint;
this branch added them a second time, which check-json rejects as
duplicate keys.
The past-day sticker chart skipped the weekly-target cap, so after a
backdated tick filled the selected week's quota the tile still offered
another tap that TaskMate then refused, and a week other than the current
one could offer a tap on an already-full quota. The day lookup now also
returns that week's progress per child, and the card caps a past day with
it exactly as it caps today with weekly_chore_progress.
…a day

Addresses the Copilot review on #1063:

- A switched-off chore is refused even when it has a weekly target (that
  path skipped the due-day check, which was where it used to be caught),
  and a day inside a holiday is refused.
- The rules live in _backdate_refusal. The day lookup now also returns the
  chores each child could have logged that day (loggable), so the plain
  list and the past-day sticker chart follow every schedule TaskMate knows
  (recurrences, every-N-days, calendar moves, holidays), not just weekdays.
  The plain list also leaves out weekly-target chores whose quota that
  week is full.
- A finished one-off job keeps its tile on the day it was ticked, so it can
  still be undone.
- Reduced motion also stops the celebration bouncing and the confetti.
- Week progress counts a teamwork chore at each member's share plus any
  team bonus, as it is paid.
Addresses the Copilot review on #1062:

- The chore board, kiosk and recap cards now draw a child through the
  shared face helper, so a child's photo shows there too and a child
  without one keeps their avatar. (The badges card has no per-child avatar
  to draw: its sensor sends none, so it always shows the generic icon.)
- The set of tracked picture entities trims each id the same way the photo
  lookup reads it, so a stray space can't leave a photo untracked.
Addresses the second Copilot review on #1062: the bounty board and auction
cards drew every child as an initial, and the child card's teamwork row
read the avatar directly. All three now use the shared face helper, so a
child's photo shows there; the bounty and auction cards keep the initial
for a child without one.
…ty with a picture

Addresses the third Copilot review on #1062:

- The badges sensor now says whose badges they are (child_name,
  child_avatar, avatar_image), and the card draws that face through the
  shared helper. Before, the sensor sent neither, so the card always
  showed a generic icon.
- "Photo from" lists any entity that has a picture (person, image,
  camera...) instead of person entities only, matching what the backend
  accepts.
Addresses the latest Copilot review on #1063:

- Undoing a completion refunded its weekly target bonus only inside the
  streak block, which skips backdated jobs, so a backdated job's bonus
  outlived the job. The refund now runs for every completion.
- A child's birthday with "chores off" is refused for every chore but the
  mandatory ones, the same rule today's chore list follows.
The weekly goal's denominator now drops a child's non-mandatory chores on
their birthday day off and applies the birthday multiplier to that day,
matching what the chores would actually pay.

Delete/Backspace on a ticked tile undoes it, the keyboard twin of
press-and-hold, and the tile advertises it with aria-keyshortcuts.
TaskMate's child sensors show the photo chosen for the child, so picking
one as the source made the face refer to itself and go stale. The picker
no longer lists them and the backend ignores one if it was already saved.

The hint now says any entity with a picture can be used, the child's
person being the usual choice.
@github-actions github-actions Bot added documentation Improvements or additions to documentation backend Python integration code cards Lovelace cards / frontend (www/*.js) translations i18n / locale strings tests Test suite labels Oct 14, 2026
@tempus2016
tempus2016 merged commit e249237 into main Oct 14, 2026
16 checks passed
@tempus2016
tempus2016 deleted the merge/1063-sticker-chart branch October 14, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Python integration code cards Lovelace cards / frontend (www/*.js) documentation Improvements or additions to documentation tests Test suite translations i18n / locale strings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants