queryWatchFromPatch drops condition.value and windowSec from agent query alert patches
hey! while checking out the query alert creation flow added in c5b123d, I noticed queryWatchFromPatch in apps/webapp/app/components/dashboard-agent/alert-creation/draftPatch.ts (lines 60-68) only forwards operator: patch.condition?.operator into QueryWatchPrefill and drops patch.condition?.value and patch.condition?.windowSec. Because useQueryAlertDraft (apps/webapp/app/components/alerts/useQueryAlertDraft.ts line 52) also initializes valueText to "", draft.valueValid starts out false even when prefill.operator is set (so selected: (done("threshold") || prefill.operator) && draft.valueValid in QueryAlertTranscript.tsx line 240 never pre-selects the threshold step).
is that intentional or should queryWatchFromPatch and useQueryAlertDraft also carry condition.value / windowSec when the agent prefills a query alert? happy to put up a quick PR if you want!
ss
Opened PR #5079 with the fix forwarding condition.value and windowSec in queryWatchFromPatch, updating useQueryAlertDraft, and adding unit test coverage.
Thank you for finding that, fixed!