# Changelog

All notable changes to the Navagoo shop portal are documented here.
Format: [Keep a Changelog](https://keepachangelog.com/) · commits follow Conventional Commits.
Deeper engineering history (parity waves, security passes, port plans) lives in `ai_specs/05_PLANS/`.

## [Unreleased] — branch `tailwind-poc`

### 2026-07-05 — One settings surface

#### Changed
- **`/shop-settings` merged into the `/settings` hub** (`4a80c46`): the legacy long-form profile page
  (cover + gallery uploads, bilingual title, gender, Google-Maps location, about/cancel-terms/website)
  moved into the hub's General tab; refund window / partial refund / no-show threshold moved into
  Scheduling as "Booking policies". Saves go through `ShopSettingsService` so all security guards
  (privileged-field re-pin, slot-step lock, MultiLanguage persistence) still apply. The old route is a
  301 redirect and the duplicate sidebar entry is gone.

### 2026-07-05 — Notifications: follow-ups closed + engine hardening

#### Added
- **Settlement shop alert** (`fe846bb`): new transfer-scoped `dispatchShopEvent()` entry point;
  the shop owner gets an in-app `settlement_received` alert the moment an admin settles a
  withdrawal (inert until the trigger's in-app template is authored + approved).
- **Group-booking notifications** (`fe846bb`): group create / cancel / complete now fire the same
  per-child events as the solo flows (post-transaction, guarded, idempotent per child).
- Settlement template tokens `[amount]` / `[settlementDate]` / `[transferNum]` exposed in the
  admin template-editor variable catalogue with live-preview samples, en+ar (`8a2c5f3`).

#### Fixed
- **Paid-send suppression** (`7d2a2e0`): the paid-channel idempotency key was scoped to the shop,
  so a trigger's first SMS/WhatsApp send suppressed every later booking's send. Keys are now
  per-booking; usage counters re-scoped via `JOIN booking`.
- **Invisible shop alerts** (`7d2a2e0`): engine shop alerts were written without a recipient while
  the bell/feed filter by recipient — they now address the shop-owner user.
- **Settings usage tile stuck at zero** (`7d2a2e0`): the "in-app this month" tile filtered by a
  column the engine never writes.
- **Premature "Appointment Completed"** (`8a2c5f3`, review finding): "Collect all" on a group
  fired the completed notification (and could bill a paid channel) for bookings still scheduled —
  group collect does not complete; completion is now the sole source of that event.

### 2026-07-04 — Milestone N port: dynamic notifications (demo v0.13.0)

#### Added
- **Shop settings notifications tab = final demo table** (`c46e6e3`): fixed-header table, template
  preview expand/collapse, per-trigger schedule + monthly sent-count, exclusive None/SMS/WhatsApp
  channel buttons with cost-confirm dialog, "Platform-managed" rows.
- **Admin messaging config** (`c46e6e3`): per-channel SMS/WhatsApp cards (sell / cost /
  refund-on-fail / free-per-month) with live margin badge; migration `m260704_100000`.
- **Firing engine completion** (`3d5dbe2`): over-allowance paid sends append charge-ledger rows;
  `markNotifFailed()` reverses by the admin-configured refund; `notifications/process-due` cron
  fires offset/calendar reminders every 5 minutes (instant-based comparison, same-day guard).
- **Shop inbox bell dropdown** (`820b961`): 8 most recent, unread badge, mark-all-read, per-row
  mark-read on the feed page.
- Per-channel notification-fee split in the Earnings settlement strip; "reverses CHG-x · failed
  delivery" annotations on the charges ledger (`c46e6e3`).

#### Fixed
- `/agent-slots` listing 500 caused by a broken duplicate shop-scope (`5bd6ede`).

#### i18n / build
- All new strings shipped in both `en` + `ar`; Tailwind bundle rebuilt (`bb01f13`).

> Verified: 29/29 page render smoke · 17 engine unit tests · live fire→bill→fail→refund→idempotent
> exercise · code-reviewed (all findings fixed). Details: `ai_specs/05_PLANS/DEMO_SYNC_MILESTONE_N_PHASE2_PLAN.md`.

### Earlier

Pre-changelog history (aurora re-skin waves 1–21, finance hub, team epic, security hardening pass,
booking calendar port) is documented in `ai_specs/05_PLANS/HANDOVER.md` and the git log.
