databrickslabs / databrickslabs/ontos

[Feature]: Rich Result Cards with Metadata Badges

Open
#97 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/feature
Dominant language
Python
Stars
212
Forks
71
Avg merge
4d 10h
Merged PRs (30d)
43

Description

Parent PRD

#95

What to build

Replace the minimal search result display (icon + title + truncated description) with rich result cards that surface metadata at a glance.

Backend — SearchIndexItem:

  • Add created_at: Optional[datetime] and updated_at: Optional[datetime] fields to the model.
  • All managers implementing get_search_index_items() populate these from their source entities.
  • Ensure extra_data consistently includes domain, status, owner across all searchable managers.

Frontend — New SearchResultCard component:

  • Replaces the current <a> element in index-search.tsx.
  • Renders: icon (existing logic), title (clickable link), truncated description.
  • Inline badges row: type pill (e.g., "Data Product"), status pill (e.g., "Active" in green, "Draft" in gray), domain tag, top 2-3 tags as small pills.
  • Certification badge slot (renders nothing until lifecycle work lands, graceful null handling).
  • Responsive: badges wrap on narrow screens.

Frontend — Result count summary:

  • Show a summary line at the top of results using facets from the API response: "3 Data Products, 5 Contracts, 12 Assets" as clickable chips that act as quick type filters.

Acceptance criteria

  • SearchIndexItem has created_at and updated_at optional fields
  • At least DataProductsManager, DataContractsManager, AssetsManager, DataDomainManager populate timestamps
  • SearchResultCard component renders type pill, status pill, domain tag, and tags
  • Missing metadata handled gracefully (no badge rendered if field is null/empty)
  • Result count summary line shows counts by type from facets
  • Count chips are clickable and apply type filter (updates URL params)
  • Visual design consistent with existing Shadcn UI component style
  • Component test for SearchResultCard (renders correctly with full and partial data)

Blocked by

  • Blocked by #96 (needs SearchResult envelope with facets)

User stories addressed

  • User story 7 (metadata badges on result cards)
  • User story 8 (result count summary)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SearchIndexItem model and the get_search_index_items() implementations, then inspect index-search.tsx and the SearchResultCard entry point. Check #96 first because this work is blocked by the SearchResult envelope with facets. Done means timestamp and metadata fields are populated, cards and facet count chips handle missing data, and the component test covers full and partial data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, react, typescript
Domain
full-stack, search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.