Repository navigation
feat(ui): group search by member id, and the seven missing group filters (#801) - #854
Merged
Merged
Conversation
5 tasks
Server-side, filter-while-paging (a filter over loaded rows would lie about pages never fetched): - member=<record key> resolves via entity_of_key and pins the page - min/max members push into the page statement; confidence range, matched-by model, matched-on field, verified (active always-assertion) and tag include/exclude (Postgres taggings prequery) filter per group after assembly - cursor tracks the last SCANNED id so filtered paging never skips - within_groups edges now carry model_version + evidence; groups answer matched_fields / model_versions / verified UI: shared GroupFilters model (serialisation + reset live in lib/domain/group-filters.ts), member search, filter bar, matched-on column, verified marker, confidence sort. AI-recommendation filter and mass-dialog carry are recorded scope calls on the issue: no group-level recommendation data or group mass actions exist. Coverage: pg_golden_read asserts every dimension over HTTP incl. cursor continuation under a filter; vitest pins the param serialisation; the mock honours every dimension; Playwright spec drives search + filters.
- tag prequery fetches 10,001 so 'at the cap' and 'truncated at the cap' are distinguishable; over 10,000 tagged entities is a 422 rather than a silently truncated filter - min_members > max_members and min_confidence > max_confidence are a 422 naming the empty band, mirroring the reviews handler's probability-band check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #801
What
Member-record-ID search on the duplicates screen plus the group filter model: confidence range, group size (min/max), matched-by model, matched-on field, verification status, and tags include/exclude — all filtered server-side while keyset-paging. Group cards gain a matched-on fields column and a confidence sort. Filter state is one shared module.
Why
Spec units 1.27+1.28 (#801, parent #513): a steward cannot find "the group containing record X", and seven of the spec's eight group filters are missing (only source exists).
Proof
make checkgreen (entities-check regenerates clean; clippy-D warningsclean).make frontendgreen — 549 passed across the mock-backed tier including the extendedduplicates.spec.ts(search, every filter dimension, tag include/exclude).pg_golden_read(ER_TEST_PG_DSN + DEDUPE_E2E_DUCKLAKE locally) asserts each filter over HTTP, the unknown-member empty result, and cursor continuation under a filter — which caught a real bug mid-build (a filled page mid-chunk lost the unscanned remainder; the cursor now tracks the last emitted group).Risk & rollback
The response shape only gains fields; the one behavioral change to an existing parameter is internal (scan chunking). Worst case is a slow selective filter, bounded by the 10k-group scan cap. Rollback:
git revert <merge-sha>— the declared-SQL additions are additive and every live store reconciles additively.Post-merge ledger
Closed by: agent · session
01a1b892-4cde-7a53-bb3e-9ed2e764acdconMac· 2026-11-08T14:49:22Zmainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not: merge SHA
b3e35e46; all sixpush runs concluded success —
rust,frontend,infra,devcontainer,images,deploy(the last via workflow_run, appeared late as expected)imagesbuilt, or correctly never ran because nothing that goes intoan image changed: built — the diff touches
rust/andfrontend/, bothof which go into the web-api image; run on
b3e35e46concluded successdeployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion: deploy run on
b3e35e46concluded success including its own preview smoke test andcutover; a direct pod-log line could not be read because the
er-dev-rokubectl SSO token is expired (same root cause as The request span starts a new trace instead of continuing the caller's #660; the SSO refresh
ask is already with the user as a non-blocking FYI)
deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change:
deploygreen on the merge SHA;driftandkind'snightly leg are scheduled and were not due in this window
Donethrough the automation rather than byhand, and the issue closed: feat(ui): group search by member id, and the seven missing group filters #801 CLOSED/COMPLETED with
closer.__typename == "PullRequest"; board card readsDone(evidence-key prefixes hardcoded in reader + frontend; custom-prefix
models lose matched-fields)
(a skill, a reference, memory) — or nothing new was learned: the
scan-loop cursor rule (cursor = last emitted when the page fills
mid-chunk, last scanned otherwise) lives in
read.rsbeside the loop;the tag-cap probe idiom (fetch cap+1) is commented at the handler
Specific to this change
Context — plan, discoveries, measurements, files
Plan
Scope calls made up front (details in Discoveries):
resetthe mass path will call when it exists (feat(review): per-record Delete, Verify, and a durable Unmatch distinct from unmerge #803/feat(review): merge arbitrary records the matcher never grouped #804 territory).alwaysassertions among a group's members (documented definition; feat(review): per-record Delete, Verify, and a durable Unmatch distinct from unmerge #803 owns the real Verify verb).Steps:
within_groups(match_score) also returnsmodel_version+evidence;duplicate_groups_pagegains$max_members/$only_entity. Regenerate;make entities-check.read.rs:DuplicateFilters+ filter-while-paging loop (cursor tracks last scanned id), edges carry provenance (model, evidence columns, asserted), per-groupmatched_fields/model_versions/verifiedin the response.member=resolves via the existingentity_of_record_key;tag=/exclude_tag=prequery pg (tag_by_name+subjects_for_tag, already declared).PASSTHROUGHallowlist.duplicates.spec.ts; a11y page already registered.make check+make frontend.Discoveries
entity_of_key.sqlalready existed — member search needed no new lookup statement.pg::subjects_for_tag/tag_by_namealready existed — the tag filter is a prequery, no new declared SQL.dedupe_core::confidence::group_score), so a SQL-side confidence filter would duplicate the formula; the filters run per-group after assembly instead, with the scan loop keeping pages full.review_recommendations), with no path to a merged group — deferral recorded on the issue.pg_golden_read's cursor-continuation assertion caught it before push.gamma_/mw_/mw_tf_adj_) are hardcoded inevidence_fields, matching the frontendparseEvidenceprecedent; an admin-uploaded model CAN carry custom prefixes (Settingsderives them from the JSON), so the silent-empty gap is pre-existing product-wide, not introduced here — filed Evidence-key prefixes hardcoded in reader + frontend; custom-prefix models lose matched-fields #871 to derive prefixes from the model registry.min_members/max_membersandmin_confidence/max_confidencebands are a 422 naming the empty band, mirroring the reviews handler's probability-band check.Measurements
read.rs).make frontend: 549 passed, 117 skipped (device/release tiers), 2.4 min.Files
entities/match_score/read/within_groups.{sql,yaml}— edges carry model_version + evidence.entities/entity_membership/read/duplicate_groups_page.{sql,yaml}—$max_members,$only_entity.rust/crates/er-entities/src/{entity_membership,match_score}.rs— regenerated.rust/crates/er-server/src/read.rs—DuplicateFilters, scan loop, edge provenance, per-group metadata.rust/crates/er-server/src/lib.rs— handler params, member resolution, tag prequery.rust/crates/er-server/tests/{pg_golden_read,acct_read}.rs— HTTP-level filter coverage.frontend/src/lib/domain/group-filters.ts— the shared filter model.frontend/src/lib/query/duplicates.ts,components/duplicates/duplicates-content.tsx— query params + filter bar + matched-on column.frontend/src/app/api/.../duplicates/route.ts— passthrough allowlist.frontend/tests/mock-erserver/server.mjs— the mock honours every dimension.frontend/tests/{unit/group-filters.test.ts, functional/duplicates.spec.ts}.