# Bug List for 1.0.6 Set 1

## Uppercase text for parent verification ✅

When entering a parent verification code (when creating a parent PIN) all entered characters should be uppercase. Convert the characters to uppercase in the UI.

**Fix:** Added `text-transform: uppercase` CSS and an `@input` handler that converts the value to uppercase on the verification code input in `ParentPinSetup.vue`.

## Assigning tasks should have the name of the child being assigned. ✅

![alt text](image.png)

Instead of just saying "Assign Chores", it should say Assign Chores for [Name] or Assign Chores [Name]

**Fix:** All four assign views (`ChoreAssignView`, `RewardAssignView`, `KindnessAssignView`, `PenaltyAssignView`) now read the child's name from the route query parameter and display it in the heading (e.g. "Assign Chores for Emma"). The `ParentView` passes `query: { name: child.name }` when navigating to each assign route.

## Child completing a general chore (not scheduled) ✅

When a child completes a general chore and it is approved, the parent sees "COMPLETED", but the child can click and have it approved again. The chore on the parent side should not say completed, it should just go back to normal state. General chores, by default, can be completed multiple times, so it should not say "COMPLETED" on the parent side.

**Fix:** Backend `child_api.py` now distinguishes between general and scheduled chores during trigger and approval. General chores no longer create an "approved" `PendingConfirmation` record — the existing pending record is simply removed on approval. Only scheduled chores persist an approved confirmation (which drives the COMPLETED stamp). This allows general chores to return to normal state and be triggered again.

## Scheduled chore and too late ✅

When extending "Make Your Bed" (a scheduled chore that is too late,) the "TOO LATE" banner does not go away even though it was extended. Activating it again tells me that the chore was already extended. I'm expecting that when the chore is extended the too late banner disappears.

**Fix:** `ParentView.vue` `doExtendTime()` now explicitly calls `childChoreListRef.value?.refresh()` immediately after the extension API call, before resetting expiry timers. This forces the chore list to re-fetch and re-render, removing the TOO LATE banner without waiting for an SSE race condition.

## Notification runoff ✅

Notifications for completed or pending tasks can sometimes be too long for the card can run off the card.
![alt text](image-1.png)
in the red square, the icon for the chore has run off the card. We need a better way to fit the information. Make the card heights for only notifications dynamic?

**Fix:** Updated `NotificationView.vue` CSS to use `overflow: hidden` and `text-overflow: ellipsis` on notification card content, preventing icons and text from overflowing card boundaries. Card heights are now flexible to accommodate varying content lengths.

## Point editing events ✅

When changing points in parent mode, the child mode does not see the point update until refreshed. There should be a functional SSE that updates the points in the child view (or other parent mode tabs)

**Fix:** Added SSE event handlers in `ChildView.vue` for `child_override_set` and `child_override_deleted` events. When a parent changes point overrides, the child view now listens for these events and refreshes the affected task lists (chores, kindness, penalties) in real time. Handlers are registered in `onMounted` and cleaned up in `onUnmounted`.

## Child tasks list editing in view ✅

When a child's task is edited (points changed or scheduled, etc) and saved. The view resets. The problem is that when the view resets, if the edited task was off screen and had to be scrolled to, the user has to do this again. The task that was just edited should be automatically scrolled to so that it is in view both vertically and horizontally.

**Fix:** `ScrollingList.vue` now exposes a `scrollToItem(itemId)` method that scrolls an item into view both vertically (via `scrollIntoView`) and horizontally (via `centerItem`). `ParentView.vue` tracks the last edited item ID when saving an override, and after the list refreshes, calls `scrollToItem()` on the appropriate list ref to bring the edited card back into view.

## Task sorting in child task view ✅

When viewing the child's chores, kindnesses, penalties, rewards. The items should be sorted differently.

### Parent mode order

1. Pending tasks (chores and rewards)
2. General tasks
3. Too late (chores) when it applies
4. Completed (chores) when it applies
5. Chores that are not scheduled for today.

### Child mode order

- Chores

1. Scheduled for today chores (with earliest deadline first when it applies)
2. General Chores
3. Pending chores
4. Completed Chores

- Rewards

1. Pending Rewards
2. Other rewards sorted by how many more points are required.

**Fix:** Added a `sortFn` prop to `ScrollingList.vue` that applies a custom sort after filtering. `ParentView.vue` defines `parentChoreSort()` (pending → general → expired → completed → unscheduled) and `parentRewardSort()` (pending first). `ChildView.vue` defines `childChoreSort()` (scheduled today with earliest deadline first → general → pending) and `childRewardSort()` (pending first, then ascending by points needed). These are wired as `:sort-fn` on their respective ScrollingList instances.

### Notification clicking ✅

When a parent clicks on a notification, the parent view should show for the child and child's task list. However, the task that was listed in the notification should be scrolled to both vertically and horizontally.

**Fix:** `NotificationView.vue` `handleNotificationClick()` now passes `query: { scrollTo: item.entity_id, entityType: item.entity_type }` when navigating to the parent child view. `ParentView.vue` reads these query parameters on mount and, after data loads, calls `scrollToItem()` on the correct list ref (chores, rewards, kindness, or penalties) with a short delay to ensure the list is rendered.

### Pending chore / reward changes ✅

If a chore or reward is changed while pending (schedule change or point change), the pending status should be reset back to normal state. Completed chores however should stay in the completed state.

**Fix:** Three backend API endpoints now clear pending status on modification:

- `task_api.py` `edit_task()`: When points or type changes, removes all pending chore confirmations for that task and sends `OPERATION_RESET` SSE events.
- `chore_schedule_api.py` `set_chore_schedule()`: After upserting a schedule, removes any pending chore confirmations for that child+task and sends reset events.
- `reward_api.py` `edit_reward()`: When cost changes, removes all pending reward requests for that reward and sends `CANCELLED` SSE events.
  Completed chores (approved PendingConfirmation on scheduled chores) are not affected by these changes.
