Support inbox drawer on the topbar, 1:1 with the notification drawer #45

Merged
archvillainette merged 5 commits from feat/support-inbox-header-icon into main 2026-07-24 21:46:03 +00:00
5 Commits
Author SHA1 Message Date
archvillainette 67582d25cf deprecate old agent skills 2026-07-24 23:29:42 +02:00
archvillainetteandClaude Opus 5 cc799475f2 Take the support drawer back out of the topbar (sow-nodebb-plugin-support#10)
Support case notifications now live in the notification bell, as a "Cases"
filter button added by nodebb-plugin-support on core's own hooks. The plugin
owns all of it, so this theme's second bell — its icon, drawer, client code,
language keys and tests — comes out.

The theme was the wrong home for it. The drawer's markup and JS lived here, so
whether the support plugin could notify anyone depended on which theme a forum
ran. Nothing about support belongs in a theme.

The `/support` link is unaffected; it comes from the ACP navigation, which
this theme already renders in both the desktop bar and the mobile drawer.

Checked in a browser on the dev stack: no support icon in the topbar, and the
bell's new tab filters a mixed notification list correctly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-24 23:28:00 +02:00
archvillainetteandClaude Opus 5 9d4adca127 Write down the dev-stack and Playwright traps (sow-nodebb-plugin-support#10)
Assume the dev stack is dirty on arrival and leave it clean; the compiled
templates/client JS need an explicit build, and the build marker lives on the
container filesystem so a plain restart skips it. Also records this forum's
login selectors and the fact that waitForURL('**/') never matches NodeBB's
post-login /?loggedin=true.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-24 22:25:11 +02:00
archvillainetteandClaude Opus 5 4acf32ec09 Make the support drawer core's notification drawer (sow-nodebb-plugin-support#10)
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>
2026-07-24 22:20:04 +02:00
archvillainetteandClaude Sonnet 5 ca2aefa156 Add a support inbox icon to the topbar (sow-nodebb-plugin-support#10)
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>
2026-07-24 21:29:57 +02:00