Skip to content

feat: update frontend UI components and search form - #18

Merged
kodingkin merged 7 commits into
mainfrom
feat/update-ui
Aug 11, 2026
Merged

feat: update frontend UI components and search form#18
kodingkin merged 7 commits into
mainfrom
feat/update-ui

Conversation

@kodingkin

Copy link
Copy Markdown
Owner

Summary

  • Update frontend page layout and search form components
  • Update PackageCard component and related tests
  • Update Next.js type declarations and dependencies

Test plan

  • Frontend builds without errors (cd frontend && npx tsc --noEmit)
  • Frontend tests pass (cd frontend && npx jest)

Update PackageCard, SearchForm, and related components with improved
styling and functionality. Includes test updates and dependency changes.
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
npmatch Ready Ready Preview Aug 11, 2026 10:50am
npmatch-backend Ready Ready Preview Aug 11, 2026 10:50am

Standalone output is only needed for Docker self-hosting, but it breaks
Vercel deploys: their onBuildComplete step cannot find the .nft.json
trace files. Only enable it when not building on Vercel.
Comment thread frontend/app/page.tsx
Comment thread frontend/app/page.tsx Outdated

@kodingkin kodingkin left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

General review — I ran the full verification suite on this branch and it's green:

  • tsc (type check) passes
  • jest passes: 4 suites / 25 tests
  • eslint passes with no warnings

The search → SSE streaming → highlighted recommendation flow reads well, and the highlight fallback plus the ###-header parsing is a sensible design. Two minor things:

  1. Dead code: frontend/hooks/useHealthCheck.ts is no longer imported anywhere (only self-references within the file; the health route app/api/search/health/route.ts is independent). If the UI doesn't use the health check anymore, this file should be deleted — otherwise it reads like the hook is live when it isn't.

  2. "Showing top 6 results" footer text hardcodes 6, but the value comes from the backend's result limit. If the limit changes, the copy silently drifts. Consider passing the count from the search response or making it a constant shared with the backend. (Minor — not blocking.)

Overall this is a solid UI PR; the inline comments on the recommendation-highlighting regex are the only functional nits.

- Strip trailing punctuation from `### package-name` headers so `### zod.` still highlights the `zod` card
- Match fallback names as whole tokens so `react` does not highlight `preact`/`react-router`/`react-dom`
- Delete unused useHealthCheck hook and update stale doc references
- Show actual result count instead of hardcoded "top 6"
@kodingkin

Copy link
Copy Markdown
Owner Author

All review feedback addressed in c07c8be + 759ab16:

  • Header regex trailing punctuation: ### zod. now strips trailing .,;:!?)] before matching, while internal dots (lodash.debounce) are preserved and headers are lowercased.
  • Fallback substring false positives: switched lower.includes(name) to a whole-token word-boundary regex — react no longer highlights preact, react-router, or react-dom.
  • Dead code: deleted frontend/hooks/useHealthCheck.ts and removed its references from the root README.md, frontend/README.md, and frontend/CLAUDE.md.
  • Hardcoded "top 6": footer now renders Showing top {packages.length} results from the actual response.

Verification (independently re-run): tsc --noEmit clean, jest 4 suites / 25 tests passing, eslint clean (strict, no warnings).

@kodingkin
kodingkin merged commit 3ad33c9 into main Aug 11, 2026
4 checks passed
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