Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the antivirus plugin's dependencies to modern Mattermost server APIs and adds user feedback through toast notifications when file scanning begins. The changes include comprehensive tooling updates for build, deployment, and development workflows.
Key changes:
- Migrated from deprecated v6 Mattermost server APIs to current public API package
- Added toast message notification to inform users when virus scanning starts
- Updated build tooling with enhanced manifest handling, deployment utilities, and development debugging support
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| server/plugin.go | Migrated API imports and added toast notification when scanning starts |
| server/manifest.go | Replaced static manifest with generated code from JSON template |
| server/main.go | Updated import path to current API package |
| server/configuration.go | Added reflection-based empty configuration check |
| plugin.json | Removed deprecated release_notes_url and executable fields |
| go.mod | Updated Go version and migrated to current dependencies |
| build/setup.mk | Added build variable injection and renamed deployment tool |
| build/pluginctl/main.go | New deployment tool replacing legacy deploy command |
| build/pluginctl/logs_test.go | Test coverage for new log filtering functionality |
| build/pluginctl/logs.go | New log fetching and filtering implementation |
| build/manifest/main.go | Enhanced manifest tool with version generation and distribution support |
| build/deploy/main.go | Removed legacy deployment tool |
| Makefile | Comprehensive updates for modern development workflow |
| .github/workflows/ci.yml | Updated to latest workflow version with Go 1.24.6 |
| .github/workflows/cd.yml | Updated to latest workflow version with Go 1.24.6 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Update golangci-lint to v2.8.0 with v2 config format - Update gotestsum to v1.13.0 - Update Node.js version to 20.11 - Add mock target to Makefile - Add .editorconfig and .vscode settings - Fix formatting and linting issues
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 23 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
hanzei
left a comment
There was a problem hiding this comment.
I'm concerned about the book keeping and the performance overhead of using WebSocketMessageHasBeenPosted and tracking the connection ids. Is there another approach we can follow?
| with: | ||
| golang-version: 1.24.6 |
| with: | ||
| golang-version: "" |
| } | ||
|
|
||
| // // ConfigurationWillBeSaved is invoked before saving the configuration to the backing store. | ||
| // func (p *Plugin) ConfigurationWillBeSaved(newCfg *model.Config) (*model.Config, error) { |
There was a problem hiding this comment.
Do we need that code any longer?
| p.sessionToConnMu = sync.RWMutex{} | ||
| } | ||
|
|
||
| func (p *Plugin) WebSocketMessageHasBeenPosted(webConnID, userID string, req *model.WebSocketRequest) { |
There was a problem hiding this comment.
That will trigger a lot. Is there another way we can figure out to which device we need to sent the toast?
There was a problem hiding this comment.
Haven't found a way to receive the connectionID from the backend, I have a branch around to send the connectionID on events as well, but haven't properly tested it.
There was a problem hiding this comment.
I wonder if we should add connectionID to plugin.Context in Mattermost. That would make it much easier for plugin devs.
SendToastToUserwhen the scanning starts and finishes.Screen.Recording.2026-02-04.at.14.29.49.mov