Skip to content

feat(admin): filter the process list by user, database and state - #622

Merged
EVWorth merged 1 commit into
mainfrom
feat/admin-process-filters
Sep 10, 2026
Merged

EVWorth merged 1 commit into
mainfrom
feat/admin-process-filters

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Closes #437. Stacked on #621.

FR-7.2.1 asks for "filterable by user, database, state". There was one free-text box matching every column at once, which can't express "sleeping connections belonging to app" — the question an admin actually has when the connection count is climbing.

Three dropdowns, each offering only values that are actually connected, so a filter never lists a user with no threads. They combine with AND, and with the free-text box, which stays because it answers a different question: finding one thread by a fragment of its query.

Matching is exact, not by prefix — a user called app must not select one called application, which is the sort of thing a substring filter gets wrong quietly.

ARCHITECTURE §3.6 was describing something that doesn't exist

The section carried a diagram of a start_process_monitor command and a process_list_update event pushed from a tokio task. Neither was ever built — grepping the tree finds zero references. It now describes the polling that actually happens, and says plainly what the push design would buy (a shared poll across viewers; an interval that doesn't drift with the renderer), so it reads as a plan rather than a claim.

The issue's load figure is wrong

"5 admin tabs × 5 connections × 2s = 150 req/min" assumes every tab polls. AdminPanel renders only the tab in front of you, so at most one poller runs at a time. Worth correcting, because it's the number that makes the polling look untenable.

Three tests broke, correctly

getByText("root") became ambiguous once the dropdown offered the same names as options. They're scoped to the table now, which is what they meant.

Verification

17 filter tests. Unit 2144, browser 297, 0 lint errors.

FR-7.2.1 asks for "filterable by user, database, state". There was one
free-text box matching every column at once, which cannot express "sleeping
connections belonging to app" — the question an admin actually has when the
connection count is climbing (#437).

Three dropdowns, each offering only values that are actually connected, so a
filter never lists a user with no threads. They combine with AND, and with
the free-text box, which stays because it answers a different question:
finding one thread by a fragment of its query. A process with no database
is selectable through the same placeholder the table shows.

Matching is exact, not by prefix. A user called "app" must not select one
called "application", which is the sort of thing a substring filter gets
wrong quietly.

ARCHITECTURE §3.6 is the other half of this issue, and it was describing a
`start_process_monitor` command and a `process_list_update` event pushed
from a tokio task. Neither was ever built. The section now describes the
polling that actually happens and says plainly what the push design would
buy — a shared poll across viewers, and an interval that does not drift with
the renderer — so it reads as a plan rather than a claim.

The issue's load figure is worth correcting too: "5 admin tabs × 5
connections × 2s = 150 req/min" assumes every tab polls. AdminPanel renders
only the tab in front of you, so at most one poller runs at a time.

Three existing tests broke on `getByText("root")` becoming ambiguous once
the dropdown offered the same names. They are scoped to the table now, which
is what they meant.

Closes #437

Co-Authored-By: Claude Opus 5 <[email protected]>
@EVWorth
EVWorth force-pushed the feat/admin-process-filters branch from 1cce673 to 0636fd2 Compare September 10, 2026 12:44
@EVWorth
EVWorth merged commit 6c275e8 into main Sep 10, 2026
12 checks passed
@EVWorth
EVWorth deleted the feat/admin-process-filters branch September 10, 2026 12:47
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.

[P1] [doc-drift] FR-7.2.1 filters + ARCH §3.6 process monitor — unimplemented

1 participant