Skip to content

Latest commit

 

History

History
974 lines (494 loc) · 33.6 KB

File metadata and controls

974 lines (494 loc) · 33.6 KB

Tests & screenshots

Test suite

The plugin is covered by four CI workflows (see .github/workflows/):

Workflow What it runs
Plugin Tests rspec — plugin_spec.rb, spec/lib, spec/requests (Guardian, permissions, the message endpoints, serialization, reply-approval enforcement, moderator-note notifications, the prompt trust-level caps, and the first-post checklist)
Category Save Tests rspec — spec/saves (category-save regression suite)
QUnit Tests test/javascripts/unit — the pure-logic matrix suites (precheck-prompt resolution incl. trust-level caps, footer message, first-post checklist gate)
Frontend System Tests spec/system — Capybara/Playwright end-to-end specs; uploads the screenshots below as the ui-screenshots artifact

Every screenshot below is produced by a passing system spec, so they double as a visual regression record. Each one is explained under its own heading.

Coverage for the newer features

These features are covered by request specs and QUnit unit tests; their end-to-end screenshots are not yet part of the gallery below:

Feature Tests
Moderator-note pop-up notifications spec/requests/mod_messages_spec.rb — notifications go to other staff, not the actor or regular users
Clickable links in the prompt dialogs exercised by the prompt system specs
Prompt trust-level caps spec/requests/mod_messages_spec.rb (persistence, clamping) + test/javascripts/unit/precheck-prompt-test.js (trust-level matrix)
First-post checklist spec/requests/checklist_spec.rb (read/edit/accept gating, version bump, trust-level cap, button label, serializer audience), test/javascripts/unit/first-post-checklist-test.js (gate matrix), and the system spec below
Per-topic prompt checklist spec/requests/topic_prompt_checklist_spec.rb (staff CRUD with mode/statement/frequency/max_tl, /checklist/owed?topic_id=…, per-topic-per-user acceptance with clamp, version bump, topic_view serializer, statement-mode payload, frequency=every_reply always returns, max_tl cap filters higher-TL non-staff, legacy reply-prompt pre-fill + migration) and spec/system/topic_prompt_checklist_spec.rb (staff opens the wrench-menu "Prompt Checklist", adds items, saves; another user replies and is prompted; accepts; second reply is NOT prompted; version-bump re-prompts; statement-mode modal renders without checkboxes; frequency: every_reply re-prompts on the second reply; max_tl cap skips higher-TL users; Moderator Actions modal no longer carries the Before-reply prompt section) — screenshots 171–186
Moderator-notes header pip & title prefix spec/requests/mod_note_header_indicators_spec.rb (mod_note_unread_count across states + MessageBus publishes on note set/reply and on notes-feed/seen), test/javascripts/unit/mod-note-unread-title-test.js (pure applyUnreadPrefix / stripUnreadPrefix matrix), and spec/system/mod_note_header_indicators_spec.rb (header pip + (N) title prefix render for staff with unread notes, clear after the shield tab is opened, never render for a regular user) — screenshots 190-192

Per-topic footer message

Topic page, moderator view

The starting point — a regular topic as a moderator sees it, before any moderator message is set.

Topic page, moderator view

The topic admin (wrench) menu

Opening the topic admin menu reveals the Moderator Actions button that staff use to manage this plugin's per-topic content.

Topic admin menu open

The Moderator Actions modal — empty

The modal opened from that menu, before anything is entered.

Moderator Actions modal — empty

The footer message field filled in

A moderator types the pinned footer message into the modal.

Footer message filled in

Footer message and reply prompt both filled in

The modal with both the footer message and the before-reply prompt entered.

Footer + reply prompt filled in

The footer message rendered after saving

After saving, the footer message appears in a banner at the bottom of the topic.

Footer rendered after save

A topic that already has a footer message

A topic loaded with a footer message already set — the state before an edit.

Topic with an existing footer

The modal re-opened for editing

Re-opening the modal pre-fills it with the topic's current values, ready to edit.

Modal re-opened for editing

The modal after editing the values

The modal with the footer message changed to a new value.

Modal after editing

The footer updated after the edit

The footer banner now shows the edited message — updated live, without a reload.

Footer updated after edit

The footer present, before it is cleared

A topic with a footer message, about to be cleared.

Footer before clearing

The modal with the footer field cleared

The moderator empties the footer message field in the modal.

Modal with the field cleared

The footer removed after clearing

After saving the empty field, the footer banner is gone.

Footer removed after clearing

The footer message as a regular user sees it

A non-staff member viewing the topic sees the footer banner just the same.

Footer visible to a regular user

The footer message rendered as HTML

HTML in the footer message (here, bold text) is rendered — it is admin/moderator-trusted content.

Footer message rendered as HTML

The footer still shown on a closed topic

The footer message keeps showing even after the topic is closed.

Footer still shown on a closed topic


Per-category new-topic prompt

The category Settings tab — prompt field

The Before-new-topic prompt field added to a category's Settings tab.

Category settings — prompt field

The category prompt filled in

A moderator types the prompt for that category.

Category prompt filled in

The category prompt saved

The prompt saved, with the green "Saved" confirmation.

Category prompt saved

The new-topic composer in that category

A user starts a new topic in the category that has a prompt set.

New-topic composer in the category

The new-topic confirmation dialog

On submit, the moderator's message appears as a confirmation before the topic posts.

New-topic confirmation dialog

Going back from the new-topic prompt

Choosing "Go back" returns to the composer with the content intact.

Go back from the new-topic prompt

The new topic posted after confirming

Choosing "Post anyway" submits the topic as normal.

New topic posted after confirming

No prompt in a category without one

In a category that has no prompt set, a new topic posts directly with no dialog.

No prompt in a plain category


Per-topic reply prompt

A user viewing the topic

A regular user opens a topic that has a before-reply prompt set.

User views the topic

The user's reply composer

The user opens the reply composer and writes a reply.

User reply composer

The before-reply confirmation dialog

On submit, the moderator's reply prompt appears as a confirmation.

Reply prompt dialog

Going back from the reply prompt

"Go back" keeps the composer open with the reply intact.

Go back from the reply prompt

Posting anyway from the reply prompt

"Post anyway" submits the reply.

Post anyway from the reply prompt

No prompt when none is set

A topic with no reply prompt configured — replies post directly.

No prompt when none is set

The reply prompt dialog (end-to-end flow)

The before-reply dialog shown in the full reply flow.

Reply prompt dialog

The reply posted after confirming

The reply is posted once the user confirms.

Reply posted after confirming


Pin a post to the bottom

The "Pin to Bottom" option in the post admin menu

A post's admin (moderator actions) menu, showing the Pin to Bottom button.

Pin option in the post admin menu

A post pinned to the bottom

After pinning, the post is shown at the bottom of the topic.

Post pinned to the bottom

A footer message and a pinned post together

A topic showing both a moderator footer message and a pinned post.

Footer message and pinned post together

A pinned post, before unpinning

A pinned post in place, about to be unpinned.

Pinned post before unpinning

The topic after unpinning

After "Unpin from Bottom", the pinned copy is gone.

Pinned post after unpinning

The pinned post rendered as the bottom post

The pinned post shown at the end of the post stream as a regular-looking post with a pin badge and a jump-to-original button.

Pinned post as the bottom post

Pinning the last post

When the pinned post is already the last post, only the in-stream pin badge shows — no duplicate copy.

Pinned post — last post

Pinning the second-to-last post

A non-last post gets the in-stream badge plus the copy at the bottom.

Pinned post — second-to-last

Pinning the third-to-last post

Same behaviour for the third-to-last post — badge plus bottom copy.

Pinned post — third-to-last

Pinning the tenth-to-last post

And for a post well up the thread (tenth-to-last) — badge plus bottom copy.

Pinned post — tenth-to-last


Per-topic reply approval

"Require approval for replies" set in the modal

The Require approval for replies checkbox ticked in the topic modal. While on, replies route to the review queue.

Require approval for replies


Private moderator note

The private note as staff see it

A staff-only note shown like a post — the moderator's avatar and name — never visible to regular users.

Private note — staff view

The private note hidden from a regular user

The same topic as a non-staff user: the private note is absent (it is not even sent to non-staff).

Private note hidden from a regular user

The note with a timestamp and a Reply button

The note shows a relative timestamp ("how long ago") and a small Reply button.

Private note with timestamp and reply button

The reply box on the note

Clicking Reply opens a box for a moderator to add to the note thread.

Private note reply box

A reply added to the note thread

The reply, posted — the note is now a staff-only thread, each entry with its author and time.

Private note reply added


Moderator-notes user-menu tab

The shield tab in the user menu

Staff get a shield tab in the user menu, next to the bell, with an unread-count badge.

The shield tab in the user menu

The moderator-notes panel

Opening the tab lists the moderator notes across topics — each entry shows the topic and the note, and links to the topic.

The moderator-notes panel

Header shield pip — unread count visible without opening the menu

A staff-only shield pip rendered in the page header, carrying the same unread count as the shield tab. Visible whenever the user menu is closed and mod_note_unread_count > 0. Clicking it opens the menu on the shield tab.

Header shield pip with an unread count

Browser tab title prefixed with (N)

document.title is prefixed with the unread count, mirroring the bell. The prefix is added by wrapping the global title setter so route transitions never drop it.

Browser tab title prefixed with the unread count

Header pip and title prefix cleared after the shield tab is opened

Opening the shield tab marks the feed as seen (POST /notes-feed/seen updates mod_notes_seen_at and publishes a reset on the dedicated MessageBus channel). The pip and the (N) prefix both disappear without a hard refresh.

Header pip and title prefix cleared


First-post checklist

The checklist editor — empty

The config modal, opened from the First-post checklist link in the sidebar's Community section. With no items yet, it shows the "inactive" notice — nothing is shown to users until at least one item is added.

The checklist editor, empty

The checklist editor — filled in

A moderator has added two checklist items (each with optional link), chosen the trust-level audience, and set custom accept-button text.

The checklist editor, filled in

The checklist editor — saved

After Save checklist, the green "Saved" confirmation appears and the items round-trip back into the editor.

The checklist editor, saved

The checklist modal — a new user's first post

A trust-level-0 user who tries to post for the first time is shown the checklist modal before the post goes through. The accept button is disabled until every box is ticked.

The checklist modal for a new user

The checklist modal — all boxes ticked

Once the user ticks every item, the accept button (with its staff-set label) becomes enabled.

The checklist modal with all boxes ticked

The reply posts after accepting

After the user accepts the checklist, their reply is posted to the topic as normal.

The reply posted after accepting the checklist

The second post is not gated

The same user's next post goes straight through — the checklist is shown only until it is accepted once.

The user's second post is not prompted

The checklist applies across the trust-level cap

With the audience set to "Up to members (TL0 to TL2)", a trust-level-1 user is also shown the checklist.

A TL1 user sees the checklist

The checklist version is bumped on edit

Each save bumps the checklist version, shown in the editor.

The checklist version bumped

A user is re-prompted after a version bump

A user who already accepted an older version is shown the checklist again after staff publish a new version.

A user re-prompted after a version bump

The acceptance audit log

The editor lists every acceptance — the user, the version they accepted, and when — with a count and a current-version filter.

The acceptance audit log

Moderator whisper

The whisper button in the composer

A staff member's reply composer shows the whisper (eye) toolbar button.

The whisper button in the composer

The whisper target modal — empty

Clicking the whisper button opens a modal to pick which user(s) the whisper goes to.

The whisper target modal, empty

The whisper target modal — users selected

The moderator has chosen the recipients of the whisper.

The whisper target modal with users selected

The armed-whisper pill

With a whisper armed, the composer shows a pill naming the recipients and tints to signal the reply will be a whisper.

The armed-whisper pill

A staff whisper posted, with its banner

The posted whisper renders with a full-width banner listing who it was whispered to.

A staff whisper posted with its banner

A recipient sees the whisper

A targeted user sees the whisper post and its banner in the topic.

A recipient sees the whisper

A non-recipient does not see the whisper

A user who is not in the whisper's audience never sees the post.

A non-recipient does not see the whisper

Staff oversight

Any staff member — not just the author or targets — can see every whisper in the topic.

Staff oversight of whispers

A whispered-to user can whisper back

Once staff have whispered to a user, that user's reply composer auto-arms a staff-only whisper-back.

A participant's whisper-back armed

The whisper-back banner

A user's whisper-back posts with a banner showing it is addressed to staff.

The whisper-back banner

A non-participant cannot whisper

A non-staff user who has never been whispered to cannot start a whisper.

A non-participant cannot whisper

The site setting

The mod_whisper_enabled site setting, on by default.

The whisper site setting

With the plugin disabled

When the feature is off, a former whisper is visible to everyone like a normal post.

A whisper with the plugin disabled

Permissions

A regular user sees no moderator controls

A non-staff member has no topic admin menu and no Moderator Actions button — the moderator features are staff-only.

A regular user sees no moderator controls


Moderator category management

The categories list as a moderator

The main /categories page as a moderator — the plugin's master switch lets staff see and curate every category.

Moderator-view categories list

The categories page chrome

The categories page header as a moderator sees it, with the standard navigation.

Categories page chrome for a moderator

The category Settings tab

The category Settings tab — the home of the per-category new-topic prompt field.

Category Settings tab

The category General tab

The category General tab as a moderator.

Category General tab

The category Security tab

The category Security tab as a moderator.

Category Security tab

A category's topic list

The topic list inside a category with several topics.

Category topic list

Category badge in a topic header

A topic header showing the category badge it belongs to.

Category badge in topic header


Per-topic footer message — extra states

A multi-paragraph markdown footer message

A footer message with multiple paragraphs and a markdown link, cooked as Markdown.

Multi-paragraph markdown footer

A footer with a markdown link

A footer message that includes an inline markdown link to external guidelines.

Footer with a markdown link

The official-notice box with the shield icon

The footer rendered as Discourse's official-notice box, with the shield icon and "Moderator message" label.

Footer official-notice box

Footer on a thread with multiple posts

The footer message still pinned to the bottom of a topic with many replies.

Footer on multi-post thread

The modal with only the footer field set

The Moderator Actions modal with only the footer message field filled in.

Modal with only the footer field set

The modal with only the reply prompt field set

The Moderator Actions modal with only the reply-prompt field filled in.

Modal with only the reply prompt set

Footer on a closed topic with a banner

The footer message still rendered on a closed topic, alongside Discourse's "closed" banner.

Footer on closed topic with banner


Per-topic reply prompt — extra states

Reply-prompt audience capped at TL0

The Moderator Actions modal with the reply-prompt audience combo-box set to "Up to new (TL0)".

Reply prompt audience capped at TL0

Reply-prompt audience capped at TL2

The Moderator Actions modal with the reply-prompt audience combo-box set to "Up to members (TL0-TL2)".

Reply prompt audience capped at TL2

A multi-line reply prompt entered

The modal with a multi-line reply prompt — bullet-style guidance plus a URL.

Modal multi-line reply prompt

The reply prompt persisted on reopen

Re-opening the modal shows the previously-saved reply prompt prefilled.

Modal reopened with reply prompt persisted

Clickable link inside the reply prompt dialog

The user-facing reply confirmation dialog with a clickable URL inside its body.

Reply prompt clickable link

A TL4 user skips a TL1-capped reply prompt

A TL4 leader replying to a topic whose reply prompt is capped at TL1 — no dialog appears, the reply posts directly.

Reply prompt skipped above cap


Per-category new-topic prompt — extra states

Live preview with bold and a link

The category Settings live preview rendering a markdown bold plus a linkified URL.

Category prompt preview — bold + link

Live preview with multi-line input

The live preview honouring line breaks in the input.

Category prompt preview — multi-line

Audience dropdown set to TL1

The new-topic prompt audience combo-box set to "Up to basic (TL0-TL1)".

Category prompt audience TL1

Audience dropdown set to TL0

The new-topic prompt audience combo-box set to "Up to new (TL0)".

Category prompt audience TL0

Persisted prompt on revisit

Re-opening the category Settings tab shows the previously-saved prompt and its cap.

Category prompt persisted state

Empty preview

The live preview area when the prompt field is cleared.

Category prompt empty preview


Pin a post to the bottom — extra states

Bottom-pinned post as a regular user sees it

A topic with both a footer message and a bottom-pinned post, viewed by a regular user.

Pinned post — regular user

In-stream pin badge close-up

The pin badge added to the original post in the post stream.

Pinned post in-stream badge

Jump-to-original on the bottom copy

The bottom-pinned copy includes a jump-to-original anchor link.

Pinned post — jump to original

Pinned post alongside a private note

A topic showing both a bottom-pinned post and a staff-only private note.

Pinned post with private note

Post admin menu while a post is already pinned

The post admin menu showing the Pin to Bottom option for a post that is already pinned.

Post admin menu while pinned

Pinned post and footer together, regular user

A regular user's view of a topic that has both a bottom-pinned post and a footer message.

Pinned and footer — user view


Per-topic reply approval — extra states

Approval checkbox unchecked by default

The Moderator Actions modal opened on a fresh topic — the approval checkbox is unchecked.

Approval checkbox unchecked

Approval checkbox ticked

The Moderator Actions modal with the approval checkbox just ticked.

Approval checkbox ticked

Approval checkbox toggled back off

The same modal after toggling the checkbox off again.

Approval checkbox toggled back off

Approval state persisted across reopen

Re-opening the modal on a topic that already requires approval — the checkbox is pre-ticked.

Approval checkbox persisted

Approval with messages filled in

The modal with the approval checkbox ticked plus the footer/reply-prompt fields filled in.

Approval with messages filled

Topic view as a regular user — no approval UI

A regular user viewing a topic that requires reply approval — no extra UI is surfaced to them.

Approval — user view


Private moderator note — extra states

Note positioned at the top

A private moderator note configured to render at the top of the topic.

Private note — position top

Note positioned at the bottom

A private moderator note configured to render at the bottom of the topic.

Private note — position bottom

Note thread with three staff replies

A private note plus a three-message staff-only reply thread.

Private note — three replies

Edit and delete affordances on a reply

A note reply showing its inline edit and delete buttons.

Private note — edit/delete affordances

Drafting a reply in the reply composer

The note's reply composer open with text being drafted.

Private note reply composer drafting

Regular user — no private-note DOM node

A regular user viewing a topic that has a private note — no DOM node for the note exists.

Private note hidden from user — no node

Anonymous visitor — no private note

An anonymous visitor viewing the same topic — the private note is absent.

Private note — anonymous view


Moderator-notes user-menu tab — extra states

Shield tab with an unread badge

The user menu shield tab showing an unread badge for newly-arrived moderator notes.

Shield tab with unread badge

Notes panel listing multiple entries

The moderator-notes panel listing several notes from across the forum.

Notes panel — multiple entries

Notes panel with a single entry

The notes panel scrolled to a single-entry state.

Notes panel — single entry

Notes panel after the seen marker is recorded

The notes panel as it looks after mod_notes_seen_at has been recorded.

Notes panel — after seen

Empty-state notes panel

The notes panel when there are no moderator notes anywhere on the forum.

Notes panel — empty state

Notes panel — clicking a note navigates

Clicking a note entry lands the staff member on its topic.

Notes panel link navigated


First-post checklist — extra states

Inactive notice in the editor

The checklist editor's inactive notice when no items have been configured yet.

Checklist editor inactive notice

Checklist editor with a custom button label

The editor populated with a checklist whose accept-button label has been overridden.

Checklist editor — custom button label

Checklist editor audience set to TL1

The editor with the audience combo-box set to "Up to basic (TL0-TL1)".

Checklist editor — audience TL1

"Last updated" line on the user-facing modal

The user-facing checklist modal showing its "Last updated" line.

Checklist user modal — last updated

Custom button label on the user-facing modal

The user-facing checklist modal with the staff-set custom accept-button label.

Checklist user modal — custom button

Audit log with many entries

The acceptance audit log populated with five entries across multiple versions and users.

Checklist audit log — many entries

Targeted checklist listed in the editor

The editor showing a targeted checklist alongside the global one.

Targeted checklist listed

TL2 user prompted under a TL0-TL2 cap

A TL2 user prompted with the checklist because the audience cap is TL2.

Checklist — TL2 user prompted


Moderator whisper — extra states

Whisper banner with one target

A staff whisper post with a single targeted user in its banner.

Whisper banner — one target

Whisper banner with three targets

A staff whisper post with three targeted users listed in its banner.

Whisper banner — three targets

Staff-only whisper banner

A staff-only whisper post (no user targets) — banner indicates the whisper is to staff.

Whisper banner — staff only

Group-targeted whisper banner

A whisper targeted at a group, with the group name shown in the banner.

Whisper banner — group target

Armed-whisper pill with a single user

The composer's armed-whisper pill showing a single chosen recipient.

Armed whisper pill — single user

Add-participant modal with a chosen user

The whisper add-participant modal with a user picked, ready to confirm.

Add-participant modal — user chosen

Non-participant topic view

A non-participant user viewing the topic — the whisper post is absent.

Whisper — non-participant view

Recipient topic view

A whisper recipient's view of the topic — the banner is visible.

Whisper — recipient view