Skip to content

fix(cards): keep adult profiles off the rewards, bonus, penalty and bounty cards (#1071) - #1073

Merged
tempus2016 merged 1 commit into
mainfrom
fix/1071-adult-profiles-family-cards
Oct 15, 2026
Merged

tempus2016 merged 1 commit into
mainfrom
fix/1071-adult-profiles-family-cards

Conversation

@tempus2016

Copy link
Copy Markdown
Owner

Fixes #1071

Adult profiles (#1061) are meant to stay off family-wide cards unless the card turns on Show adults, and the Adult profile switch in the child dialog says so. Some cards still listed them. This was found while testing v6.4.0 on the dev Home Assistant.

What changes

Rewards card (classic and every designed style)

  • The child tabs leave adults out. The default selected child is the first kid, and a selection that is no longer listed (for example after Show adults is turned off) moves back to the first kid.
  • A jackpot's contribution breakdown leaves adults out, except an adult who has put points into that jackpot. Dropping them would make the shares not add up.
  • The "which children can claim" badges leave adults out.

Bonuses and Penalties cards: the child picker leaves adults out.

Bounty card: on a bounty open to everyone, the row of who can claim it leaves adults out. The card's own child is always in it, so an adult's own card still shows them.

All of these show adults after the kids when the card sets show_adults: true, and each editor gains the Show adults toggle. It appears only once the family has an adult profile and reuses the existing strings, so there are no new translations. A card pinned to a child_id behaves as before.

Show adults toggle reads off after reopening. The 10 editors that already had the toggle (calendar, graph, leaderboard, overview, parent dashboard, points, points display, reward progress, streak, weekly) left the value out of the form data. A card saved with show_adults: true therefore showed the toggle as off when the editor was reopened. They now pass the saved value through. The sticker chart editor already did.

The auction card needs no change. It is always pinned to a child and never lists the family.

Testing

  • 34 new frontend tests in taskmate-adult-profiles.test.cjs. Rewards and bonuses run under classic and playroom; bounty is covered too. They check that an adult is hidden by default and shown with show_adults, that a pinned card is unaffected, that the default selection skips the adult, that the selection resets, that a jackpot keeps an adult who contributed, and that every editor reflects a saved show_adults. The new tests fail on main (16 of 20 card tests and 10 of 14 editor tests; the rest guard behaviour that should not change).
  • Full frontend suite: 717 passed. ESLint is clean, and node --check passes on every edited file.
  • Dev Home Assistant: I injected this branch's rewards and bonuses cards next to the shipped ones, with an adult profile present. By default the adult is gone from the rewards tabs, the jackpot breakdowns and the bonuses picker, in classic and playroom. With show_adults: true they show after the kids. No console errors. Checked by eye in screenshots.

…ounty cards (#1071)

The rewards card's child tabs, default child, jackpot breakdown and child
badges, the bonuses/penalties child picker and a bounty's open-to-everyone
row now follow the same family rule as the leaderboard: adults only with
show_adults, and a pinned child_id is unaffected. A jackpot still lists an
adult who has put points into it, so the shares add up. Each of those
editors gains the Show adults toggle.

The existing Show adults toggles also read off after reopening a card that
had it on, because the editors' form data left the value out. They now
pass it through.
@github-actions github-actions Bot added cards Lovelace cards / frontend (www/*.js) tests Test suite labels Oct 15, 2026
@tempus2016
tempus2016 merged commit 8f5dfca into main Oct 15, 2026
16 checks passed
@tempus2016
tempus2016 deleted the fix/1071-adult-profiles-family-cards branch October 15, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cards Lovelace cards / frontend (www/*.js) tests Test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adult profiles still appear on the rewards, auction, bounty and bonus/penalty cards

1 participant