Skip to content

Fix models not displaying on website + add tests and CI#4

Merged
konard merged 6 commits into
mainfrom
issue-3-e9887698
Nov 2, 2025
Merged

Fix models not displaying on website + add tests and CI#4
konard merged 6 commits into
mainfrom
issue-3-e9887698

Conversation

@konard
Copy link
Copy Markdown
Contributor

@konard konard commented Nov 2, 2025

Summary

This PR fixes issue #3 where the website was showing "No models found" even when models existed in the database.

Root Cause

The import.meta.glob pattern in linoParser.js was using /providers/**/*.lino but the actual model files are located in /public/providers/**/*.lino. This caused no models to be loaded.

Changes Made

  1. Fixed the bug (website/src/utils/linoParser.js:210)

    • Changed glob pattern from /providers/**/*.lino to /public/providers/**/*.lino
    • Now correctly loads all 19 Claude model files
  2. Added comprehensive unit tests

    • linoParser.test.js: Tests for parsing .lino files (13 tests)
    • ModelCard.test.jsx: Tests for ModelCard component (12 tests)
    • App.test.jsx: Tests for App component including search/filter (10 tests)
    • Total: 35 tests covering parsing, rendering, and user interactions
  3. Added GitHub Actions CI workflow (.github/workflows/pr-checks.yml)

    • Runs ESLint on all PRs
    • Runs all tests
    • Verifies build succeeds
    • Prevents broken code from being merged

Test Results

All checks passing locally:

  • ✅ ESLint: No errors
  • ✅ Tests: 35/35 passing
  • ✅ Build: Successful

Verification

The fix ensures:

  • All 19 Claude models display when no search is applied
  • Models are filtered correctly when search term is entered
  • Models are sorted by release date (newest first)

Fixes #3

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: undefined
@konard konard self-assigned this Nov 2, 2025
konard and others added 4 commits November 2, 2025 05:51
The import.meta.glob pattern was using '/providers/**/*.lino' but the
actual files are located in '/public/providers/**/*.lino'. This caused
no models to be loaded, resulting in "No models found" message.

This fixes the root cause of issue #3.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add vitest and @testing-library/react for testing
- Create tests for linoParser utility functions
- Create tests for ModelCard component
- Create tests for App component (search, filter, error handling)
- Configure vitest with jsdom environment
- Add test scripts to package.json

Tests cover:
- Parsing .lino files with all field types
- Model card rendering with various data combinations
- App search/filter functionality
- Error and loading states

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This workflow runs on all pull requests and ensures:
- ESLint passes without errors
- All tests pass
- Website builds successfully

This prevents broken PRs from being merged and maintains code quality.

Fixes requirement from issue #3 to run eslint and build checks on PRs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unused 'expect' import from test-setup.js
- Comment out unused 'indent' variable in linoParser.js
- Fix ModelCard tests to handle duplicate text (Input:, Output:, dates)
- Fix linoParser test for empty lines to match actual parser behavior

All tests now pass and eslint is clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] The current version of website shows no models Fix models not displaying on website + add tests and CI Nov 2, 2025
@konard konard marked this pull request as ready for review November 2, 2025 04:57
@konard
Copy link
Copy Markdown
Contributor Author

konard commented Nov 2, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

📎 Log file uploaded as GitHub Gist (449KB)
🔗 View complete solution draft log


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 396a4e8 into main Nov 2, 2025
1 check 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.

The current version of website shows no models

1 participant