Add inline action button sample with mm_blocks_actions#211
Conversation
📝 WalkthroughWalkthroughThis pull request adds an inline action feature to the Mattermost demo plugin. Users can invoke ChangesInline Action Workflow
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 `@server/http_hooks.go`:
- Around line 517-525: The intro always prefixes assignee with '@', producing
"`@unassigned`"; change to build a display value that only prepends '@' for real
assignees. Create a local assigneeDisplay (or similar) based on assignee (e.g.,
if assignee == "unassigned" or empty then assigneeDisplay = "unassigned" else
assigneeDisplay = "@"+assignee) and use that in the fmt.Sprintf that builds
intro (referencing assignee, assigneeDisplay, and the existing fmt.Sprintf call
that builds intro using issueID, project, title, priority).
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e4cd24d6-f7ce-4326-be60-a3c0f70bf03a
📒 Files selected for processing (2)
server/command_hooks.goserver/http_hooks.go
Per coderabbit review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary
/inline_actionslash command that posts a markdown issue-tracker table whosemmaction://triage?...links open a per-row triage dialog.mm_blocks_actionspost prop (with requiredtype: "external") and per-click parameters carried in the link query string (id,title,priority,assignee) merged into the upstream URL byMergeQueryIntoURL. Static fields (project) still come throughrequest.Context./inline_action/triageHTTP handler that opens a follow-up dialog populated from those query params and the static context.Ticket Link
Fixes https://mattermost.atlassian.net/browse/MM-68387
Test plan
/inline_actionposts the 5-row issue table.id/title/priority/assigneeplus the staticproject=Demo Project.Requires mattermost/mattermost#36219 to test.