Skip to content

Alert list class search - #3393

Merged
fakemonster merged 6 commits into
mainfrom
alert-list-class-search
Oct 19, 2026
Merged

fakemonster merged 6 commits into
mainfrom
alert-list-class-search

Conversation

@fakemonster

Copy link
Copy Markdown
Contributor

This is a little fraught: alert list class filtering requires an exact match to a known schema, so we need to do a lot of client-side validation. On the bright side, we now have a lot of client-side validation!

alert-class-filtering.mp4

@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
console Ready Ready Preview Oct 19, 2026 10:32pm UTC

Request Review

Comment thread app/pages/system/alerting/AlertsTab.tsx Resolved
@charliepark

Copy link
Copy Markdown
Contributor
Screenshot 2026-10-13 at 5 04 59 PM

Not a blocker, but it'd be cool if hitting enter — when there's a "Matches N alert classes" in play — submitted the form. As it is, I need to tab off of the input to submit it.

@charliepark

Copy link
Copy Markdown
Contributor

Small thing here, but I think we'll want to match the gap between the button and the empty container below it from the Receivers tab:
Screenshot 2026-10-13 at 5 14 23 PM
… note how the gap here is a bit wider? I think we want mb-2 instead of mb-4
Screenshot 2026-10-13 at 5 14 16 PM

@fakemonster

Copy link
Copy Markdown
Contributor Author

it'd be cool if hitting enter — when there's a "Matches N alert classes" in play — submitted the form.

you know, forms should do this by default! it turns out it doesn't work here because the Combobox component is swallowing up the event when it shouldn't. it's a bit of an adjustment to general behavior to "fix", so i think i'll do it as a separate PR

This is a little fraught: alert list class filtering requires an exact
match to a known schema, so we need to do a lot of client-side
validation. On the bright side, we now have a lot of client-side
validation!
@fakemonster
fakemonster force-pushed the alert-list-class-search branch from 7a843d0 to ed14fc7 Compare October 19, 2026 22:16
@fakemonster
fakemonster enabled auto-merge (squash) October 19, 2026 22:35
@fakemonster
fakemonster merged commit d84d710 into main Oct 19, 2026
9 checks passed
@fakemonster
fakemonster deleted the alert-list-class-search branch October 19, 2026 22:43
david-crespo added a commit that referenced this pull request Oct 30, 2026
…3422)

The diff is unreadable unless you [hide whitespace
changes](https://github.com/oxidecomputer/console/pull/3422/changes?w=1)
because it adds a wrapper to existing code.

This is an alternative to #3417 that deletes the sad logic inside
Combobox instead of fixing it. We get rid of `onEnter`, and instead of
having to keep track of whether the list is open with `isOpenRef` and
decide when to `preventDefault`, Combobox never calls `preventDefault`
(unless it's done for it by Headless UI when selecting an option).

But in subforms we still need to capture those enter keypresses before
they hit the parent form, so we wrap subforms in a `Subform` component
with an `onSubmit` prop. The advantage is we no longer have to remember
to do this for every field we add to a subform (and we have messed this
up before).

This approach fixes the same problem cases as #3417, all of which are
noops on `main`. Enter in a closed combobox now:

- Adds the protocol filter from the ICMP type combobox, like Enter in
the ICMP code field next to it
- Applies the alert class filter (#3393)
- Submits standalone forms from their pickers, like link silo, link
pool, attach disk, create snapshot, and instance create's boot disk and
image pickers

`Subform.browser.spec.tsx` tests Enter in a combobox, text input, and
button inside a subform, and in a combobox outside a subform. In the e2e
tests, Enter adds a firewall rule target, port and ICMP type, a webhook
secret, and a transit IP. Enter in a closed combobox applies the alert
class filter, attaches a disk, and creates an instance from the image
picker (these tests fail on main).
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Nov 20, 2026
oxidecomputer/console@00cc6bf...fe921de

* [fe921de7](oxidecomputer/console@fe921de7)
oxidecomputer/console#3447
* [0d501853](oxidecomputer/console@0d501853)
oxidecomputer/console#3440
* [f9f6fee6](oxidecomputer/console@f9f6fee6)
oxidecomputer/console#3445
* [84c2b7d9](oxidecomputer/console@84c2b7d9)
oxidecomputer/console#3446
* [ece52b51](oxidecomputer/console@ece52b51)
oxidecomputer/console#3411
* [a67b1684](oxidecomputer/console@a67b1684)
oxidecomputer/console#3444
* [e9c1e3c9](oxidecomputer/console@e9c1e3c9)
oxidecomputer/console#3443
* [efc2149c](oxidecomputer/console@efc2149c)
oxidecomputer/console#3442
* [3b76a1ef](oxidecomputer/console@3b76a1ef)
oxidecomputer/console#3441
* [47477f2d](oxidecomputer/console@47477f2d)
oxidecomputer/console#3439
* [e78bb08a](oxidecomputer/console@e78bb08a)
oxidecomputer/console#3437
* [129a4a55](oxidecomputer/console@129a4a55)
oxidecomputer/console#3436
* [bc4acfba](oxidecomputer/console@bc4acfba)
oxidecomputer/console#3419
* [595b391c](oxidecomputer/console@595b391c)
oxidecomputer/console#3431
* [3a0b5a94](oxidecomputer/console@3a0b5a94)
oxidecomputer/console#3421
* [7b9d2e38](oxidecomputer/console@7b9d2e38)
oxidecomputer/console#3430
* [94f1e9e0](oxidecomputer/console@94f1e9e0)
oxidecomputer/console#3422
* [d8b40dfa](oxidecomputer/console@d8b40dfa)
oxidecomputer/console#3428
* [12bb33ec](oxidecomputer/console@12bb33ec)
oxidecomputer/console#3426
* [615ac0f2](oxidecomputer/console@615ac0f2)
oxidecomputer/console#3425
* [294d7066](oxidecomputer/console@294d7066)
oxidecomputer/console#3420
* [31b93cbc](oxidecomputer/console@31b93cbc)
oxidecomputer/console#3418
* [d84d7104](oxidecomputer/console@d84d7104)
oxidecomputer/console#3393
* [7988361e](oxidecomputer/console@7988361e)
oxidecomputer/console#3412
* [bae3b7a6](oxidecomputer/console@bae3b7a6)
oxidecomputer/console#3400
* [b9503394](oxidecomputer/console@b9503394)
oxidecomputer/console#3409
* [5147e774](oxidecomputer/console@5147e774)
oxidecomputer/console#3408
* [16b3d164](oxidecomputer/console@16b3d164)
oxidecomputer/console#3407
* [a64d548d](oxidecomputer/console@a64d548d)
oxidecomputer/console#3406
* [df32a018](oxidecomputer/console@df32a018)
oxidecomputer/console#3405
* [1cd46185](oxidecomputer/console@1cd46185)
oxidecomputer/console#3403
* [f4684104](oxidecomputer/console@f4684104)
oxidecomputer/console#3402

This branch was successfully deployed

1 active deployment
Preview — a420da71 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants