Repository navigation
Feat/merge search - #313
Closed
AlexAxthelm wants to merge 2 commits into
Closed
AlexAxthelm wants to merge 2 commits into
AlexAxthelm wants to merge 2 commits into
Conversation
Add `q` to GET /oil-gas-fields/merge-candidates. A candidate matches when any of its resources, or its merged resource once approved, matches the resource list's search (substring of the coalesced name, local name, basin, state/province or region, licensed sources only). A numeric q also matches resource ids; candidate ids are not searched. The search runs only over resources that belong to candidates, via a new optional `resource_ids` argument on base_resource_query. Header status_counts stay whole-queue. The queue gets a full-width search box above the stacked Status filter and sort select. It submits on Enter or the Search button, clears on × or an emptied box, and lives in the URL as `q`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Name, basin or resource ID" was cut off in the narrow queue column.
AlexAxthelm
force-pushed
the
feat/merge-search
branch
from
October 2, 2026 14:56
db4cecd to
8835a99
Compare
Comment on lines
+297
to
+301
| with named_query("merge_candidates.list.search"): | ||
| matching = set(await session.scalars(text_match)) | ||
|
|
||
| if q.isdigit() and int(q) <= _MAX_RESOURCE_ID and int(q) in queue_resource_ids: | ||
| matching.add(int(q)) |
CD summary
|
| service | url | fqdn |
|---|---|---|
| api | open | pr-0313-api.purplegrass-c07d0a94.westus2.azurecontainerapps.io |
| entity-linkage | open | pr-0313-el.purplegrass-c07d0a94.westus2.azurecontainerapps.io |
| frontend | https://witty-mushroom-017a3dc1e-313.westus2.1.azurestaticapps.net | |
| stitch-llm | open | pr-0313-llm.purplegrass-c07d0a94.westus2.azurecontainerapps.io |
Database (1)
| db_name | postgres_host | postgres_port | postgres_db |
|---|---|---|---|
| pr_0313 | stitch-dev.postgres.database.azure.com |
5432 |
pr_0313 |
Jobs (2)
| job | image | postgres_db | api_url | auth_mode |
|---|---|---|---|---|
| db-migrations | ghcr.io/rmi/stitch-api:pr-0313@sha256:bd4e85fb41a018be20fa2ca41f80df2f62b4c1ad20ea09031a0c436a3ccd00df |
pr_0313 |
||
| seed | ghcr.io/rmi/stitch-seed:pr-0313@sha256:90014c570db968c05eba40f38df5ae0d782ede2104cd470bcbef400cabb2bd19 |
https://pr-0313-api.purplegrass-c07d0a94.westus2.azurecontainerapps.io/api/v1 |
stitch-client-bearer-token |
Images (4)
| build_time | commit_time | git_sha | image | image_digest |
|---|---|---|---|---|
| 2026-10-02T14:57:17Z | 2026-10-02T14:56:55Z | a469ce4 | ghcr.io/rmi/stitch-api:pr-0313 |
ghcr.io/rmi/stitch-api:pr-0313@sha256:bd4e85fb41a018be20fa2ca41f80df2f62b4c1ad20ea09031a0c436a3ccd00df |
| 2026-10-02T14:57:16Z | 2026-10-02T14:56:55Z | a469ce4 | ghcr.io/rmi/stitch-entity-linkage:pr-0313 |
ghcr.io/rmi/stitch-entity-linkage:pr-0313@sha256:b18f98bf17740dab52003d8f6dfe9a256e5d687ea0753d0bdc838b7643fb88fe |
| 2026-10-02T14:57:17Z | 2026-10-02T14:56:55Z | a469ce4 | ghcr.io/rmi/stitch-seed:pr-0313 |
ghcr.io/rmi/stitch-seed:pr-0313@sha256:90014c570db968c05eba40f38df5ae0d782ede2104cd470bcbef400cabb2bd19 |
| 2026-10-02T14:57:17Z | 2026-10-02T14:56:55Z | a469ce4 | ghcr.io/rmi/stitch-stitch-llm:pr-0313 |
ghcr.io/rmi/stitch-stitch-llm:pr-0313@sha256:fe39149cd524980e13323c129f3f3973e33ad026bf1d3ee12940ad3a7745064b |
Contributor
|
Electing to close this and prioritize focusing on performance improvements. |
This branch was successfully deployed
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.

Allow searching the merge review queue. Using a numeric search query (
123) will also return candidates that include that resource.Search is set up so that if any of the component resources match the query, then that candidate is included in the result set.
Why
Reviewers working through a long Merge Review queue had no way to find a specific field without paging through every candidate. STIT-745 asks for a search box over the candidate list.
What changed
API:
GET /oil-gas-fields/merge-candidates?q=qalso matches resource IDs, soq=2024finds both "Block 2024" and resource 2024. Candidate IDs are not searched.qis ANDed withstatus, sort and paging. It narrowsitems/total_count;status_countsstays whole-queue, so the header doesn't change while you search.base_resource_querychange: it gains an optionalresource_idsargument (passed through to the existingconstruct_base_query_statementsupport). The merge search uses it to search only resources that belong to candidates instead of the whole table. This touches the Resource List's shared query code; the Resource List's own call is unchanged.Merge Review page
q(documented in the frontend README under "Merge review URLs"). A new search returns to page 1, and Back/Forward re-fill the box.How to review
deployments/api/src/stitch/api/db/queries.py: theresource_idsscoping in_resource_universe/base_resource_query.deployments/api/src/stitch/api/db/merge_candidate_actions.py:_resource_ids_matchingand theqfilter inlist_merge_candidates.deployments/stitch-frontend/src/config/mergeReviewParams.js, thenQueueSearchinpages/MergeCandidateReviewPage.jsx.Known limitations
%and_in a search act as SQL wildcards. This is existing Resource List search behavior, reused here unchanged.²) returns a server error rather than a text search.Testing
make checkpasses.qmatching a resource ID, digits in a name, and an over-long number (searched as text only, without erroring)status_countsunchangedqtreated as no searchmerge_candidates.list.search_scope/merge_candidates.list.searchquery labels.qparse/serialize/trim in the URL schemaqsent to the APIManual verification: ran the local stack with the seeded queue from #310 (~220 candidates) and checked on the Merge Review page:
AI assistance
Claude Code was used to explore the codebase, plan the change, and write the implementation, tests and docs. Matching scope, ID matching and the layout were decided by the author during planning.
🤖 Generated with Claude Code