Skip to content

feat: show toast when scanning starts#51

Open
fmartingr wants to merge 21 commits intomasterfrom
feat/toasts
Open

feat: show toast when scanning starts#51
fmartingr wants to merge 21 commits intomasterfrom
feat/toasts

Conversation

@fmartingr
Copy link
Copy Markdown

@fmartingr fmartingr commented Nov 3, 2025

  • Updated all dependencies
  • Adds support for SendToastToUser when the scanning starts and finishes.
Screen.Recording.2026-02-04.at.14.29.49.mov

@fmartingr fmartingr changed the title Feat/toasts feat: show toast when scanning starts Nov 3, 2025
@fmartingr fmartingr marked this pull request as ready for review December 1, 2025 09:19
@fmartingr fmartingr requested a review from Copilot December 1, 2025 09:19
Copy link
Copy Markdown

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

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.

Comment thread build/pluginctl/logs_test.go Outdated
Comment thread build/pluginctl/logs_test.go Outdated
Comment thread build/pluginctl/logs_test.go Outdated
Comment thread build/pluginctl/logs_test.go Outdated
Comment thread build/pluginctl/logs.go Outdated
- 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
@fmartingr fmartingr requested a review from Copilot February 4, 2026 13:31
Copy link
Copy Markdown

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

Comment thread server/manifest.go Outdated
Comment thread build/pluginctl/logs_test.go Outdated
Comment thread server/plugin.go Outdated
@fmartingr fmartingr requested a review from hanzei February 16, 2026 16:33
@hanzei hanzei added the 2: Dev Review Requires review by a core committer label Feb 17, 2026
Copy link
Copy Markdown
Contributor

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

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?

Comment thread .github/workflows/cd.yml Outdated
Comment on lines +11 to +12
with:
golang-version: 1.24.6
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 longer needed, right?

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +13 to +14
with:
golang-version: ""
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.

same

Comment thread .vscode/settings.json
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.

Unrelated file?

Comment thread go.mod
Comment thread server/configuration.go Outdated
}

// // ConfigurationWillBeSaved is invoked before saving the configuration to the backing store.
// func (p *Plugin) ConfigurationWillBeSaved(newCfg *model.Config) (*model.Config, error) {
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.

Do we need that code any longer?

Comment thread plugin.json
Comment thread server/session_track.go
p.sessionToConnMu = sync.RWMutex{}
}

func (p *Plugin) WebSocketMessageHasBeenPosted(webConnID, userID string, req *model.WebSocketRequest) {
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.

That will trigger a lot. Is there another way we can figure out to which device we need to sent the toast?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

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.

I wonder if we should add connectionID to plugin.Context in Mattermost. That would make it much easier for plugin devs.

@fmartingr fmartingr requested a review from hanzei February 20, 2026 11:51
Copy link
Copy Markdown
Contributor

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

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

Labels

2: Dev Review Requires review by a core committer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants