Conversation
🦋 Changeset detectedLatest commit: badd661 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🔴 Tier 4 — CriticalTouches auth, data models, config, tasks, OTel pipeline, ClickHouse, or CI/CD. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Review✅ Overall this is a clean, well-tested feature. No critical blockers found.
|
9b44f74 to
c0dd8c9
Compare
E2E Test Results✅ All tests passed • 133 passed • 3 skipped • 1069s
Tests ran across 4 shards in parallel. |
| return 'exceeds'; | ||
| case AlertThresholdType.BELOW: | ||
| case AlertThresholdType.BELOW_OR_EQUAL: | ||
| return 'falls below'; |
There was a problem hiding this comment.
This may be misleading if the value is equal to the threshold, right?
There was a problem hiding this comment.
Good callout. I was following the existing pattern, where >= used exceeds/falls below, but I have updated these to be more precise.
| for (const [k, v] of Object.entries(data)) { | ||
| if (meta.valueColumnNames.has(k)) { | ||
| value = isString(v) ? parseInt(v) : v; | ||
| value = isString(v) ? parseFloat(v) : v; |
There was a problem hiding this comment.
I think the parseFloat is the right behavior here, nice change.
However, it will potentially make existing alerts behave/trigger differently so it may be worth a bigger callout somewhere.
It also makes the equality case particularly interesting (e.g. 3.0 == 3.0000002). Do we give the user control over rounding etc....?
There was a problem hiding this comment.
I think the parseFloat is the right behavior here, nice change.
However, it will potentially make existing alerts behave/trigger differently so it may be worth a bigger callout somewhere.
Thanks for commenting on this. I did some more research, and it turns out parseInt was actually correct, since only integer columns are potentially returned as strings, so can be parsed as integers reliably for the formats and settings we use. I've reverted the change with a comment for the next person who finds this "bug."
It also makes the equality case particularly interesting (e.g. 3.0 == 3.0000002). Do we give the user control over rounding etc....?
Yeah this is a good question. I think maybe one way to do it is to support BETWEEN and NOT BETWEEN threshold types, which would give the user a straightforward way to specify their preferred range, while also being re-usable for other cases (like ranges >1). I can do that in a followup PR if that sounds like a reasonable solution.
I've also added a UI element to tell the user that floating point values are not rounded when compared for equality
Summary
This PR adds new types of alert thresholds: >, <=, =, and !=.
Screenshots or video
Screen.Recording.2026-04-15.at.10.20.08.AM.mov
How to test locally or on Vercel
This must be tested locally, since alerts are not supported in the preview environment.
To see the notification content, run an echo server locally and create a webhook that targets it (http://localhost:3000):
References