Skip to content

chore: relevance \b boundaries (housing/tenancy) + Resources visual polish - #116

Open
ltanafranca1004 wants to merge 1 commit into
mainfrom
chore/relevance-boundaries-resources-polish
Open

chore: relevance \b boundaries (housing/tenancy) + Resources visual polish#116
ltanafranca1004 wants to merge 1 commit into
mainfrom
chore/relevance-boundaries-resources-polish

Conversation

@ltanafranca1004

Copy link
Copy Markdown
Collaborator

Two unrelated low-priority fixes bundled into one PR per request.

1. relevance filter — two leftover left-word-boundary bugs

The 2026-08-09 boundary sweep (BACKLOG "terms without a left word boundary", RESOLVED) fixed lease/rental/renting/tenant/resume but its "four substrings of common words" tally undercounted. Two more terms in CORE_TERMS had the same latent false-positive bug:

term swallowed by title that wrongly passed
housing ware·housing Warehousing & Distribution Certificate
tenancy Lieu·tenancy Lieutenancy Awards Ceremony

tenancy sat directly beside the \btenant fix (same Lieutenant/Lieutenancy root) and was missed. Now \bhousing / \btenancy.

Verification (same rigor as the earlier \b fixes):

  • lib/relevance_test.ts: added Warehousing… + Lieutenancy… as DROP fixtures and Affordable Housing Forum + Tenancy Rights Q&A as real-word KEEPs (the boundary must not cost genuine hits). deno test supabase/functions/events-crawler/lib/relevance_test.ts → 4 passed.
  • Live shared DB checked: 0 rows in public.events match warehousing|lieutenancy (nothing ingested is dropped), and the 5 genuine \bhousing/\btenancy titles already ingested still match. Adding \b only narrows, so this can't add keeps.
  • BACKLOG entry updated with a dated follow-up so the record is accurate.

2. Resources visual polish

  • Grid-tile descriptions (CategoryTile): the tiles showed label + org count only. Now they also render the category description, reusing PARTNER_CATEGORY_DESCRIPTION_KEYS (the same keys CategoryView already renders), line-clamp-2 for grid tidiness. No new i18n keys → check-i18n unaffected (still "parity OK"); ar/fr-CA fall back to EN exactly as the rest of the resources.* block already does.
  • Category-pill contrast (PartnerDetail): the pill rendered saturated category-color text on a 10%-alpha tint of the same color, which fails WCAG AA for the lighter category colors (orange #F68B26, gold #C8941F, teal #2DB39A). Now dark ink (text-ink-secondary) on the defined pale tint, with a small colored dot for category identity — matching the already-readable CategoryTile treatment.

Checks

  • deno test (relevance): 4 passed
  • tsc --noEmit: clean
  • eslint (changed components): clean
  • check-i18n: parity OK

🤖 Generated with Claude Code

…olish

Two unrelated low-priority fixes bundled per request.

relevance filter (events-crawler):
- `housing`→`\bhousing` (swallowed by "wareHOUSING") and `tenancy`→`\btenancy`
  (swallowed by "LieuTENANCY") — the two left-word-boundary offenders the
  2026-08-09 sweep missed. Same latent-false-positive class as the earlier
  lease/rental/renting/tenant/resume fixes.
- DROP fixtures + real-word KEEPs added to relevance_test.ts; `deno test` green.
- Zero live incidence: 0 rows in public.events match warehousing|lieutenancy;
  the 5 genuine housing/tenancy rows already ingested still match.

Resources visual polish:
- CategoryTile: render the category description (existing i18n keys, already
  used by CategoryView) under the label.
- PartnerDetail: fix category-pill contrast — saturated-color-on-10%-tint text
  failed WCAG for lighter category colors (orange #F68B26, gold #C8941F); now
  dark ink on the pale tint with a colored dot, matching CategoryTile.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
web-app Ready Ready Preview Sep 10, 2026 11:32pm UTC

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c16faecf-fb00-4668-b77f-c5f5106e21cf

📥 Commits

Reviewing files that changed from the base of the PR and between 228e40a and b9dc4e6.

📒 Files selected for processing (5)
  • BACKLOG.md
  • components/resources/CategoryTile.tsx
  • components/resources/PartnerDetail.tsx
  • supabase/functions/events-crawler/lib/relevance.ts
  • supabase/functions/events-crawler/lib/relevance_test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant