Expressions in list columns in words; one menu item highlighted per page #53

Merged
jcoffey-dev merged 1 commits from fix/alerts-column-and-nav-highlight into main 2026-09-29 01:06:13 +00:00
Owner

Two small bugs left over from the settings reorganization.

The Alerts list's condition column showed "-". A list cell had no way to show an x:Expression. Now:

  • an alert made from a template reads as the template's sentence (More than 500 messages are waiting to be delivered);
  • other expressions are in words when the schema's hints cover every part (Relaxed when port on this server is 25; otherwise off);
  • anything else shows as written, in code style, with a rule count when there are rules.

This applies to every list with an expression column, not only Alerts. The new helper is components/expression/cell.ts.

Two menu items were highlighted at once. On Monitoring › Prometheus, General was highlighted too. pathMatchesView treated /Settings/x:Metrics/CollectorPrometheus as a record of x:Metrics, because a view's name can extend another's. It now matches the longer path only when the next segment isn't a view of its own, so /x:Domain/<id> and /x:Domain/new still highlight Domains.

Checked:

  • New unit tests for the cell text, the alert wording, and the path match. 509 tests pass in total.
  • Typecheck and lint are clean.
  • In Chrome against a local server, the Alerts list showed both template alerts in words, and the Monitoring menu on the Prometheus page highlighted only Prometheus.

English only: no strings go through t(). The generated wording is English, like the Alerts summary above it.

Two small bugs left over from the settings reorganization. **The Alerts list's condition column showed "-".** A list cell had no way to show an `x:Expression`. Now: - an alert made from a template reads as the template's sentence (*More than 500 messages are waiting to be delivered*); - other expressions are in words when the schema's hints cover every part (*Relaxed when port on this server is 25; otherwise off*); - anything else shows as written, in code style, with a rule count when there are rules. This applies to every list with an expression column, not only Alerts. The new helper is `components/expression/cell.ts`. **Two menu items were highlighted at once.** On Monitoring › Prometheus, *General* was highlighted too. `pathMatchesView` treated `/Settings/x:Metrics/CollectorPrometheus` as a record of `x:Metrics`, because a view's name can extend another's. It now matches the longer path only when the next segment isn't a view of its own, so `/x:Domain/<id>` and `/x:Domain/new` still highlight Domains. **Checked:** - New unit tests for the cell text, the alert wording, and the path match. 509 tests pass in total. - Typecheck and lint are clean. - In Chrome against a local server, the Alerts list showed both template alerts in words, and the Monitoring menu on the Prometheus page highlighted only Prometheus. English only: no strings go through `t()`. The generated wording is English, like the Alerts summary above it.
jcoffey-dev added 1 commit 2026-09-28 23:54:48 +00:00
Expressions in list columns in words; one menu item highlighted per page
ci / build (pull_request) Successful in 1m44s
ci / publish (pull_request) Skipped
262538aa23
jcoffey-dev merged commit 7770aad4cc into main 2026-09-29 01:06:13 +00:00
jcoffey-dev deleted branch fix/alerts-column-and-nav-highlight 2026-09-29 01:06:13 +00:00
Sign in to join this conversation.