Fix models not displaying on website + add tests and CI#4
Merged
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: undefined
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>
This reverts commit ceae72c.
Contributor
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 📎 Log file uploaded as GitHub Gist (449KB) Now working session is ended, feel free to review and add any feedback on the solution draft. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.globpattern inlinoParser.jswas using/providers/**/*.linobut the actual model files are located in/public/providers/**/*.lino. This caused no models to be loaded.Changes Made
Fixed the bug (
website/src/utils/linoParser.js:210)/providers/**/*.linoto/public/providers/**/*.linoAdded 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)Added GitHub Actions CI workflow (
.github/workflows/pr-checks.yml)Test Results
All checks passing locally:
Verification
The fix ensures:
Fixes #3
🤖 Generated with Claude Code