Skip to content

Added a setting for the new Masqurade feature into the role menu - #671

Open
Spyro24 wants to merge 2 commits into
Nerimity:mainfrom
Spyro24:main
Open

Added a setting for the new Masqurade feature into the role menu#671
Spyro24 wants to merge 2 commits into
Nerimity:mainfrom
Spyro24:main

Conversation

@Spyro24

@Spyro24 Spyro24 commented Jul 7, 2026

Copy link
Copy Markdown

Pull Request Template

What does this PR do?

  • It adds the option for the Masquerade permision to the role permisions settings

Screenshots

grafik

Did you test your code?

I tested it (and it worked fine)

Additional context

Checklist

  • Changes are clear, concise, and easy to review
  • Code has been tested and works as intended
  • Text/content changes support internationalization (i18n)
  • Any new user-facing strings are properly localized

Summary by CodeRabbit

  • New Features
    • Added a new “Masquerade” permission option (dedicated access level) to allow per-message name and avatar changes.
  • UI Updates
    • Message details now show an additional “masq” badge for non-webhook messages that include a creator override, making masqueraded messages easier to spot.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds the MASQUERADE permission, exposes an optional creator override identifier on raw messages, and renders a masq badge for non-webhook messages with a creator override.

Changes

Masquerade message support

Layer / File(s) Summary
Add MASQUERADE permission
src/chat-api/Bitwise.ts
Adds the MASQUERADE permission with bitmask 512, name, and description.
Expose and render creator overrides
src/chat-api/RawData.ts, src/components/message-pane/message-item/MessageItem.tsx
Adds the optional creatorOverrideId field to RawMessage and displays masq for applicable messages.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change by calling out the new Masquerade role permission setting.
Description check ✅ Passed The description follows the template with what it does, screenshots, testing, context, and checklist items filled in.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
src/chat-api/Bitwise.ts (1)

400-400: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Commented-out icon field.

Leaving a commented-out field with an explanatory note is fine as a stopgap, but consider tracking it as a follow-up (e.g., TODO) rather than a permanent comment, or simply omitting the line entirely since icon is optional per the Bitwise interface.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/chat-api/Bitwise.ts` at line 400, Remove the commented-out icon field in
Bitwise and either omit it entirely since icon is optional in the Bitwise
interface, or replace the note with a proper TODO if you want to track it as
follow-up. Use the Bitwise definition and the surrounding object setup in
Bitwise.ts to locate the spot and keep the implementation clean without a
permanent commented-out property.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/chat-api/Bitwise.ts`:
- Line 400: Remove the commented-out icon field in Bitwise and either omit it
entirely since icon is optional in the Bitwise interface, or replace the note
with a proper TODO if you want to track it as follow-up. Use the Bitwise
definition and the surrounding object setup in Bitwise.ts to locate the spot and
keep the implementation clean without a permanent commented-out property.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3a5b01c8-2d34-4b2d-9425-89b1f60ecd7e

📥 Commits

Reviewing files that changed from the base of the PR and between 8753e44 and b3652a4.

📒 Files selected for processing (1)
  • src/chat-api/Bitwise.ts

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/message-pane/message-item/MessageItem.tsx`:
- Around line 339-341: Update the ownerBadge content in MessageItem to use the
component’s existing i18n translation function with the appropriate
message.badge translation key instead of the hardcoded “masq” text, matching the
localization pattern used by the owner, bot, and webhook badges.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 31c27144-e22d-44eb-943a-6098900070c3

📥 Commits

Reviewing files that changed from the base of the PR and between b3652a4 and 825b66b.

📒 Files selected for processing (2)
  • src/chat-api/RawData.ts
  • src/components/message-pane/message-item/MessageItem.tsx

Comment on lines +339 to +341
<Show when={!props.message.webhookId && props.message.creatorOverrideId}>
<div class={styles.ownerBadge}>masq</div>
</Show>

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the i18n translation function for the masq badge text.

All other badges in this component (owner, bot, webhook) use t("message.badge.*") for localization. The hardcoded "masq" string breaks this pattern and won't be translatable.

🌐 Proposed fix to use i18n
       <Show when={!props.message.webhookId && props.message.creatorOverrideId}>
-        <div class={styles.ownerBadge}>masq</div>
+        <div class={styles.ownerBadge}>{t("message.badge.masq")}</div>
       </Show>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Show when={!props.message.webhookId && props.message.creatorOverrideId}>
<div class={styles.ownerBadge}>masq</div>
</Show>
<Show when={!props.message.webhookId && props.message.creatorOverrideId}>
<div class={styles.ownerBadge}>{t("message.badge.masq")}</div>
</Show>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/message-pane/message-item/MessageItem.tsx` around lines 339 -
341, Update the ownerBadge content in MessageItem to use the component’s
existing i18n translation function with the appropriate message.badge
translation key instead of the hardcoded “masq” text, matching the localization
pattern used by the owner, bot, and webhook badges.

@Spyro24

Spyro24 commented Jul 11, 2026

Copy link
Copy Markdown
Author

Added a litle tag to mark messages that uses the masq feature
grafik

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant