docs: v4.1.0 release notes and production deploy guide #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Documents all bug fixes and new features shipped in v4.1.0 (commits
79d5e82,2d493d5,3e93e40). This issue tracks what changed and ensures a developer deploying to a new server can reproduce the full setup.Bugs Fixed
1. RHS Panel blank after page refresh (Medium)
File: plugin/webapp/src/components/rhs_panel.tsx
Root cause: The useAllStatusUpdates() hook only read from window.__livestatus_updates, which is populated by WebSocket events. On page refresh, no WebSocket events had fired yet, so the panel started empty even with active sessions in the KV store.
Fix: Added a GET /api/v1/sessions fetch on component mount to hydrate the panel from the server before WebSocket takes over.
2. Plugin auth blocked browser requests (Medium)
File: plugin/server/api.go
Root cause: All plugin API endpoints required the shared secret (daemon Bearer token). Browser-side fetch() calls from the React webapp cannot include the shared secret (it would be exposed in the bundle). This meant the RHS panel initial fetch returned 401.
Fix: Added dual auth path. GET endpoints (read-only) now accept either the shared secret OR a valid Mattermost session (Mattermost-User-Id header, auto-injected by the MM server). Write endpoints (POST/PUT/DELETE) still require the shared secret.
3. Orphaned active sessions accumulate on daemon crash (Low)
Files: plugin/server/plugin.go, plugin/server/store.go
Root cause: If the daemon crashed mid-session, the KV store entry stayed active forever. OnDeactivate handled plugin restarts but not daemon crashes.
Fix: Added LastUpdateMs field to SessionData and a cleanup goroutine (every 5 min): sessions active >30 min with no update are marked interrupted; non-active sessions >1 hr are deleted.
4. KV store scanned all keys regardless of prefix (Low)
File: plugin/server/store.go
Root cause: ListActiveSessions iterated over all KV keys from all plugins and filtered by prefix after deserialization, making it O(n) across the whole KV store.
Fix: KVList prefix filter applied before deserialization. Only ls_session_* keys are read.
New Features
Floating Widget (registerRootComponent)
File: plugin/webapp/src/components/floating_widget.tsx
A floating PiP-style overlay that solves the core UX problem: the status box gets buried in long threads. The widget is always visible regardless of scroll position.
Production Deployment
See README.md for full instructions. Quick reference:
For servers with plugin uploads disabled, use the manual path documented in README.md under "Manual Deploy".
Commits
79d5e82: feat: RHS panel initial fetch, floating widget, session cleanup2d493d5: feat: add Mattermost session auth for browser requests3e93e40: docs: add v4.1.0 changelog, plugin deploy guide, and plugin Makefile