The first version of this drawer built its own rows in JS. This one renders
core's `partials/notifications_list` partial with entries the support plugin
now returns in core's notification shape, so the markup is literally the
notification drawer's: avatar block, stretched link, muted timeago, per-entry
read dot, All/Unread filter row, and the same two footer buttons. The
handlers mirror core's too — only the API paths differ, because the list is
plugin-owned (core's unread count is one aggregate with no hook to carve a
type out of it).
Opening the box no longer marks everything read: like the bell, an entry is
read when you click it or use "Mark all read", and the dot toggles both ways.
Deletes the bespoke row builder and its hand-rolled relative-time helper;
`$.timeago` is what core uses for JS-inserted rows. The dropdown reuses the
`.notifications-dropdown` class this theme already styles, so it needs no CSS
of its own. Hardcoded English is gone (the code-review finding on the first
version): every string is a translation key.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Mirrors the existing unread-drawer pattern: a new dropdown next to the
notification bell, gated on templateData.support.visible (injected by
the support plugin's filter:middleware.renderHeader hook, on every page
render, for viewers with any support access at all). Opening it fetches
GET /plugins/support/notifications via the api module, renders up to
10 entries by textContent (never innerHTML), and marks everything read
via POST .../notifications/read, clearing the badge client-side.
Also present in the mobile burger drawer, same gating.
ponytail: no live socket push for this badge (core's own unread/notification
counts get one); it only catches up on the next full page load after the
box is opened. Noted in client.js as the upgrade path if that gap matters.
Verified live against sow-nodebb-plugin-support's dev NodeBB stack (theme +
plugin both mounted): icon hidden for a user with no support access, badge
count and dropdown contents correct for a reviewer, badge clears on open.
Full plain-node test suite passes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds an Unread dropdown to the topbar utilities (before notifications), per docs/superpowers/plans/2026-07-17-topbar-unread-drawer.md.
- New partial `templates/partials/header/unread-drawer.tpl`: toggle with live `component="unread/count"` badge (core socket updates), server-rendered empty/footer rows.
- `public/client.js`: on dropdown open, fetches `GET /api/unread` and injects up to 10 topic rows (titles/categories via textContent only); fetch failure falls back to the empty state.
- Mobile burger drawer gets an Unread row with the same badge.
- SCSS: unread dropdown joins the shared dropdown width rule; flex row styles for topic items.
Deviations from the plan's example code, found by live verification against the dev forum:
- Plan's `api.get('/unread')` hits the v3 write API and 404s → replaced with a fetch of the `/api/unread` read route.
- NodeBB 4 has no global `window.require`, so runtime translation of the static `[[unread:...]]` strings never ran → those strings are now server-rendered in the template (also removes the plan's translate-over-innerHTML step, which would have re-parsed untrusted titles as HTML).
Verified: full plain-node test suite passes; Playwright against the dev container passed all checks (badge count, item ordering before notifications, dropdown topic links + navigation, /unread footer link, mobile drawer badge at 390px).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Reviewed-on: #28
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
## Summary
- capture the post-review topbar refinements and implementation plan
- simplify the topbar brand to one SHADOWS OVER WESTGATE lockup
- remove the redundant desktop Forums dropdown and its custom panel handling
- give topbar dropdown and drawer surfaces an opaque local panel base
## Tests
- node --test tests/*.test.js
Reviewed-on: #7
Reviewed-by: xtul <mpiasecki720@protonmail.com>
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>