Skip to content

feat(bot): add icons for the types of case of the list - #424

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
feat/case-type-icons
Nov 27, 2026
Merged

kodiakhq[bot] merged 1 commit into
mainfrom
feat/case-type-icons

Conversation

@RedStar071

@RedStar071 RedStar071 commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

None.

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

In the select menu of /case list, and wherever a case is shown, the restricted types, the nickname change and the role changes all showed the shield of the moderators. A moderator could not tell an attachment restriction from an embed restriction.

Each of these types now has an icon of its own, so the menu reads at a glance:

Type Emoji Glyph
Attachment restriction restricted_attachment Paperclip of AutoMod Attachments, mirrored, slashed
Embed restriction restricted_embed Chain of the Discord Link, mirrored, slashed
Emoji restriction restricted_emoji Discord Emojis glyph, slashed
Reaction restriction restricted_reaction Heart, slashed
Voice restriction restricted_voice Discord voice speaker, slashed
Set nickname set_nickname Pencil of Discord edit profile
Role add, role remove role_add, role_remove Flag of Discord create role and remove role, in one colour

The slashed icons are cut the way Discord cuts a slashed icon: a band is removed around a 33 wide slash with round caps. The paperclip and the chain are mirrored so the slash crosses them instead of running along them. The icons are cells of the Emoji grid of Icons (Brand WolfStar), and projects/bot/assets/emojis/ui/sources.json names each cell.

Voice kick and voice mute keep the icons of a kick and of a mute.

CaseTypeEmojis is now a Record of every TypeVariation, and the fallback to the shield is gone. A new type of case does not compile until it has an emoji. EmojiDefinitions has the eight names, each with a Unicode fallback for an application that lacks the emoji.

The eight PNGs are already uploaded to the staging, beta and production applications. The bot resolves their IDs by name at start, so no application needs a change before this is deployed.

🤖 AI disclosure: Wolfstar Agent Kit modified this description. AI open source policy.


Read this PR faster

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Reviews (1) · Last reviewed commit: "feat(bot): add icons for the types of ca..." · Reviewed by Greptile

The restricted types, the nickname and the roles showed the shield of the moderators.
Each now has an icon of its own, cut from the Discord assets as Discord cuts them.
The map of the emojis is a Record, so a new type of case cannot go without one.
@coldtea-pr-lens

coldtea-pr-lens Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Architecture

Walkthrough of Add dedicated emojis for all moderation case types, in three steps

Read this PR faster


Data flow

No data-flow sequence changed in this PR.


Tip

Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture… row. Drawing still runs as before

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • After a push, tick Redraw to draw the latest commit
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion
  • Set github.description: false in .github/pr-lens.yml to stop PR Lens adding buttons to your PR descriptions

Thanks for using PR Lens! It's free for OSS. If it helped, a star helps other teams find it.  Star PR Lens on GitHub

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Approach: sound. Each case type gets its own application emoji, and a Record<TypeVariation, EmojiKey> makes the compiler enforce that a new type has one, which is better than the silent shield fallback.

Reviewed changes — the single commit, in full: the TS changes, the test and sources.json. The PNG and SVG assets are generated and I did not inspect them.

  • CaseTypeEmojis is exhaustive (wording.ts): it is now Record<TypeVariation, EmojiKey> with all 17 members mapped, and getCaseTypeEmojiKey no longer falls back to 'Moderator'. The three callers (list.ts, view.ts, ModerationCommand.ts) still receive an EmojiKey.
  • Eight new EmojiDefinitions (emojis.ts): the names match the uploaded asset files, each with a Unicode fallback for an application that lacks the emoji.
  • Assets and sources (assets/emojis/ui/): the PNG/SVG pairs and their sources.json entries, and the AGENTS.md Emojis bullet is updated to match.
  • Test (case-menu.test.ts): every type option in the filter select has an emoji, none is the shield, and only VoiceKick and VoiceMute share an icon (emojis.length - 2 unique names).

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@github-project-automation github-project-automation Bot moved this from Todo to Review Approved in Wolfstar Nov 27, 2026
@kodiakhq
kodiakhq Bot merged commit 874ac33 into main Nov 27, 2026
22 of 25 checks passed
@kodiakhq
kodiakhq Bot deleted the feat/case-type-icons branch November 27, 2026 18:18
@github-project-automation github-project-automation Bot moved this from Review Approved to Done in Wolfstar Nov 27, 2026
@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.05%. Comparing base (8a0e422) to head (91c10bb).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #424   +/-   ##
=======================================
  Coverage   63.05%   63.05%           
=======================================
  Files         288      288           
  Lines       10295    10295           
  Branches     2470     2469    -1     
=======================================
  Hits         6492     6492           
  Misses       3365     3365           
  Partials      438      438           
Flag Coverage Δ
unit 63.05% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant