feat: expose autocomplete scores and add frontend e2e smoke CI#17
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR exposes Redis ZSET scores all the way to the autocomplete API contract, uses those scores on the frontend to enforce deterministic ordering, and adds a Playwright-based frontend E2E smoke test with a dedicated GitHub Actions job and Telegram reporting.
Changes:
autocomplete-service: switch to reading ZSET entries viareverseRangeWithScoresand return realscorevalues; update unit/integration tests to validate the contract.frontend: client-side sort byscore(desc) with a unit test verifying order.- CI/docs: add
frontend/scripts/e2e-smoke.js,npm run test:e2e-smoke, a newfrontend-e2e-smokeworkflow job, Telegram summary integration, and documentation updates.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the new frontend E2E smoke test and CI job sequence. |
| CONTRIBUTING.md | Adds contributor guidance/checklist updates for running the E2E smoke test. |
| frontend/src/app/services/autocomplete.service.ts | Sorts autocomplete suggestions by descending score on the client. |
| frontend/src/app/services/autocomplete.service.spec.ts | Adds a unit test asserting client-side score sorting. |
| frontend/scripts/e2e-smoke.js | New Playwright E2E smoke script that seeds events and validates UI ordering/click-through. |
| frontend/package.json | Adds test:e2e-smoke script and Playwright dependency. |
| frontend/package-lock.json | Locks Playwright and transitive dependencies. |
| autocomplete-service/src/main/java/lt/satsyuk/autocomplete/service/AutocompleteQueryService.java | Returns actual Redis ZSET scores in AutocompleteEntry. |
| autocomplete-service/src/test/java/lt/satsyuk/autocomplete/service/AutocompleteQueryServiceTest.java | Updates unit test to mock ZSET tuples with scores. |
| autocomplete-service/src/test/java/lt/satsyuk/autocomplete/integration/AutocompleteServiceRedisIT.java | Extends integration tests to assert score and strict JSON contract. |
| .github/workflows/ci.yml | Adds frontend-e2e-smoke job and wires result into Telegram notification. |
| .github/scripts/compose_telegram_message.py | Includes frontend-e2e-smoke in tracked job results and overall status computation. |
Files not reviewed (1)
- frontend/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Что сделано\n- �utocomplete-service: AutocompleteQueryService теперь читает Redis ZSET через
everseRangeWithScores и возвращает реальный score в AutocompleteEntry.\n- Обновлены тесты AutocompleteQueryServiceTest и AutocompleteServiceRedisIT (включая строгую JSON-проверку контракта).\n- rontend: добавлена клиентская сортировка подсказок по score (убывание) + unit-тест на порядок.\n- Добавлен постоянный smoke e2e тест rontend/scripts/e2e-smoke.js и команда
pm run test:e2e-smoke.\n- CI: добавлен отдельный job rontend-e2e-smoke (docker compose up +
pm run test:e2e-smoke).\n- Telegram summary: в .github/scripts/compose_telegram_message.py добавлен статус rontend-e2e-smoke.\n- Документация обновлена в README.md и CONTRIBUTING.md.\n\n## Проверки локально\n- mvn -Dtest=AutocompleteQueryServiceTest test (�utocomplete-service)\n- mvn -Dit.test=AutocompleteServiceRedisIT verify (�utocomplete-service)\n-
pm run test:ci -- --include src/app/services/autocomplete.service.spec.ts (rontend)\n-
pm run test:ci (rontend)\n-
pm run test:e2e-smoke (rontend, при поднятом compose)\n\n## Зачем\n- Пробросить score до API-контракта и использовать его на клиенте для детерминированного порядка подсказок.\n- Зафиксировать end-to-end поведение отдельным smoke job в CI и отразить его результат в Telegram уведомлении.