mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 08:01:25 +00:00
0508cddf0a
* feat(sessions): ship AI sessions as beta with legacy-chat opt-out The wm_dev_global_ai dev flag becomes a beta opt-out: sessions are on by default and gate.ts reads wm_sessions_beta_optout instead (same isGlobalAiEnabled() name, all call sites unchanged). A slim Alert-info banner under the session chat lets users switch back to the legacy docked chat (plus a GitHub feedback shortcut), a mirror banner in the legacy chat reactivates sessions, and /sessions visited while opted out offers reactivation instead of dev-flag instructions. Both toggle directions are recorded on the existing ai_chat_usage telemetry channel (mode sessions_beta_optout/optin) before the page reload. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(sessions): keep dev-only routes off the beta gate /global_drafts and /dev/session-tree were gated on the sessions gate to hide dev tooling; the beta inversion would have shipped them enabled by default. Gate them on dev builds (import.meta.env.DEV) instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(sessions): exempt operators from the sessions beta The operator sidebar has no Workspace/Sessions switch, so gating the docked chat on the beta left its Ask AI button toggling an unmounted pane. Operators keep the legacy chat (without the beta banner, whose Activate would strand them on /sessions). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(sessions): navigate even when the opt-out write fails A throwing localStorage (quota, private browsing) made the banner buttons silent no-ops. Navigate regardless — the reload showing the unchanged mode is the honest feedback — and skip the toggle telemetry since no toggle actually persisted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(sessions): migrate toggle telemetry to feature_usage; gate /sessions for operators Main replaced the log_chat endpoint with the allow-listed log_feature_usage channel, so the toggle events move to logFeatureUsage('ai_session', 'beta_optout'/'beta_optin') — the buffer's pagehide flush + keepalive fetch carry the request across the hard reload, so the await/cap plumbing goes away. The two kinds are added to the backend allow-list. Operators reaching /sessions by direct URL now get a "not available for operators" screen instead of bypassing the layout-level exemption. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(sessions): open legacy pane on opt-out; banner matches composer column Review nits + polish: opting out now persists ai-chat-open so a fresh profile lands in a visible legacy chat (with its reactivation banner) instead of a bare workspace page; the operator /sessions screen's button now actually opens the Ask AI pane (operators have no sidebar toggle); the beta banner is a rounded inset bar sharing the hosting chat's composer column width. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>