Skip to content

fix(search): use public_description for card summary and snippet#19

Merged
level09 merged 1 commit into
mainfrom
fix/card-summary-public-description
Jun 8, 2026
Merged

fix(search): use public_description for card summary and snippet#19
level09 merged 1 commit into
mainfrom
fix/card-summary-public-description

Conversation

@level09

@level09 level09 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Problem

Search result cards and the FTS snippet read the internal `description` field. The public export now drops `description` in favor of the redacted `public_description` (Bayanat side, PR #346), so every card shows "no summary available" even when `public_description` is set.

Fix

  • `search_results.html`: card summary fallback now uses `doc.public_description` (both grid and list views).
  • `search.py`: FTS snippet pulls from column 3 (`public_description`) instead of column 2 (`description`).

The document detail page already rendered `public_description`, so this just aligns the search cards/snippet with it.

Verified

Imported the 494-doc redacted batch, injected a sentinel `public_description` on one doc, and confirmed via the HTMX search endpoint that the card renders the redacted summary (snippet when searched, full text on browse) and that docs without `public_description` still show the no-summary fallback.

Follow-up (not in this PR)

`description` is now dead in the export. A later cleanup can drop the `description` column + its FTS indexing and update `EXPORT_SCHEMA.md`.

Search result cards and the FTS snippet read the internal 'description'
field, which the public export now drops in favor of the redacted
'public_description'. Point the card fallback and snippet at
public_description so summaries render. Detail page already used it.
@level09 level09 self-assigned this Jun 7, 2026

@apodacaduron apodacaduron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, i noticed maybe we need to preserve rich text when rendering the description, but im almost 100% sure that is issue on frontend i'll take a look

@level09 level09 merged commit 649fda2 into main Jun 8, 2026
@level09 level09 deleted the fix/card-summary-public-description branch June 8, 2026 21:29
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.

2 participants