Skip to content

queryWatchFromPatch drops condition.value and windowSec from agent query alert patches #5065

Open

Description

@shafiktanbir

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
ss

Activity

  1. MilindChatrabhuji commented on Oct 26, 2026

    @MilindChatrabhuji

    Opened PR #5079 with the fix forwarding condition.value and windowSec in queryWatchFromPatch, updating useQueryAlertDraft, and adding unit test coverage.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions