Repository navigation
feat(ui): recommend catalog tags from a description - #2105
Merged
Merged
Conversation
Signed-off-by: András Jáky <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🟡 Changes recommended
Async loading races can leave suggestion loading stuck or compute results before catalog tags are available.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds extractor-backed catalog tag recommendations while preserving existing tag filtering.
Changes:
- Adds taxonomy extraction, tag intersection, and suggestion UI.
- Introduces Vitest coverage and test tasks.
- Regenerates committed static UI assets.
File summaries
| File | Description |
|---|---|
server/gateway/ui/vite.config.ts |
Configures Vitest. |
server/gateway/ui/Taskfile.yml |
Adds UI test task. |
server/gateway/ui/src/lib/types.ts |
Defines extraction and suggestion types. |
server/gateway/ui/src/lib/components/TagFilterSection.svelte |
Implements tag search and suggestions. |
server/gateway/ui/src/lib/components/FilterSidebar.svelte |
Integrates the new tag component. |
server/gateway/ui/src/lib/api.ts |
Adds extraction and tag-mapping logic. |
server/gateway/ui/src/lib/api.test.ts |
Tests extraction and mapping behavior. |
server/gateway/ui/package.json |
Adds Vitest command and dependency. |
server/gateway/ui/package-lock.json |
Locks Vitest dependencies. |
server/gateway/static/index.html |
References rebuilt assets. |
server/gateway/static/_app/immutable/nodes/3.gV4OOSVy.js |
Rebuilds the About route. |
server/gateway/static/_app/immutable/nodes/2.D_54MLUH.js |
Removes the previous catalog bundle. |
server/gateway/static/_app/immutable/nodes/2.BamhBAP1.js |
Adds the rebuilt catalog bundle. |
server/gateway/static/_app/immutable/nodes/1.y-TS4hvm.js |
Adds rebuilt error route. |
server/gateway/static/_app/immutable/nodes/1.CWgtiKwJ.js |
Removes previous error route. |
server/gateway/static/_app/immutable/nodes/0.YAJeYxhr.js |
Adds rebuilt layout route. |
server/gateway/static/_app/immutable/nodes/0.D1TABI0x.js |
Removes previous layout route. |
server/gateway/static/_app/immutable/entry/start.RV-5dyY6.js |
Removes previous startup entry. |
server/gateway/static/_app/immutable/entry/start.IuC63T2i.js |
Adds rebuilt startup entry. |
server/gateway/static/_app/immutable/entry/app.Dnr0g9V_.js |
Removes previous application entry. |
server/gateway/static/_app/immutable/entry/app.CKbpG_XR.js |
Adds rebuilt application entry. |
server/gateway/static/_app/immutable/chunks/DsJNZJ3t.js |
Updates generated page-store imports. |
server/gateway/static/_app/immutable/chunks/DPGp9GGy.js |
Updates generated badge imports. |
server/gateway/static/_app/immutable/chunks/D5OVXhOq.js |
Removes previous stats-store chunk. |
server/gateway/static/_app/immutable/chunks/C-S5hJo3.js |
Updates generated runtime code. |
server/gateway/static/_app/immutable/chunks/BvFvB0xU.js |
Updates generated configuration store. |
server/gateway/static/_app/immutable/chunks/BE3mKSrw.js |
Adds rebuilt stats-store chunk. |
server/gateway/static/_app/immutable/assets/0.D-6N7bNh.css |
Removes previous stylesheet. |
server/gateway/static/_app/immutable/assets/0.CAlm59r1.css |
Adds rebuilt suggestion styles. |
Review details
Files not reviewed (7)
- server/gateway/static/_app/immutable/assets/0.CAlm59r1.css: Generated file
- server/gateway/static/_app/immutable/chunks/BE3mKSrw.js: Generated file
- server/gateway/static/_app/immutable/entry/app.CKbpG_XR.js: Generated file
- server/gateway/static/_app/immutable/nodes/0.YAJeYxhr.js: Generated file
- server/gateway/static/_app/immutable/nodes/1.y-TS4hvm.js: Generated file
- server/gateway/static/_app/immutable/nodes/2.BamhBAP1.js: Generated file
- server/gateway/ui/package-lock.json: Generated file
- Files reviewed: 23/30 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: András Jáky <[email protected]>
csirmazbendeguz
approved these changes
Sep 4, 2026
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.
The AI Catalog's tag filter matched tag names as substrings, which only helps someone who already knows the OASF taxonomy. Typing what you actually want — "analyzing customer support tickets" — matched nothing, because no tag is named that, leaving you to guess at hundreds of hierarchical labels.
This adds a Suggest tags action next to the existing tag filter. It reinterprets the same text through the extractor (
POST /v1/extract) and offers the matching skills and domains as selectable tags. Selecting one behaves exactly like selecting any other tag: filtering still goes throughGET /v1/agents?filter=. Only tag discovery changes.Screenshot
Typing a phrase, finding no substring matches, and getting taxonomy labels back instead:
How it works
extractTaxonomy()posts the text to/v1/extract.suggestTagsFromExtraction()then intersects the returned classes against theGET /v1/tagslist the typeahead already loads, and drops everything absent from it — a suggested tag no record carries is worse than no suggestion, since you take the advice and land on an empty catalog.The intersect keys on kind + class name rather than reconstructing the whole
oasf:*:skills:<name>tag id.ListCatalogTagswrites*as the schema version today, and hard-coding that would make every suggestion silently vanish the day it emits a real version instead.Extractor availability is discovered lazily from the first 503 rather than probed on mount, so a gateway with no extractor configured just hides the action instead of spending a model inference on every page load to find out.
Design decisions
Carried over from the issue, restated here for reviewers:
/v1/extractbut have no OASF class behind them, so there is no tag to select. They are dropped inapi.ts, not in the component, so they cannot reach the UI at all.Two calls beyond what the issue specified:
Notes for reviewers
The tag section moved into its own component.
FilterSidebar.sveltewas already 261 lines covering three unrelated filter groups plus media-type tree recursion; adding the async suggest state to it would have made the whole thing harder to read.TagFilterSection.svelteowns the tag search, suggestions, and loading state, and calls the samehandleTagcallback the checkboxes already used.vitestis new to this package. The UI had no test runner. The mapping and intersect rules are the part of this change most likely to break silently on a server-side format change, so they are covered: 15 cases over kind/name matching, the drop-if-not-in-/v1/tagsrule, skill-vs-domain name collisions, dedup, ordering, versioned vs wildcard tag ids, annotation ids ignored, keywords ignored, and the 503 →ExtractorUnavailableErrorsplit. Runs vianpm testortask ui:test.Suggestions can legitimately come back empty, and the UI says so rather than falling silent.
extractor.DefaultTiersis 2, so/v1/extractreturns a shortlist rather than the whole taxonomy; on a sparse registry the intersect can be empty. Deliberately not widening tiers here —ensureVersionCoveragein oasf-sdk already tops the result up past the requested ceiling so every in-scope OASF version is represented, and/v1/extract(unlike search) returns those entries. Worth revisiting only if empty suggestions turn out to be a real complaint.A tag can still filter to zero results, though this PR neither introduces nor widens it.
ListCatalogTagsderives tags from every record, whileGetCatalogEntriesadditionally requires a known catalog module and skips records it cannot project — so a tag whose only carriers have no catalog projection passes the intersect and yields nothing. The same is already true of any tag checked by hand, and suggestions are a strict subset of that list. The proper fix is the record count onCatalogTagthe issue tracks separately; that count needs to be computed over the catalog-projectable universe, not over all records, or it will reproduce the mismatch with a number attached.npm run lintfails on this branch, and did before it too. eslint has noeslint.config.jsat all and errors out immediately; prettier has no config, so it wants double quotes and spaces against a codebase using single quotes and tabs, and cannot parse.sveltedespiteprettier-plugin-sveltebeing a devDependency. Adding a matching.prettierrcstill flagged 18 of ~20 files, so a passing lint means reformatting the whole UI — out of scope here. CI does not run this target, only the static-build freshness check, which is presumably why it went unnoticed. Worth its own issue.Testing
task ui:test— 15/15 passnpm run check— 0 errors (one pre-existing a11y warning inDetailModal.svelte)task ui:build— clean, and the committedserver/gateway/staticoutput matches a fresh build, which is what CI checksCloses #1908