prefill the Windmill version in the AI Sessions feedback issue (#12508)

The "Give feedback" link in Assistant settings opened a new GitHub issue with only a title, so the reporter had to look up the version by hand. The link now also fills the issue body with the backend version (for example "CE v1.876.1"), fetched when the modal first opens.

Fixes #10582
This commit is contained in:
Raunak Burrows
2026-11-18 17:54:45 +01:00
committed by GitHub
parent 0c8db19b51
commit cebd05ce9d
@@ -35,6 +35,7 @@ callers that already know which section they mean, such as the "+" menu's Manage
import Modal2 from '$lib/components/common/modal/Modal2.svelte'
import SidebarNavigation from '$lib/components/common/sidebar/SidebarNavigation.svelte'
import { logFeatureUsage } from '$lib/utils/featureUsage'
import { SettingsService } from '$lib/gen'
import { getAiChatManager } from './aiChatManagerContext'
import { summarizeTools } from './agentContext'
import AssistantToolsSection from './AssistantToolsSection.svelte'
@@ -52,6 +53,13 @@ callers that already know which section they mean, such as the "+" menu's Manage
const FEEDBACK_ISSUE_URL =
'https://github.com/windmill-labs/windmill/issues/new?title=' +
encodeURIComponent('AI Sessions feedback: ')
// Fetched on first open; until it answers, the link opens without a body.
let version: string | undefined = $state()
let feedbackIssueUrl = $derived(
version
? FEEDBACK_ISSUE_URL + '&body=' + encodeURIComponent(`Windmill version: ${version}\n\n`)
: FEEDBACK_ISSUE_URL
)
const operatingWorkspace = useOperatingWorkspace()
@@ -158,6 +166,11 @@ callers that already know which section they mean, such as the "+" menu's Manage
focusRoot = undefined
section = target
isOpen = true
if (!version) {
SettingsService.backendVersion()
.then((v) => (version = v))
.catch(() => {})
}
refresh()
record('open')
record(target)
@@ -246,7 +259,7 @@ callers that already know which section they mean, such as the "+" menu's Manage
unifiedSize="sm"
endIcon={{ icon: ExternalLink }}
btnClasses="!justify-start !w-full"
href={FEEDBACK_ISSUE_URL}
href={feedbackIssueUrl}
target="_blank"
>
Give feedback