Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the gorsejs SDK to use the unknown type for user and item labels instead of string[], removes the Redis dependency from tests, and updates the test suite to work with an actual Gorse server instance. The change makes the labels field more flexible to accommodate various data structures like objects with arbitrary properties.
Key changes:
- Changed
Labelstype fromstring[]tounknownin User and Item interfaces to support flexible label structures - Removed Redis dependency and related test infrastructure (redis client, docker-compose.yml, config.toml)
- Updated tests to use actual Gorse server data instead of mocked Redis responses
- Added
ValueandCommentfields to Feedback interface, introducedItemPatchinterface, and renamedLatestOutputtoScore
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/interfaces.ts | Changed Labels type from string[] to unknown for flexible label data; added Score, ItemPatch interfaces and Value field to Feedback |
| src/model/item.ts | Updated updateItem to use ItemPatch type; fixed getItemNeighbors return type; added trailing commas |
| src/model/feedback.ts | Updated deleteFeedback return type to Success; added trailing commas for consistency |
| src/model/recommend.ts | Renamed LatestOutput to Score interface; added trailing commas |
| src/model/user.ts | Added trailing commas for code style consistency |
| src/client.ts | Updated updateItem signature to accept ItemPatch instead of Item; added trailing commas |
| tests/gorse.test.ts | Removed Redis mock setup; updated tests to use actual Gorse server with real data expectations |
| package.json | Bumped version to 0.5.0; removed redis dependency |
| yarn.lock | Removed redis and related package entries; reorganized some package definitions |
| README.md | Updated usage examples to reflect new Label structure and added Value/Comment fields to feedback |
| CONTRIBUTING.md | Updated setup instructions to use curl script instead of docker-compose |
| .github/workflows/ci.yml | Simplified CI setup to use setup script instead of docker-compose |
| docker-compose.yml | Removed file (no longer needed for testing) |
| config.toml | Removed file (no longer needed for testing) |
| .devcontainer/devcontainer.json | Added dev container configuration for development environment |
| .devcontainer/Dockerfile | Added dev container Dockerfile |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.