Skip to content

Support selecting explicit event fields in category regex rules #823

Description

@TimeToBuildBob

Problem

The category editor currently lets users create regex rules, but it does not let them say which event field the regex should apply to.

On the Python stack, the query engine already supports this via select_keys. Exposing that in the web UI would allow narrower rules such as:

{"type": "regex", "regex": "Firefox", "select_keys": ["app"]}

instead of always matching across every string field.

This is useful even without editor-bucket work, because it helps distinguish canonical event fields like app vs title and is closely related to #678.

Scope

  • Extend the category rule shape in the web UI to support optional select_keys
  • Expose a field selector in the category editor for canonical category event fields
  • Make local helpers/tests respect select_keys as well (src/util/classes.ts, related tests)

Important Dependency

This should not be treated as a webui-only feature. aw-server-rust currently ignores select_keys and still matches all string fields, so Rust parity is needed for consistent behavior:

Out Of Scope

This does not solve matching by editor project/workspace, because editor bucket data does not currently flow into canonicalEvents(...).

That larger cross-repo design is tracked separately here:

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions