Skip to content

feature: ISSUE-282 — ping manufacturing role in forum thread when order is submitted#320

Merged
GitAddRemote merged 2 commits intomainfrom
feature/ISSUE-282
Apr 5, 2026
Merged

feature: ISSUE-282 — ping manufacturing role in forum thread when order is submitted#320
GitAddRemote merged 2 commits intomainfrom
feature/ISSUE-282

Conversation

@GitAddRemote
Copy link
Copy Markdown
Collaborator

Summary

  • After a new order forum thread is created, sends a follow-up message into the thread mentioning MANUFACTURING_ROLE_ID
  • Ping is skipped when manufacturingRoleId is empty (defensive guard in addition to the existing config validation)
  • thread.send failure is caught, logged at warn, and the success reply is still sent to the user
  • Widened thread type from { id: string } to ThreadChannel so .send() is type-safe

Test plan

  • thread.send called with correct content and allowedMentions on success
  • thread.send failure does not block the success editReply — warn is logged
  • No ping (and no error) when manufacturingRoleId is empty
  • All 541 tests pass (npm run quality)

Closes #282

Copilot AI review requested due to automatic review settings April 5, 2026 07:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a non-blocking follow-up message in newly created manufacturing order forum threads that mentions the configured manufacturing role, so staff are notified immediately when an order is submitted.

Changes:

  • Widen the created thread type to ThreadChannel so thread.send() is type-safe.
  • After thread creation, send a role mention message into the thread with allowedMentions.roles properly scoped, and treat failures as non-fatal (warn + continue).
  • Add tests for ping-on-success, ping failure being non-blocking, and skip behavior when manufacturingRoleId is empty.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/commands/order-submit.command.ts Sends a role ping message into the created order thread with guarded config + non-fatal error handling.
src/commands/tests/order-submit.command.test.ts Extends mocks and adds tests for ping success/failure/skip scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GitAddRemote GitAddRemote merged commit 91e4f05 into main Apr 5, 2026
3 checks passed
@GitAddRemote GitAddRemote deleted the feature/ISSUE-282 branch April 5, 2026 08:00
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.

feature: ping manufacturing role in forum channel when order is submitted

2 participants