feat(demo): add the jury guide and demonstration markers to the demo stand build

This commit is contained in:
shira committed 2026-10-10 01:27:17 +03:00
1 parent d365a05c96
commit 41206abbcf
32 files changed
+1096 -141

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@
Lincodex is a platform that helps employers find IT specialists by confirmed skills. The current MVP consists of a Go backend, a React interface, PostgreSQL, Redis, SeaweedFS, and Kafka in Docker Compose, a separate ML service without a model, and optional monitoring.
Implemented: registration with email confirmation and sign-in; the candidate cabinet with consents, a manual profile without a resume or FSP ID, the questionnaire, an express run without a grade, the full test, results, skill evidence, and privacy settings; the employer cabinet with organizations, the company profile, needs, and deterministic candidate search without ML; support cases and the notification inbox. Invitations have organization-side drafts through the API only. Planned: sending invitations and candidate answers, contact release, password reset, resumes and PDF, FSP integration, ML inference, and calibrated grades. The [MVP quick start](docs/en/DEPLOY.md#running-the-mvp-quick-start) lists the details and limits.
Implemented: registration with email confirmation and sign-in; the candidate cabinet with consents, a manual profile without a resume or FSP ID, the questionnaire, an express run without a grade, the full test, results, skill evidence, and privacy settings; the employer cabinet with organizations, the company profile, needs, and deterministic candidate search without ML; support cases and the notification inbox. Invitations work from a draft to the candidate's answer: the organization sends an invitation from a search result, the candidate accepts it with the consent C4 or declines, and after the acceptance the organization reads the disclosed contacts. Planned: withdrawing invitations, salary raise, password reset, resumes and PDF, FSP integration, ML inference, and calibrated grades. The [MVP quick start](docs/en/DEPLOY.md#running-the-mvp-quick-start) lists the details and limits.
## Start locally
@@ -27,7 +27,7 @@ To show the product, use the isolated stand with synthetic data and prepared can
make -C deploy demo-seed DEMO_MODE=isolated
The stand opens at http://localhost:8090. The command prints the logins; the password is `DEMO_ACCOUNT_PASSWORD` from `deploy/demo/demo.env.example` (a published demo credential, not a secret). The [MVP quick start](docs/en/DEPLOY.md#running-the-mvp-quick-start) describes the demonstration route, the stand parameters, the mail, FSP, and ML modes, and how to stop the stands.
The stand opens at http://localhost:8090. The jury guide, an eight-minute route across two roles, is at http://localhost:8090/demo. The command prints the logins; the password is `DEMO_ACCOUNT_PASSWORD` from `deploy/demo/demo.env.example` (a published demo credential, not a secret). The [MVP quick start](docs/en/DEPLOY.md#running-the-mvp-quick-start) describes the demonstration route, the stand parameters, the mail, FSP, and ML modes, and how to stop the stands.
## Development
+2 -2
View File
@@ -4,7 +4,7 @@
Lincodex - платформа, на которой работодатели находят IT-специалистов по подтвержденным навыкам. Текущий MVP состоит из Go backend, React-интерфейса, PostgreSQL, Redis, SeaweedFS и Kafka в Docker Compose, отдельного ML-сервиса без модели и отдельно запускаемого мониторинга.
Реализовано: регистрация с подтверждением email и вход; кабинет кандидата с согласиями, ручным профилем без резюме и ФСП ID, анкетой, экспресс-запуском без грейда, полным тестом, результатами, доказательствами навыков и настройками приватности; кабинет работодателя с организациями, профилем компании, потребностями и детерминированным поиском кандидатов без ML; обращения в поддержку и inbox уведомлений. У приглашений есть только черновики на стороне организации через API. Запланированы отправка приглашений и ответы кандидата, выдача контактов, сброс пароля, резюме и PDF, интеграция с ФСП, ML inference и откалиброванные грейды. Полный перечень и границы описаны в [быстром старте MVP](docs/ru/DEPLOY.md#запуск-mvp-быстрый-старт).
Реализовано: регистрация с подтверждением email и вход; кабинет кандидата с согласиями, ручным профилем без резюме и ФСП ID, анкетой, экспресс-запуском без грейда, полным тестом, результатами, доказательствами навыков и настройками приватности; кабинет работодателя с организациями, профилем компании, потребностями и детерминированным поиском кандидатов без ML; обращения в поддержку и inbox уведомлений. Приглашения работают от черновика до ответа: организация отправляет приглашение из результата поиска, кандидат принимает его с согласием C4 или отказывается, после принятия организация читает переданные контакты. Запланированы отзыв приглашения, повышение зарплаты, сброс пароля, резюме и PDF, интеграция с ФСП, ML inference и откалиброванные грейды. Полный перечень и границы описаны в [быстром старте MVP](docs/ru/DEPLOY.md#запуск-mvp-быстрый-старт).
## Локальный запуск
@@ -33,7 +33,7 @@ Grafana доступна на локальной машине по адресу
make -C deploy demo-seed DEMO_MODE=isolated
```
Стенд открывается на http://localhost:8090. Логины печатает сама команда, пароль - `DEMO_ACCOUNT_PASSWORD` из `deploy/demo/demo.env.example` (опубликованные демонстрационные учетные данные, а не секрет). Маршрут демонстрации, параметры стендов, режимы почты, ФСП и ML и остановка описаны в [быстром старте MVP](docs/ru/DEPLOY.md#запуск-mvp-быстрый-старт).
Стенд открывается на http://localhost:8090. Гид для жюри с маршрутом на восемь минут двумя ролями открыт на http://localhost:8090/demo. Логины печатает сама команда, пароль - `DEMO_ACCOUNT_PASSWORD` из `deploy/demo/demo.env.example` (опубликованные демонстрационные учетные данные, а не секрет). Маршрут демонстрации, параметры стендов, режимы почты, ФСП и ML и остановка описаны в [быстром старте MVP](docs/ru/DEPLOY.md#запуск-mvp-быстрый-старт).
## Разработка
+6
View File
@@ -3,6 +3,12 @@
# (DEMO_PROJECT, lincodex-demo by default); never apply it to the working
# stand. The demo stand holds synthetic data only.
services:
frontend:
build:
args:
# The jury guide and the demonstration banner exist only in this build.
VITE_DEMO_STAND: "true"
backend:
environment:
# A full test on the demo stand assigns an uncalibrated synthetic
+6
View File
@@ -6,6 +6,12 @@ services:
# The browser shares this container's network namespace, so the stand
# publishes no host port and cannot collide with a running stand.
ports: !reset []
build:
args:
# Builds the jury guide and its banner in, so the browser suite checks
# them. Release E2E runs release images built without the flag, and
# the jury guide spec checks the absence of the guide in that case.
VITE_DEMO_STAND: "true"
playwright:
# The tag must match @playwright/test in frontend/package.json; the runner
+9 -7
View File
@@ -16,10 +16,10 @@ Implemented in this build (backend API and frontend screens):
- Privacy: publication of the anonymous card (C2), preview, search status, hidden organizations, and the history of changes and card views.
- Employer cabinet: organizations (one account can own several and be a recruiter in others), the company profile, needs with a salary range, deterministic candidate search over the bank or by a need without ML, with an explanation of the components, and the anonymous card with its evidence. Only an organization owner can search.
- Support cases in both cabinets, including a manual assessment request after a C3 refusal.
- The notification inbox in both cabinets. In this build no product workflow creates notifications yet, so the list is empty.
- Organization-side invitations: create a draft, list, read, and change the terms with versions through the API; the invitation screen opens from a candidate search result, and the company's invitation list is still a placeholder.
- The notification inbox in both cabinets. A delivered invitation creates a notification for the candidate; the mail about it is sent only with `EMAIL_PROVIDER=resend`.
- Invitations: the organization creates a draft from a search result, changes the terms with versions, and sends the invitation. The candidate sees it in the incoming list and accepts it with the consent C4, choosing the contacts, or declines it. After the acceptance the organization reads the disclosed contacts on the invitation page. The company's invitation list is still a placeholder.
Planned and not working: sending an invitation to a candidate (the API answers 501 `not_implemented`), withdrawal, salary raise, and contact release, the company's invitation list screen (a placeholder now), password reset, mail for product notifications, resume upload and parsing, PDF, FSP integration, ML inference and semantic search, the adaptive test, sandbox practice, percentiles and calibrated grades, and the SMTP transport.
Planned and not working: withdrawing an invitation and the candidate's cancellation of participation, salary raise (the API answers 501 `not_implemented`), the company's invitation list screen (a placeholder now), password reset, mail for other product notifications, resume upload and parsing, PDF, FSP integration, ML inference and semantic search, the adaptive test, sandbox practice, percentiles and calibrated grades, and the SMTP transport.
### Requirements
@@ -56,14 +56,14 @@ The core stack is a clean base for a working stand. Without further steps it ser
### 2. Mail: Resend or disabled
- `EMAIL_PROVIDER=disabled` (the `.env.example` value) sends nothing. Registration is accepted (202), but the address cannot be confirmed, so signing in with such an account answers 403 `email_not_verified`. The prepared accounts of the demo stand need no mail.
- `EMAIL_PROVIDER=resend` sends confirmation mail through Resend. Set `RESEND_API_KEY` in the server environment only and never commit it, set `EMAIL_FROM` to an address on a domain verified in the Resend account, and set `APP_PUBLIC_URL` to the origin the user opens, because the link in the message leads there. Then run `make -C deploy up` again. Only confirmation mail is sent; the default quotas are 100 recipients per day and 3000 per month (see [Mail](#mail) and [Mail quotas](#mail-quotas)). The repository does not test real Resend: the browser test `make -C deploy test-e2e-registration` registers through a local Resend-compatible inbox.
- `EMAIL_PROVIDER=resend` sends confirmation mail through Resend. Set `RESEND_API_KEY` in the server environment only and never commit it, set `EMAIL_FROM` to an address on a domain verified in the Resend account, and set `APP_PUBLIC_URL` to the origin the user opens, because the link in the message leads there. Then run `make -C deploy up` again. Only confirmation mail and the mail about a new invitation are sent; the default quotas are 100 recipients per day and 3000 per month (see [Mail](#mail) and [Mail quotas](#mail-quotas)). The repository does not test real Resend: the browser test `make -C deploy test-e2e-registration` registers through a local Resend-compatible inbox.
- `EMAIL_PROVIDER=smtp` stops the backend at startup in this build.
### 3. Demo stand
make -C deploy demo-seed DEMO_MODE=isolated
The target needs the root `.env` from step 1: the stand takes the secrets and the mail transport from it and overrides the project name, port, address, and subnet. The command starts a separate project, waits for backend readiness, fills the database with synthetic data, and prints the list of logins; a repeated run creates nothing and prints the same list. Open http://localhost:8090.
The target needs the root `.env` from step 1: the stand takes the secrets and the mail transport from it and overrides the project name, port, address, and subnet. The command starts a separate project, waits for backend readiness, fills the database with synthetic data, and prints the list of logins; a repeated run creates nothing and prints the same list. Open http://localhost:8090; the jury guide is at http://localhost:8090/demo.
Every prepared account uses `DEMO_ACCOUNT_PASSWORD` from `deploy/demo/demo.env`, or from `deploy/demo/demo.env.example` when that file does not exist. The example value is a published demo credential of synthetic accounts, not a secret. For a stand reachable from outside, copy the example to `demo.env`, set a new password, run `make -C deploy demo-reset DEMO_MODE=isolated`, and give the password to the jury separately.
@@ -82,7 +82,9 @@ The full inventory and the seed rules are in [Isolated demo stand](#isolated-dem
2. On the same page start the Backend Junior full test with Go: 25 items, a 72-hour deadline, two work sessions, no practice. After it completes, the result is compared with the pass mark of the demo policy; a passed test receives an uncalibrated synthetic category, a failed one the result `not_confirmed`. The result and the history open at `/candidate/results`.
3. Prepared candidate: sign in as `prepared-1@demo.lincodex.test` and open the results, the skill evidence, and the privacy settings with the published card.
4. Employer: sign in as `employer-alpha@demo.lincodex.test`, select "Alpha", create a need, and open the search (`/employer/candidates`). The main group holds the six prepared cards with the flags `ml_unavailable` and `cohort_below_30`; a card and its evidence open from the results. In "Beta" the same account is a recruiter, and search answers 403: in the minimal release only the owner can search.
5. Invitations: the company's invitation list is a placeholder. An invitation is created from a candidate search result; the candidate sees it in the incoming list and answers it on the invitation screen.
5. Invitations: the company creates an invitation with the "Invite" button of a search result, sends it, and keeps the address of the invitation page: it holds `invitation_id`. The prepared candidate accepts the invitation at `/candidate/invitations`, choosing the contacts and the consent C4, and the company reads the disclosed contacts on the same invitation page. The company's invitation list is still a placeholder, so keep the page address.
The step-by-step guide for eight minutes, with links to the screens, the logins, and the section "What is demonstration here" is on the stand at `/demo`; the start page has the button "Open the jury guide". The guide exists only in the demonstration stand build.
### 5. FSP, ML, and data
@@ -482,7 +484,7 @@ make -C deploy demo-reset DEMO_MODE=isolated
make -C deploy demo-down DEMO_MODE=isolated
```
- Every target requires `DEMO_MODE=isolated` and refuses before any Docker command without it. It acts only on the project `DEMO_PROJECT` (default `lincodex-demo`), whose name must contain `demo` and differ from `APP_PROJECT`; the ordinary project and its volumes are never addressed. The project is `docker-compose.yml` with `docker-compose.demo.yml`, built from the current sources unless a release manifest is selected (see below). The overlay sets `ASSESSMENT_DEMO_CATEGORIES_ENABLED=true` on the demo backend, so a full test taken there assigns an uncalibrated synthetic category like the prepared ones (see [Demonstration categories on a stand](#demonstration-categories-on-a-stand)). It reads the secrets from the root `.env` (`ENV_FILE`) and overrides the project name, networks, `APP_HTTP_PORT` (`DEMO_HTTP_PORT`, default 8090), `APP_PUBLIC_URL` (`DEMO_PUBLIC_URL`, default `http://localhost:8090`), and the pinned subnet (`DEMO_SUBNET` 172.29.84.0/24, `DEMO_FRONTEND_IP`), so it can run next to the ordinary stand. The bind address stays `APP_HTTP_BIND`. Behind the edge, set `DEMO_PUBLIC_URL` to the public origin. The mail transport is the one in `.env`; the prepared accounts need no mail.
- Every target requires `DEMO_MODE=isolated` and refuses before any Docker command without it. It acts only on the project `DEMO_PROJECT` (default `lincodex-demo`), whose name must contain `demo` and differ from `APP_PROJECT`; the ordinary project and its volumes are never addressed. The project is `docker-compose.yml` with `docker-compose.demo.yml`, built from the current sources unless a release manifest is selected (see below). The overlay sets `ASSESSMENT_DEMO_CATEGORIES_ENABLED=true` on the demo backend, so a full test taken there assigns an uncalibrated synthetic category like the prepared ones (see [Demonstration categories on a stand](#demonstration-categories-on-a-stand)). It reads the secrets from the root `.env` (`ENV_FILE`) and overrides the project name, networks, `APP_HTTP_PORT` (`DEMO_HTTP_PORT`, default 8090), `APP_PUBLIC_URL` (`DEMO_PUBLIC_URL`, default `http://localhost:8090`), and the pinned subnet (`DEMO_SUBNET` 172.29.84.0/24, `DEMO_FRONTEND_IP`), so it can run next to the ordinary stand. The bind address stays `APP_HTTP_BIND`. Behind the edge, set `DEMO_PUBLIC_URL` to the public origin. The mail transport is the one in `.env`; the prepared accounts need no mail. The overlay also builds the frontend with `VITE_DEMO_STAND=true`: the jury guide appears at `/demo`, the start page links to it, and a "Demonstration stand" banner marks every page. A stand restored from a release manifest (`RELEASE_ID`) uses the core frontend built without this flag, so it has no guide.
- `demo-seed` starts the project when needed, waits for the backend readiness (migrations and the startup policy are done by then), runs the `demo-seed seed` command in a separate container, and prints the inventory of the seeded records. A second run creates nothing and prints the same inventory. `demo-down` stops the project and keeps its volumes.
- `RELEASE_MANIFEST=<path>` or `RELEASE_ID=<id>` on `demo-seed` or `demo-reset` restores the stand from that immutable [release manifest](#release-manifest) instead of the current sources; `restore.demo.command` in the manifest gives the exact command. `release_manifest.py demo-override` first checks the manifest structure and its core and demo restore status, the hashes of the core and demo Compose files and of the data artifacts, and the exact local images, then writes a private temporary Compose override that pins every service and the `demo-seed` command to the recorded image IDs and digests. Compose starts with `--no-build --pull never`, the seed runs without `--build`, and after the readiness check the running containers are compared with the manifest. A manifest that cannot be restored stops the target before any Compose command. `demo-down` does not need the manifest.
- `demo-reset` first runs `demo-seed check-reset` against the demo database. It refuses, and deletes nothing, when the database holds any account outside the reserved domain `@demo.lincodex.test`, for example a visitor's own registration: such an account is ordinary data. Otherwise it removes the demo project with its volumes (`down --volumes` of `DEMO_PROJECT` only), starts it again, and seeds it. The demo overlay labels the PostgreSQL, SeaweedFS, and Kafka volumes with `org.lincodex.demo-mode=isolated` when it creates them; every target refuses a volume of the project without that label, so a volume of an ordinary stand is never adopted or discarded. A stand that the reset refuses can only be cleared by a deliberate manual decision of the operator.
+9 -7
View File
@@ -16,10 +16,10 @@
- Приватность: публикация анонимной карточки (C2), предпросмотр, статус поиска, скрытие организаций, история изменений и просмотров карточки.
- Кабинет работодателя: организации (один аккаунт может владеть несколькими и быть рекрутером в других), профиль компании, потребности с вилкой зарплаты, детерминированный поиск кандидатов по банку или по потребности без ML с объяснением компонентов, анонимная карточка и ее доказательства. Поиск доступен только владельцу организации.
- Обращения в поддержку в обоих кабинетах, в том числе запрос ручной оценки после отказа от C3.
- Inbox уведомлений в обоих кабинетах. В этой сборке ни один продуктовый сценарий еще не создает уведомлений, поэтому список пуст.
- Приглашения на стороне организации: создание черновика, список, чтение и изменение условий с версиями через API; экран приглашения открывается из поиска кандидатов, а список приглашений компании пока заготовка.
- Inbox уведомлений в обоих кабинетах. Доставленное приглашение создает уведомление кандидату; письмо о нем уходит только при `EMAIL_PROVIDER=resend`.
- Приглашения: организация создает черновик из результата поиска, меняет условия с версиями и отправляет приглашение. Кандидат видит его во входящих и принимает с согласием C4, выбрав контакты, или отказывается. После принятия организация читает переданные контакты на странице приглашения. Список приглашений компании пока заготовка.
Запланировано и не работает: отправка приглашения кандидату (API отвечает 501 `not_implemented`), отзыв, повышение зарплаты и выдача контактов, экран приглашений компании (сейчас заготовка), сброс пароля, письма о продуктовых уведомлениях, загрузка и разбор резюме, PDF, интеграция с ФСП, ML inference и смысловой поиск, адаптивный тест, практика в песочнице, перцентиль и откалиброванные грейды, транспорт SMTP.
Запланировано и не работает: отзыв приглашения и отмена участия кандидатом, повышение зарплаты (API отвечает 501 `not_implemented`), экран списка приглашений компании (сейчас заготовка), сброс пароля, письма о других продуктовых уведомлениях, загрузка и разбор резюме, PDF, интеграция с ФСП, ML inference и смысловой поиск, адаптивный тест, практика в песочнице, перцентиль и откалиброванные грейды, транспорт SMTP.
### Что нужно на машине
@@ -56,14 +56,14 @@ Docker Engine с Compose plugin, GNU make, python3 (цели `deploy` запус
### 2. Почта: Resend или disabled
- `EMAIL_PROVIDER=disabled` (значение `.env.example`) ничего не отправляет. Регистрация принимается (202), но подтвердить адрес нечем, поэтому вход такого аккаунта отвечает 403 `email_not_verified`. Подготовленным аккаунтам демонстрационного стенда почта не нужна.
- `EMAIL_PROVIDER=resend` отправляет письма подтверждения через Resend. Задайте `RESEND_API_KEY` только в окружении сервера и никогда не коммитьте его, укажите в `EMAIL_FROM` адрес на домене, подтвержденном в аккаунте Resend, а в `APP_PUBLIC_URL` - origin, который открывает пользователь: ссылка из письма ведет туда. Затем снова выполните `make -C deploy up`. Отправляются только письма подтверждения; квоты по умолчанию - 100 получателей в сутки и 3000 в месяц (см. [Почта](#почта) и [Квоты почты](#квоты-почты)). Настоящий Resend в репозитории не проверяется: браузерный тест `make -C deploy test-e2e-registration` проходит регистрацию через локальный Resend-совместимый inbox.
- `EMAIL_PROVIDER=resend` отправляет письма подтверждения через Resend. Задайте `RESEND_API_KEY` только в окружении сервера и никогда не коммитьте его, укажите в `EMAIL_FROM` адрес на домене, подтвержденном в аккаунте Resend, а в `APP_PUBLIC_URL` - origin, который открывает пользователь: ссылка из письма ведет туда. Затем снова выполните `make -C deploy up`. Отправляются письма подтверждения и письмо о новом приглашении; квоты по умолчанию - 100 получателей в сутки и 3000 в месяц (см. [Почта](#почта) и [Квоты почты](#квоты-почты)). Настоящий Resend в репозитории не проверяется: браузерный тест `make -C deploy test-e2e-registration` проходит регистрацию через локальный Resend-совместимый inbox.
- `EMAIL_PROVIDER=smtp` в этой сборке останавливает backend при запуске.
### 3. Демонстрационный стенд
make -C deploy demo-seed DEMO_MODE=isolated
Цели нужен корневой `.env` из шага 1: секреты и почтовый транспорт стенд берет из него, а имя проекта, порт, адрес и подсеть переопределяет. Команда запускает отдельный проект, ждет готовности backend, заполняет базу синтетическими данными и печатает перечень логинов; повторный запуск ничего не создает и печатает тот же перечень. Откройте http://localhost:8090.
Цели нужен корневой `.env` из шага 1: секреты и почтовый транспорт стенд берет из него, а имя проекта, порт, адрес и подсеть переопределяет. Команда запускает отдельный проект, ждет готовности backend, заполняет базу синтетическими данными и печатает перечень логинов; повторный запуск ничего не создает и печатает тот же перечень. Откройте http://localhost:8090; гид для жюри - по адресу http://localhost:8090/demo.
Пароль всех подготовленных аккаунтов - `DEMO_ACCOUNT_PASSWORD` из `deploy/demo/demo.env`, а без этого файла - из `deploy/demo/demo.env.example`. Значение из примера - опубликованные демонстрационные учетные данные синтетических аккаунтов, а не секрет. Для стенда, доступного извне, скопируйте пример в `demo.env`, задайте новый пароль, выполните `make -C deploy demo-reset DEMO_MODE=isolated` и передайте пароль жюри отдельно.
@@ -82,7 +82,9 @@ Docker Engine с Compose plugin, GNU make, python3 (цели `deploy` запус
2. Там же начните полный тест Backend Junior с Go: 25 заданий, срок 72 часа, две рабочие сессии, без практики. После завершения результат сравнивается с порогом демонстрационной политики; пройденный тест получает неоткалиброванную синтетическую категорию, непройденный - результат `not_confirmed`. Результат и история открываются в `/candidate/results`.
3. Подготовленный кандидат: войдите как `prepared-1@demo.lincodex.test` и откройте результаты, доказательства навыка и настройки приватности с опубликованной карточкой.
4. Работодатель: войдите как `employer-alpha@demo.lincodex.test`, выберите "Альфу", создайте потребность и откройте подбор (`/employer/candidates`). Основная группа содержит шесть подготовленных карточек с отметками `ml_unavailable` и `cohort_below_30`; карточка и ее доказательства открываются из выдачи. В "Бете" тот же аккаунт - рекрутер, и поиск отвечает 403: в минимальном выпуске искать может только владелец.
5. Приглашения: список приглашений компании - заготовка. Приглашение создается из результата поиска кандидатов; кандидат видит его во входящих и отвечает на экране приглашения.
5. Приглашения: компания создает приглашение кнопкой "Пригласить" в результате поиска, отправляет его и сохраняет адрес страницы: в нем `invitation_id`. Подготовленный кандидат принимает приглашение в `/candidate/invitations`, выбрав контакты и согласие C4, а компания читает переданные контакты на той же странице приглашения. Список приглашений компании пока заготовка, поэтому адрес страницы нужен.
Пошаговый гид на восемь минут со ссылками на экраны, логинами и разделом "Что здесь демонстрационное" открыт на стенде по адресу `/demo`; на главной есть кнопка "Открыть гид для жюри". Гид есть только в сборке демонстрационного стенда.
### 5. ФСП, ML и данные
@@ -484,7 +486,7 @@ make -C deploy demo-reset DEMO_MODE=isolated
make -C deploy demo-down DEMO_MODE=isolated
```
- Каждая цель требует `DEMO_MODE=isolated` и без него отказывает до любой команды Docker. Она работает только с проектом `DEMO_PROJECT` (по умолчанию `lincodex-demo`), имя которого должно содержать `demo` и отличаться от `APP_PROJECT`; к обычному проекту и его томам цели не обращаются. Проект собирается из `docker-compose.yml` и `docker-compose.demo.yml` по текущим исходникам, если не выбран манифест выпуска (см. ниже). Overlay включает `ASSESSMENT_DEMO_CATEGORIES_ENABLED=true` в демонстрационном backend, поэтому полный тест на нем присваивает неоткалиброванную синтетическую категорию, как и подготовленные попытки (см. [Демонстрационные категории на стенде](#демонстрационные-категории-на-стенде)). Секреты берутся из корневого `.env` (`ENV_FILE`), а имя проекта, сети, `APP_HTTP_PORT` (`DEMO_HTTP_PORT`, по умолчанию 8090), `APP_PUBLIC_URL` (`DEMO_PUBLIC_URL`, по умолчанию `http://localhost:8090`) и закрепленная подсеть (`DEMO_SUBNET` 172.29.84.0/24, `DEMO_FRONTEND_IP`) переопределяются, поэтому стенд может работать рядом с обычным. Адрес привязки остается `APP_HTTP_BIND`. За edge укажите в `DEMO_PUBLIC_URL` публичный origin. Почтовый транспорт берется из `.env`; подготовленным аккаунтам почта не нужна.
- Каждая цель требует `DEMO_MODE=isolated` и без него отказывает до любой команды Docker. Она работает только с проектом `DEMO_PROJECT` (по умолчанию `lincodex-demo`), имя которого должно содержать `demo` и отличаться от `APP_PROJECT`; к обычному проекту и его томам цели не обращаются. Проект собирается из `docker-compose.yml` и `docker-compose.demo.yml` по текущим исходникам, если не выбран манифест выпуска (см. ниже). Overlay включает `ASSESSMENT_DEMO_CATEGORIES_ENABLED=true` в демонстрационном backend, поэтому полный тест на нем присваивает неоткалиброванную синтетическую категорию, как и подготовленные попытки (см. [Демонстрационные категории на стенде](#демонстрационные-категории-на-стенде)). Секреты берутся из корневого `.env` (`ENV_FILE`), а имя проекта, сети, `APP_HTTP_PORT` (`DEMO_HTTP_PORT`, по умолчанию 8090), `APP_PUBLIC_URL` (`DEMO_PUBLIC_URL`, по умолчанию `http://localhost:8090`) и закрепленная подсеть (`DEMO_SUBNET` 172.29.84.0/24, `DEMO_FRONTEND_IP`) переопределяются, поэтому стенд может работать рядом с обычным. Адрес привязки остается `APP_HTTP_BIND`. За edge укажите в `DEMO_PUBLIC_URL` публичный origin. Почтовый транспорт берется из `.env`; подготовленным аккаунтам почта не нужна. Overlay также собирает фронтенд с `VITE_DEMO_STAND=true`: появляются гид для жюри на `/demo`, ссылка на него на главной и полоса "Демонстрационный стенд" на каждой странице. Стенд из манифеста выпуска (`RELEASE_ID`) берет фронтенд основного выпуска, собранный без этого флага, поэтому гида на нем нет.
- `demo-seed` при необходимости запускает проект, ждет готовности backend (к этому моменту миграции и стартовая политика уже применены), выполняет команду `demo-seed seed` в отдельном контейнере и печатает перечень созданных записей. Повторный запуск ничего не создает и печатает тот же перечень. `demo-down` останавливает проект и сохраняет тома.
- `RELEASE_MANIFEST=<path>` или `RELEASE_ID=<id>` у `demo-seed` или `demo-reset` восстанавливает стенд из этого неизменяемого [манифеста выпуска](#манифест-выпуска) вместо текущих исходников; точную команду дает `restore.demo.command` в манифесте. Сначала `release_manifest.py demo-override` проверяет структуру манифеста и статус восстановления core и демонстрационного стенда, хеши core и демонстрационных Compose-файлов и артефактов данных, а также точные локальные образы, затем пишет закрытый временный Compose override, который закрепляет каждый сервис и команду `demo-seed` за записанными image ID и digest. Compose запускается с `--no-build --pull never`, seed выполняется без `--build`, а после проверки готовности запущенные контейнеры сверяются с манифестом. Манифест, который нельзя восстановить, останавливает цель до любой команды Compose. Для `demo-down` манифест не нужен.
- `demo-reset` сначала выполняет `demo-seed check-reset` против демонстрационной базы. Цель отказывает и ничего не удаляет, если в базе есть хотя бы один аккаунт вне зарезервированного домена `@demo.lincodex.test`, например собственная регистрация посетителя: такой аккаунт - обычные данные. Иначе она удаляет демонстрационный проект вместе с томами (`down --volumes` только для `DEMO_PROJECT`), запускает его снова и заполняет. Overlay при создании помечает тома PostgreSQL, SeaweedFS и Kafka меткой `org.lincodex.demo-mode=isolated`; каждая цель отказывает при томе проекта без этой метки, поэтому том обычного стенда никогда не будет использован или удален. Стенд, сброс которого отклонен, очищается только сознательным ручным решением оператора.
+6
View File
@@ -2,6 +2,10 @@
# each one to the digest it resolved; the defaults keep the agreed tags.
ARG NODE_IMAGE=node:alpine
ARG NGINX_IMAGE=nginxinc/nginx-unprivileged:alpine
# Build-time mode of the static bundle. Only the overlays that serve synthetic
# demonstration data set it to "true" (the jury guide and its banner); the
# default build leaves those out.
ARG VITE_DEMO_STAND=false
FROM ${NODE_IMAGE} AS build
@@ -12,6 +16,8 @@ COPY frontend/package.json frontend/pnpm-lock.yaml frontend/pnpm-workspace.yaml
RUN pnpm install --frozen-lockfile
COPY frontend/ ./
ARG VITE_DEMO_STAND
ENV VITE_DEMO_STAND=${VITE_DEMO_STAND}
RUN pnpm run build
FROM ${NGINX_IMAGE}
+77
View File
@@ -0,0 +1,77 @@
import { expect, test, type Page } from "@playwright/test";
// The jury guide and the demonstration banner exist only in a build made with
// VITE_DEMO_STAND=true. The browser suite builds that way (docker-compose.e2e.yml),
// while release E2E runs release images built without the flag. The spec
// reads the build from the landing page and checks the guide where it is
// served, and its absence where it is not. No demonstration data is needed:
// the guide only links to screens, and this spec does not sign in.
const guideLink = "Открыть гид для жюри";
const notFound = /Страница не найдена/;
async function isDemoBuild(page: Page): Promise<boolean> {
await page.goto("/");
await expect(
page.getByRole("heading", { level: 1, name: "Протокол подтвержденных навыков" }),
).toBeVisible();
return (await page.getByRole("link", { name: guideLink }).count()) > 0;
}
test("the start page offers the jury guide and the banner only in a demonstration build", async ({
page,
}) => {
const demo = await isDemoBuild(page);
if (demo) {
await expect(page.getByRole("heading", { level: 2, name: "Для жюри" })).toBeVisible();
await expect(page.getByText("Демонстрационный стенд.")).toBeVisible();
} else {
await expect(page.getByText("Демонстрационный стенд.")).toHaveCount(0);
await expect(page.getByRole("heading", { name: "Для жюри" })).toHaveCount(0);
}
});
test("the guide route serves the memo in a demonstration build and not-found elsewhere", async ({
page,
}) => {
const demo = await isDemoBuild(page);
await page.goto("/demo");
if (!demo) {
await expect(page.getByRole("heading", { level: 1, name: notFound })).toBeVisible();
return;
}
await expect(page.getByRole("heading", { level: 1, name: "Гид для жюри" })).toBeVisible();
await expect(page.getByText("Демонстрационный стенд.")).toBeVisible();
for (const heading of [
"Что такое Lincodex",
"Маршрут за восемь минут",
"Что здесь демонстрационное",
"Что работает без имитации",
"Логины и пароль",
"Ограничения стенда",
]) {
await expect(page.getByRole("heading", { level: 2, name: heading })).toBeVisible();
}
await expect(page.getByText("candidate@demo.lincodex.test").first()).toBeVisible();
await expect(page.getByText("DEMO_ACCOUNT_PASSWORD").first()).toBeVisible();
});
test("every link of the guide opens a page of the application", async ({ page }) => {
const demo = await isDemoBuild(page);
test.skip(!demo, "The guide is not served by this build.");
await page.goto("/demo");
const hrefs = await page
.locator("main ol a[href^='/']")
.evaluateAll((links) => [...new Set(links.map((link) => link.getAttribute("href") ?? ""))]);
expect(hrefs.length).toBeGreaterThan(0);
for (const href of hrefs) {
await page.goto(href);
await expect(page.getByRole("heading", { level: 1 }).first()).toBeVisible();
await expect(page.getByRole("heading", { level: 1, name: notFound })).toHaveCount(0);
}
});
@@ -0,0 +1,58 @@
import { renderToString } from "react-dom/server";
import {
StaticRouterProvider,
createStaticHandler,
createStaticRouter,
matchRoutes,
} from "react-router-dom";
import { describe, expect, it } from "vitest";
import { guideRoles } from "../../pages/jury-guide";
import { createRoutes } from "./routes";
async function renderPath(path: string, demo: boolean): Promise<string> {
const handler = createStaticHandler(createRoutes({ demo }));
const context = await handler.query(new Request(`http://localhost${path}`));
if (context instanceof Response) throw new Error(`Unexpected response for ${path}`);
const router = createStaticRouter(handler.dataRoutes, context);
return renderToString(<StaticRouterProvider router={router} context={context} hydrate={false} />);
}
describe("demonstration stand routes", () => {
it("serves the jury guide and the banner only in a demo build", async () => {
expect(await renderPath("/demo", true)).toMatch(/<h1[^>]*>Гид для жюри<\/h1>/);
expect(await renderPath("/demo", false)).toMatch(/<h1[^>]*>Страница не найдена<\/h1>/);
expect(await renderPath("/", true)).toContain("Демонстрационный стенд.");
expect(await renderPath("/", false)).not.toContain("Демонстрационный стенд.");
});
it("links the jury guide from the landing page only in a demo build", async () => {
const demo = await renderPath("/", true);
const production = await renderPath("/", false);
expect(demo).toMatch(/<a[^>]*href="\/demo"[^>]*>Открыть гид для жюри<\/a>/);
expect(production).not.toContain("Открыть гид для жюри");
expect(production).not.toContain('href="/demo"');
});
it("keeps the skip link as the first link of a demo page", async () => {
const html = await renderPath("/", true);
const firstLink = html.match(/<a[^>]*>(.*?)<\/a>/);
expect(firstLink?.[0]).toContain('href="#main-content"');
});
it("resolves every link of the guide to a page of the router, not to not-found", () => {
const routes = createRoutes({ demo: true });
const links = guideRoles.flatMap((role) =>
role.steps.flatMap((step) => (step.link ? [step.link.to] : [])),
);
expect(links.length).toBeGreaterThan(0);
for (const to of links) {
const matches = matchRoutes(routes, to);
expect(matches, to).not.toBeNull();
expect(matches?.at(-1)?.route.path, to).not.toBe("*");
}
});
});
+128 -117
View File
@@ -12,6 +12,7 @@ import { PrivacyPage } from "../../pages/privacy";
import { SessionGate } from "../../entities/session";
import { MatchesPage } from "../../pages/matches";
import { InvitationComposePage } from "../../pages/invitation-compose";
import { JuryGuidePage } from "../../pages/jury-guide";
import { NotFoundPage } from "../../pages/not-found";
import { NeedEditorPage } from "../../pages/need-editor";
import { NeedListPage } from "../../pages/needs";
@@ -27,7 +28,7 @@ import {
SupportCasesPage,
} from "../../pages/support-cases";
import { WelcomePage } from "../../pages/welcome";
import { paths } from "../../shared/config";
import { paths, standMode, type StandMode } from "../../shared/config";
import { CandidateShell } from "../../widgets/candidate-shell";
import { EmployerShell } from "../../widgets/employer-shell";
import { PublicShell } from "../../widgets/public-shell";
@@ -38,120 +39,130 @@ import { SupportRoute } from "./support-route";
/**
* Route tree with public pages and role-specific cabinets. Protected shells
* restore the server session before they render any cabinet child.
* restore the server session before they render any cabinet child. The jury
* guide and the demonstration banner exist only in a demo build; elsewhere
* the guide path answers with the not-found page.
*/
export const routes: RouteObject[] = [
{
element: <RootLayout />,
errorElement: <RouteErrorPage />,
children: [
{
element: <PublicShell />,
children: [
{ index: true, element: <WelcomePage /> },
{ path: paths.login, element: <LoginPage /> },
{ path: paths.register, element: <RegisterPage /> },
{ path: paths.verifyEmail, element: <VerifyEmailPage /> },
{ path: paths.support, element: <SupportRoute /> },
{ path: paths.status, element: <StatusPage /> },
{ path: "*", element: <NotFoundPage /> },
],
},
{
path: paths.candidate.root,
element: <CandidateShell />,
children: [
{
element: <SessionGate scenario="candidate" />,
children: [
{ index: true, element: <CandidateHomeRoute /> },
{ path: paths.candidate.onboarding, element: <CandidateOnboardingPage /> },
{
path: paths.candidate.profile,
element: <ProfilePage />,
},
{
path: paths.candidate.questionnaire,
element: <QuestionnairePage />,
},
{
path: paths.candidate.assessment,
element: <AssessmentPage />,
},
{
path: `${paths.candidate.assessment}/:attemptId`,
element: <AssessmentAttemptPage />,
},
{ path: paths.candidate.results, element: <AssessmentResultsPage /> },
{ path: `${paths.candidate.results}/:attemptId`, element: <AssessmentResultPage /> },
{ path: paths.candidate.invitations, element: <CandidateInvitationsPage /> },
{
path: `${paths.candidate.invitations}/:invitationId`,
element: <CandidateInvitationPage />,
},
{ path: paths.candidate.notifications, element: <CandidateNotificationsPage /> },
{
path: paths.candidate.privacy,
element: <PrivacyPage />,
},
{ path: paths.candidate.supportCases, element: <SupportCasesPage /> },
{ path: paths.candidate.supportNew, element: <CreateSupportCasePage /> },
{ path: paths.candidate.supportManual, element: <ManualAssessmentPage /> },
{
path: `${paths.candidate.supportCases}/:caseId`,
element: <SupportCaseDetailPage />,
},
{
path: "*",
element: (
<NotFoundPage homePath={paths.candidate.root} homeLabel="В кабинет кандидата" />
),
},
],
},
],
},
{
path: paths.employer.root,
element: <EmployerShell />,
children: [
{
element: <SessionGate scenario="employer" />,
children: [
{ index: true, loader: () => redirect(paths.employer.company) },
{
path: paths.employer.company,
element: <CompanyPage />,
},
{ path: paths.employer.needs, element: <NeedListPage /> },
{ path: `${paths.employer.needs}/new`, element: <NeedEditorPage /> },
{ path: `${paths.employer.needs}/:needId`, element: <NeedEditorPage /> },
{ path: paths.employer.supportCases, element: <SupportCasesPage /> },
{ path: paths.employer.supportNew, element: <CreateSupportCasePage /> },
{
path: `${paths.employer.supportCases}/:caseId`,
element: <SupportCaseDetailPage />,
},
{ path: paths.employer.candidates, element: <MatchesPage /> },
{
path: paths.employer.invitations,
element: <PlaceholderPage screen="employerInvitations" />,
},
{ path: paths.employer.invitationNew, element: <InvitationComposePage /> },
{ path: paths.employer.notifications, element: <EmployerNotificationsPage /> },
{
path: "*",
element: (
<NotFoundPage
homePath={paths.employer.company}
homeLabel="В кабинет работодателя"
/>
),
},
],
},
],
},
],
},
];
export function createRoutes(stand: StandMode = standMode): RouteObject[] {
return [
{
element: <RootLayout demoStand={stand.demo} />,
errorElement: <RouteErrorPage />,
children: [
{
element: <PublicShell />,
children: [
{ index: true, element: <WelcomePage demoStand={stand.demo} /> },
{ path: paths.login, element: <LoginPage /> },
{ path: paths.register, element: <RegisterPage /> },
{ path: paths.verifyEmail, element: <VerifyEmailPage /> },
{ path: paths.support, element: <SupportRoute /> },
{ path: paths.status, element: <StatusPage /> },
...(stand.demo ? [{ path: paths.demoGuide, element: <JuryGuidePage /> }] : []),
{ path: "*", element: <NotFoundPage /> },
],
},
{
path: paths.candidate.root,
element: <CandidateShell />,
children: [
{
element: <SessionGate scenario="candidate" />,
children: [
{ index: true, element: <CandidateHomeRoute /> },
{ path: paths.candidate.onboarding, element: <CandidateOnboardingPage /> },
{
path: paths.candidate.profile,
element: <ProfilePage />,
},
{
path: paths.candidate.questionnaire,
element: <QuestionnairePage />,
},
{
path: paths.candidate.assessment,
element: <AssessmentPage />,
},
{
path: `${paths.candidate.assessment}/:attemptId`,
element: <AssessmentAttemptPage />,
},
{ path: paths.candidate.results, element: <AssessmentResultsPage /> },
{
path: `${paths.candidate.results}/:attemptId`,
element: <AssessmentResultPage />,
},
{ path: paths.candidate.invitations, element: <CandidateInvitationsPage /> },
{
path: `${paths.candidate.invitations}/:invitationId`,
element: <CandidateInvitationPage />,
},
{ path: paths.candidate.notifications, element: <CandidateNotificationsPage /> },
{
path: paths.candidate.privacy,
element: <PrivacyPage />,
},
{ path: paths.candidate.supportCases, element: <SupportCasesPage /> },
{ path: paths.candidate.supportNew, element: <CreateSupportCasePage /> },
{ path: paths.candidate.supportManual, element: <ManualAssessmentPage /> },
{
path: `${paths.candidate.supportCases}/:caseId`,
element: <SupportCaseDetailPage />,
},
{
path: "*",
element: (
<NotFoundPage homePath={paths.candidate.root} homeLabel="В кабинет кандидата" />
),
},
],
},
],
},
{
path: paths.employer.root,
element: <EmployerShell />,
children: [
{
element: <SessionGate scenario="employer" />,
children: [
{ index: true, loader: () => redirect(paths.employer.company) },
{
path: paths.employer.company,
element: <CompanyPage />,
},
{ path: paths.employer.needs, element: <NeedListPage /> },
{ path: `${paths.employer.needs}/new`, element: <NeedEditorPage /> },
{ path: `${paths.employer.needs}/:needId`, element: <NeedEditorPage /> },
{ path: paths.employer.supportCases, element: <SupportCasesPage /> },
{ path: paths.employer.supportNew, element: <CreateSupportCasePage /> },
{
path: `${paths.employer.supportCases}/:caseId`,
element: <SupportCaseDetailPage />,
},
{ path: paths.employer.candidates, element: <MatchesPage /> },
{
path: paths.employer.invitations,
element: <PlaceholderPage screen="employerInvitations" />,
},
{ path: paths.employer.invitationNew, element: <InvitationComposePage /> },
{ path: paths.employer.notifications, element: <EmployerNotificationsPage /> },
{
path: "*",
element: (
<NotFoundPage
homePath={paths.employer.company}
homeLabel="В кабинет работодателя"
/>
),
},
],
},
],
},
],
},
];
}
export const routes: RouteObject[] = createRoutes();
+8 -1
View File
@@ -1,10 +1,17 @@
import { Outlet, ScrollRestoration } from "react-router-dom";
import { DemoStandBanner } from "../../widgets/demo-stand-banner";
type RootLayoutProps = {
/** True only in a demo build; the banner marks synthetic data on every page. */
demoStand?: boolean;
};
/** Top route element shared by every route group. */
export function RootLayout() {
export function RootLayout({ demoStand = false }: RootLayoutProps) {
return (
<>
<ScrollRestoration />
{demoStand ? <DemoStandBanner /> : null}
<Outlet />
</>
);
@@ -1,13 +1,17 @@
import { ApiRequestError, invalidResponseCode } from "../../../shared/api";
import {
createOrganizationInvitation,
getGetOrganizationInvitationContactsQueryKey,
getGetOrganizationInvitationQueryKey,
getOrganizationInvitation,
getOrganizationInvitationContacts,
sendOrganizationInvitation,
updateOrganizationInvitation,
} from "../../../shared/api/endpoints/invitation/invitation";
import {
ContactDisclosure as contactDisclosureSchema,
OrganizationInvitation as organizationInvitationSchema,
type ContactDisclosure,
type OrganizationInvitation,
type OrganizationInvitationCreate,
type OrganizationInvitationUpdate,
@@ -100,8 +104,30 @@ export async function readOrganizationInvitation(
);
}
/**
* Reads the contacts that an active grant of an accepted invitation covers.
* The server answers 404 when no grant is readable, which the caller shows as
* "not available" without asking for a reason.
*/
export async function readInvitationContacts(
organizationId: string,
invitationId: string,
signal: AbortSignal | undefined = undefined,
): Promise<ContactDisclosure> {
const parsed = contactDisclosureSchema.safeParse(
await getOrganizationInvitationContacts(organizationId, invitationId, signal ? { signal } : {}),
);
if (!parsed.success) throw invalidResponse();
return parsed.data;
}
/** Invitation reads stay separate for each signed-in account. */
export const invitationQueryKeys = {
detail: (accountId: string, organizationId: string, invitationId: string) =>
[...getGetOrganizationInvitationQueryKey(organizationId, invitationId), accountId] as const,
contacts: (accountId: string, organizationId: string, invitationId: string) =>
[
...getGetOrganizationInvitationContactsQueryKey(organizationId, invitationId),
accountId,
] as const,
};
@@ -7,10 +7,12 @@
export {
createInvitationDraft,
invitationQueryKeys,
readInvitationContacts,
readOrganizationInvitation,
sendInvitationDraft,
updateInvitationDraft,
} from "./api/organization-invitations";
export { contactRows, type ContactRow } from "./model/contact-disclosure";
export {
acceptCandidateInvitation,
candidateInvitationQueryKeys,
@@ -0,0 +1,38 @@
import { describe, expect, it } from "vitest";
import type { ContactDisclosure } from "../../../shared/api/schemas";
import { contactRows } from "./contact-disclosure";
const base: ContactDisclosure = {
invitation_id: "01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e60",
grant_id: "01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e61",
fields: ["email"],
granted_at: "2026-10-09T10:00:00Z",
full_name: null,
email: "candidate@example.test",
phone: null,
telegram: null,
};
describe("contactRows", () => {
it("lists only the kinds the grant covers", () => {
expect(contactRows(base)).toEqual([
{ kind: "email", label: "Электронная почта", value: "candidate@example.test" },
]);
});
it("keeps the contract order of the kinds whatever order the server sends them in", () => {
const rows = contactRows({ ...base, fields: ["telegram", "full_name", "email"] });
expect(rows.map((row) => row.kind)).toEqual(["full_name", "email", "telegram"]);
});
it("shows a covered kind with a null value when the profile no longer holds it", () => {
const rows = contactRows({ ...base, fields: ["phone"], phone: null });
expect(rows).toEqual([{ kind: "phone", label: "Телефон", value: null }]);
});
it("returns no rows for a grant that covers nothing", () => {
expect(contactRows({ ...base, fields: [] })).toEqual([]);
});
});
@@ -0,0 +1,30 @@
import type { ContactDisclosure, ContactFieldKind } from "../../../shared/api/schemas";
import { contactKindLabels, orderedContactKinds } from "./candidate-labels";
export type ContactRow = {
readonly kind: ContactFieldKind;
readonly label: string;
/** Null when the grant covers the kind but the profile no longer holds the value. */
readonly value: string | null;
};
const valueOf: Readonly<
Record<ContactFieldKind, (disclosure: ContactDisclosure) => string | null>
> = {
full_name: (disclosure) => disclosure.full_name,
email: (disclosure) => disclosure.email,
phone: (disclosure) => disclosure.phone,
telegram: (disclosure) => disclosure.telegram,
};
/**
* Rows for the kinds that the grant covers, in contract order. A kind outside
* the grant gets no row, so nothing reads as "not disclosed" by accident.
*/
export function contactRows(disclosure: ContactDisclosure): ContactRow[] {
return orderedContactKinds(disclosure.fields).map((kind) => ({
kind,
label: contactKindLabels[kind],
value: valueOf[kind](disclosure),
}));
}
@@ -67,6 +67,12 @@
line-height: var(--line-height-body);
}
.subtitle {
margin: 0;
font-size: var(--font-size-l);
font-weight: var(--font-weight-bold);
}
.notice {
margin: 0;
padding: var(--space-3);
@@ -53,6 +53,7 @@ import {
type InvitationPreviewSnapshot,
} from "../../../features/send-invitation";
import { InvitationPreview } from "../../../widgets/invitation-preview";
import { InvitationContacts } from "./invitation-contacts";
import styles from "./invitation-compose-page.module.css";
function isAccessLoss(error: unknown): error is ApiRequestError {
@@ -85,13 +86,23 @@ function cardFallbackOf(organization: OrganizationQuery) {
}
type SentInvitationProps = {
accountId: string;
invitation: OrganizationInvitation;
organization: OrganizationQuery;
organizationId: string;
};
/** The invitation after sending, with the state and the deadline the server stored. */
function SentInvitation({ invitation, organization, organizationId }: SentInvitationProps) {
/**
* The invitation after sending, with the state and the deadline the server
* stored. Once the candidate accepts, the contacts the grant covers are read
* here; before that the server has none to show.
*/
function SentInvitation({
accountId,
invitation,
organization,
organizationId,
}: SentInvitationProps) {
const headingRef = useRef<HTMLHeadingElement>(null);
useEffect(() => {
@@ -145,6 +156,13 @@ function SentInvitation({ invitation, organization, organizationId }: SentInvita
Срок ответа задал сервер при доставке; письмо кандидату его не сдвигает. Контакты кандидата
появятся только после принятия приглашения.
</p>
{invitation.state === "accepted" ? (
<InvitationContacts
accountId={accountId}
organizationId={organizationId}
invitationId={invitation.id}
/>
) : null}
<InvitationPreview
title="Отправленные условия"
card={organization.data?.candidate_card ?? null}
@@ -253,7 +271,12 @@ function InvitationWorkspace({
return (
<>
{header}
<SentInvitation invitation={sent} organization={company} organizationId={organizationId} />
<SentInvitation
accountId={accountId}
invitation={sent}
organization={company}
organizationId={organizationId}
/>
</>
);
}
@@ -300,6 +323,7 @@ function InvitationWorkspace({
<>
{header}
<SentInvitation
accountId={accountId}
invitation={resume.data}
organization={company}
organizationId={organizationId}
@@ -0,0 +1,76 @@
import { useQuery } from "@tanstack/react-query";
import { useId } from "react";
import { ApiRequestError } from "../../../shared/api";
import {
contactRows,
invitationQueryKeys,
readInvitationContacts,
} from "../../../entities/invitation";
import { ErrorState, LoadingState } from "../../../shared/ui";
import styles from "./invitation-compose-page.module.css";
type InvitationContactsProps = {
accountId: string;
organizationId: string;
invitationId: string;
};
/**
* Contacts that the candidate disclosed with an accepted invitation. The
* server answers 404 while no grant is readable, and it does not say why, so
* that answer is shown as "not available" with the possible reasons. Every
* open reads again, so a revoked grant closes on the next read.
*/
export function InvitationContacts({
accountId,
organizationId,
invitationId,
}: InvitationContactsProps) {
const headingId = useId();
const contacts = useQuery({
queryKey: invitationQueryKeys.contacts(accountId, organizationId, invitationId),
queryFn: ({ signal }) => readInvitationContacts(organizationId, invitationId, signal),
gcTime: 0,
staleTime: 0,
refetchOnWindowFocus: "always",
retry: false,
});
const error = contacts.error;
return (
<section className={styles.result} aria-labelledby={headingId}>
<h3 id={headingId} className={styles.subtitle}>
Контакты кандидата
</h3>
{contacts.isPending ? <LoadingState label="Читаем переданные контакты..." /> : null}
{contacts.isError && error instanceof ApiRequestError && error.status === 404 ? (
<p className={styles.hint} role="status">
Контакты пока недоступны. Кандидат может еще не принять приглашение, отозвать передачу
контактов или закрыть профиль для этой компании. Сервер не сообщает причину.
</p>
) : null}
{contacts.isError && !(error instanceof ApiRequestError && error.status === 404) ? (
<ErrorState
error={error}
title="Не удалось прочитать контакты"
isRetrying={contacts.isFetching}
onRetry={() => void contacts.refetch()}
/>
) : null}
{contacts.data ? (
contactRows(contacts.data).length === 0 ? (
<p className={styles.hint}>Кандидат не передал ни одного контакта.</p>
) : (
<dl className={styles.summary}>
{contactRows(contacts.data).map((row) => (
<div key={row.kind} className={styles.fact}>
<dt>{row.label}</dt>
<dd>{row.value ?? "Профиль больше не содержит это поле"}</dd>
</div>
))}
</dl>
)
) : null}
</section>
);
}
+2
View File
@@ -0,0 +1,2 @@
export { JuryGuidePage } from "./ui/jury-guide-page";
export { guideRoles } from "./model/guide";
@@ -0,0 +1,156 @@
import { paths } from "../../../shared/config";
/** One screen the jury opens from a step. `to` is a router path, never a query-bearing URL. */
export type GuideLink = {
readonly label: string;
readonly to: string;
};
export type GuideStep = {
readonly text: string;
/** Null when the step is done on a screen that has no stable address. */
readonly link: GuideLink | null;
};
/** A block of steps played with one account. */
export type GuideRole = {
readonly title: string;
readonly account: string;
readonly steps: readonly GuideStep[];
};
export const demoAccountDomain = "demo.lincodex.test";
/**
* The eight-minute route in the order a jury member plays it. Each block names
* the account to sign in with, so the two roles alternate without guidance.
*/
export const guideRoles: readonly GuideRole[] = [
{
title: "Кандидат: самостоятельная проверка",
account: `candidate@${demoAccountDomain}`,
steps: [
{
text: "Войдите под логином кандидата. Пароль указан в разделе «Логины» ниже. После входа откроется сохраненный шаг «Первые шаги» с согласиями: они уже выданы стендом, поэтому дальше переходите по ссылкам гида.",
link: { label: "Открыть вход", to: paths.login },
},
{
text: "На странице проверки нажмите «Начать демонстрацию». Экспресс-запуск занимает 3-5 минут и состоит из трех заданий. Итог не присваивает уровень: на экране есть пометка «Демонстрация без реального грейда», а результат не попадает в историю реальных проверок.",
link: { label: "Открыть проверку знаний", to: paths.candidate.assessment },
},
{
text: "На той же странице посмотрите полную проверку Backend, Junior, Go: 25 заданий, срок 72 часа, без практики. Кнопка «Начать полную проверку» видна, но ее можно не нажимать: запуск создает попытку на стенде.",
link: { label: "Открыть полную проверку", to: paths.candidate.assessment },
},
],
},
{
title: "Кандидат с подготовленным результатом",
account: `prepared-1@${demoAccountDomain}`,
steps: [
{
text: "Войдите как prepared-1. В профиле нет ФСП ID: профиль заполнен вручную, а строка опыта помечена как синтетический профиль.",
link: { label: "Открыть профиль", to: paths.candidate.profile },
},
{
text: "В результатах полный тест Backend, Junior, Go уже пройден. Категория помечена как демонстрационная: происхождение решения - синтетическая демонстрация стенда, пороги не калиброваны.",
link: { label: "Открыть результаты", to: paths.candidate.results },
},
{
text: "В настройках приватности карточка опубликована. Предпросмотр показывает доказательство навыка с пометкой «Демонстрационное подтверждение».",
link: { label: "Открыть настройки приватности", to: paths.candidate.privacy },
},
],
},
{
title: "Работодатель: потребность, подбор и приглашение",
account: `employer-alpha@${demoAccountDomain}`,
steps: [
{
text: "Войдите как employer-alpha. Организация «Альфа» выбирается сама: этот аккаунт ее владелец. Нажмите «Создать потребность» и заполните название, специализацию Backend, грейд Junior, обязательный навык Go и зарплатную вилку с базой суммы (до налога), затем нажмите «Создать потребность» внизу формы.",
link: { label: "Открыть потребности", to: paths.employer.needs },
},
{
text: "Откройте подбор кандидатов по этой потребности и нажмите «Найти кандидатов»: в основной группе шесть подготовленных карточек. Нажмите «Показать объяснение»: смысловая близость нейтральна (0,50) и помечена «смысловой анализ недоступен», потому что ML на стенде не работает. Остальные компоненты посчитал сервер.",
link: { label: "Открыть подбор", to: paths.employer.candidates },
},
{
text: "Нажмите «Пригласить» у одного из подготовленных кандидатов. Большая часть условий уже заполнена из потребности; выберите тип предложения и канал связи, отметьте хотя бы один формат работы и для каждого условия пакета укажите «Предусмотрено» с описанием. Затем нажмите «Отправить приглашение» и сохраните адрес страницы: в нем invitation_id, по нему открывается приглашение после ответа кандидата.",
link: null,
},
],
},
{
title: "Кандидат отвечает на приглашение",
account: `prepared-1@${demoAccountDomain}`,
steps: [
{
text: "Войдите как prepared-1 и откройте приглашения. Откройте приглашение от «Альфы», отметьте только электронную почту, подтвердите текст согласия C4 и нажмите «Принять и передать контакты».",
link: { label: "Открыть приглашения", to: paths.candidate.invitations },
},
],
},
{
title: "Работодатель читает переданный контакт",
account: `employer-alpha@${demoAccountDomain}`,
steps: [
{
text: "Войдите как employer-alpha и откройте сохраненный адрес приглашения. Блок «Контакты кандидата» показывает только то, что кандидат выбрал: электронную почту. Другие виды контактов в нем не выводятся.",
link: null,
},
],
},
];
export type GuideAccount = {
readonly login: string;
readonly role: string;
readonly purpose: string;
};
/** The synthetic accounts the seed creates; the password is shared by all of them. */
export const guideAccounts: readonly GuideAccount[] = [
{
login: `candidate@${demoAccountDomain}`,
role: "Кандидат без попыток",
purpose: "Экспресс-запуск и полная проверка",
},
{
login: `prepared-1@${demoAccountDomain} - prepared-6@${demoAccountDomain}`,
role: "Кандидат с подготовленным полным результатом и опубликованной карточкой",
purpose: "Результат, приватность, приглашение и ответ на него",
},
{
login: `employer-alpha@${demoAccountDomain}`,
role: "Владелец «Альфы», рекрутер «Беты»",
purpose: "Потребность, подбор, приглашение и чтение контакта",
},
{
login: `employer-beta@${demoAccountDomain}`,
role: "Владелец «Беты»",
purpose: "Второй работодатель для сравнения доступа",
},
];
/** Items that only simulate the product; each one is named as a simulation. */
export const demonstrationItems: readonly string[] = [
"Все люди на стенде синтетические: кандидаты, компании и их описания вымышлены. Адреса на домене demo.lincodex.test никогда не получают почту.",
"Подготовленные полные результаты созданы командой demo-seed обычными операциями попытки. Ответы выбраны заранее, а проходила их команда стенда, а не кандидат.",
"Категория «Демонстрационное подтверждение» (источник synthetic_demo) не калибрована и не измеряет навык. Банк заданий синтетический и предметной проверки не проходил.",
"Экспресс-запуск показывает механику проверки. Он не присваивает грейд, не создает категорию и не дает доказательства навыка.",
"ML на стенде не вызывается: смысловая близость нейтральна (0,50), а карточки помечены «смысловой анализ недоступен». ФСП не подключен ни в каком режиме, профиль заполняется вручную.",
"На стенде нет видеоматериалов: экран показывает работающий интерфейс на синтетических данных, а не запись.",
];
/** Behaviour that is real code on the stand, not a simulation. */
export const workingItems: readonly string[] = [
"Регистрация, вход, согласия C1-C5, профиль, анкета, настройки приватности и обращения в поддержку работают как в рабочей сборке.",
"Полный тест идет по серверным правилам: попытка, ответы, срок и завершение, а итог считает политика, без ручного вмешательства.",
"Подбор и объяснение позиции считает сервер детерминированно, без ML. Приглашения, принятие и отказ с согласием C4 и чтение раскрытых контактов работают на синтетических данных.",
];
export const guideLimits: readonly string[] = [
"Почта на стенде может быть отключена: новая регистрация не подтверждается, но маршрут на почту не опирается.",
"Список приглашений компании пока заготовка, поэтому приглашение открывается по сохраненному адресу страницы.",
"Не регистрируйте на стенде реальных людей и не вводите реальные данные.",
];
@@ -0,0 +1,80 @@
.roles,
.steps,
.list {
display: grid;
gap: var(--space-4);
margin: 0;
padding: 0;
list-style: none;
}
.role {
display: grid;
gap: var(--space-2);
padding: var(--space-4) 0 var(--space-4) var(--space-4);
border-left: var(--line-strong) solid var(--color-accent);
}
.role-title {
margin: 0;
font-size: var(--font-size-l);
font-weight: var(--font-weight-bold);
line-height: var(--line-height-snug);
}
.account {
margin: 0;
color: var(--color-text-secondary);
font-size: var(--font-size-s);
}
/* Continues the numbering from the previous block through the start attribute. */
.steps {
gap: var(--space-3);
padding-left: var(--space-5);
list-style: decimal;
}
.steps li {
padding-left: var(--space-1);
}
.steps p {
margin: 0 0 var(--space-1);
}
.list {
gap: var(--space-2);
padding-left: var(--space-4);
list-style: disc;
}
.table-wrap {
overflow-x: auto;
}
.table {
width: 100%;
border-collapse: collapse;
font-size: var(--font-size-s);
}
.table th,
.table td {
padding: var(--space-2);
border-bottom: var(--line-thin) solid var(--color-divider);
text-align: left;
vertical-align: top;
}
.table code {
overflow-wrap: anywhere;
font-family: var(--font-mono);
font-size: var(--font-size-xs);
}
.account code {
overflow-wrap: anywhere;
font-family: var(--font-mono);
font-size: var(--font-size-xs);
}
@@ -0,0 +1,98 @@
import { renderToString } from "react-dom/server";
import { StaticRouter } from "react-router-dom";
import { describe, expect, it } from "vitest";
import { guideRoles } from "../model/guide";
import { JuryGuidePage } from "./jury-guide-page";
function render(): string {
return renderToString(
<StaticRouter location="/demo">
<JuryGuidePage />
</StaticRouter>,
);
}
function hrefs(html: string): string[] {
return [...html.matchAll(/<a[^>]*href="([^"]+)"/g)].map((match) => match[1] ?? "");
}
describe("jury guide page", () => {
it("renders one heading with the demonstration eyebrow and the memo title", () => {
const html = render();
expect(html.match(/<h1[\s>]/g)?.length).toBe(1);
expect(html).toMatch(/<h1[^>]*>Гид для жюри<\/h1>/);
expect(html).toContain("Демонстрационный стенд");
});
it("explains the product in the first section", () => {
const html = render();
expect(html).toContain("Что такое Lincodex");
expect(html).toContain("Заявленный уровень в анкете остается самооценкой");
});
it("separates the demonstration simulations from the working functionality", () => {
const html = render();
const simulations = html.indexOf("Что здесь демонстрационное");
const working = html.indexOf("Что работает без имитации");
expect(simulations).toBeGreaterThan(0);
expect(working).toBeGreaterThan(simulations);
expect(html).toContain("синтетические");
expect(html).toContain("не калибрована");
expect(html).toContain("смысловой анализ недоступен");
expect(html).toContain("ФСП не подключен");
expect(html).toContain("Экспресс-запуск показывает механику проверки");
});
it("numbers the route across the role blocks in one continuous sequence", () => {
const html = render();
const starts = [...html.matchAll(/<ol class="[^"]*" start="(\d+)">/g)].map((match) =>
Number(match[1]),
);
const lastBlock = guideRoles.at(-1)!;
expect(starts).toHaveLength(guideRoles.length);
expect(starts[0]).toBe(1);
expect(starts.at(-1)).toBe(
guideRoles.slice(0, -1).reduce((total, role) => total + role.steps.length, 0) + 1,
);
expect(lastBlock.steps.length).toBeGreaterThan(0);
});
it("names the account of every role block", () => {
const html = render();
expect(html).toContain("candidate@demo.lincodex.test");
expect(html).toContain("prepared-1@demo.lincodex.test");
expect(html).toContain("employer-alpha@demo.lincodex.test");
});
it("shows where the password comes from without printing its value", () => {
const html = render();
expect(html).toContain("DEMO_ACCOUNT_PASSWORD");
expect(html).toContain("deploy/demo/demo.env.example");
expect(html).not.toContain("synthetic demo stand only 2026");
});
it("renders every step link as a link of the guide", () => {
const html = render();
const links = guideRoles.flatMap((role) =>
role.steps.flatMap((step) => (step.link ? [step.link.to] : [])),
);
expect(links.length).toBeGreaterThan(0);
for (const to of links) {
expect(hrefs(html)).toContain(to);
}
});
it("states the limits: mail may be off and real people must not register", () => {
const html = render();
expect(html).toContain("Почта на стенде может быть отключена");
expect(html).toContain("Не регистрируйте на стенде реальных людей");
});
});
@@ -0,0 +1,128 @@
import { Page, Section, TextLink } from "../../../shared/ui";
import {
demonstrationItems,
guideAccounts,
guideLimits,
guideRoles,
workingItems,
} from "../model/guide";
import styles from "./jury-guide-page.module.css";
/** Step numbers run on across the role blocks, so the whole route reads as eight to thirteen steps. */
function firstStepNumbers(): number[] {
const starts: number[] = [];
let next = 1;
for (const role of guideRoles) {
starts.push(next);
next += role.steps.length;
}
return starts;
}
/**
* Memo for a jury member who opens the isolated demonstration stand without a
* briefing. It lists the route with the screens to open, the accounts, and the
* parts of the stand that are simulations. The route is shown only in a demo
* build (see routes), so nothing here reaches a production build.
*/
export function JuryGuidePage() {
const starts = firstStepNumbers();
return (
<Page
title="Гид для жюри"
eyebrow="Демонстрационный стенд"
lead="Короткий маршрут на синтетических данных: около восьми минут и две роли. Сначала прочитайте раздел «Что здесь демонстрационное»: он отделяет имитации от работающего функционала."
width="wide"
>
<Section title="Что такое Lincodex">
<p>
Lincodex помогает работодателям находить IT-специалистов по подтвержденным навыкам.
Заявленный уровень в анкете остается самооценкой, а категорию присваивает только результат
проверки.
</p>
</Section>
<Section
title="Маршрут за восемь минут"
description="Блоки идут по ролям. Перед каждым блоком войдите под указанным логином. Кнопки выхода в интерфейсе пока нет, поэтому роли удобнее вести в двух окнах: обычном и приватном."
>
<ol className={styles.roles}>
{guideRoles.map((role, index) => (
<li key={role.title} className={styles.role}>
<h3 className={styles["role-title"]}>{role.title}</h3>
<p className={styles.account}>
Логин: <code>{role.account}</code>
</p>
<ol className={styles.steps} start={starts[index]}>
{role.steps.map((step) => (
<li key={step.text}>
<p>{step.text}</p>
{step.link ? <TextLink to={step.link.to}>{step.link.label}</TextLink> : null}
</li>
))}
</ol>
</li>
))}
</ol>
</Section>
<Section
title="Что здесь демонстрационное"
description="Имитации и подготовленные данные. Они показывают механику, но не измеряют навык человека."
>
<ul className={styles.list}>
{demonstrationItems.map((item) => (
<li key={item}>{item}</li>
))}
</ul>
</Section>
<Section title="Что работает без имитации">
<ul className={styles.list}>
{workingItems.map((item) => (
<li key={item}>{item}</li>
))}
</ul>
</Section>
<Section title="Логины и пароль">
<p>
Пароль один для всех логинов ниже. Опубликованное значение по умолчанию - переменная
DEMO_ACCOUNT_PASSWORD из файла deploy/demo/demo.env.example. Если организатор задал свой
пароль, используйте его: он передается отдельно.
</p>
<div className={styles["table-wrap"]}>
<table className={styles.table}>
<thead>
<tr>
<th scope="col">Логин</th>
<th scope="col">Роль</th>
<th scope="col">Для чего</th>
</tr>
</thead>
<tbody>
{guideAccounts.map((account) => (
<tr key={account.login}>
<td>
<code>{account.login}</code>
</td>
<td>{account.role}</td>
<td>{account.purpose}</td>
</tr>
))}
</tbody>
</table>
</div>
</Section>
<Section title="Ограничения стенда">
<ul className={styles.list}>
{guideLimits.map((item) => (
<li key={item}>{item}</li>
))}
</ul>
</Section>
</Page>
);
}
@@ -0,0 +1,28 @@
import { renderToString } from "react-dom/server";
import { StaticRouter } from "react-router-dom";
import { describe, expect, it } from "vitest";
import { WelcomePage } from "./welcome-page";
function render(demoStand: boolean): string {
return renderToString(
<StaticRouter location="/">
<WelcomePage demoStand={demoStand} />
</StaticRouter>,
);
}
describe("welcome page", () => {
it("omits the jury section outside a demonstration build", () => {
const html = render(false);
expect(html).not.toContain("Для жюри");
expect(html).not.toContain("гид для жюри");
});
it("offers the jury guide in a demonstration build", () => {
const html = render(true);
expect(html).toContain("Для жюри");
expect(html).toMatch(/<a[^>]*href="\/demo"[^>]*>Открыть гид для жюри<\/a>/);
});
});
+13 -2
View File
@@ -34,15 +34,26 @@ const cabinets = [
/**
* Public start page. It describes the cabinets that work now and names the
* screens that are still placeholders, so the page makes no promise the
* product does not keep.
* product does not keep. A demonstration stand adds the link to the jury guide.
*/
export function WelcomePage() {
export function WelcomePage({ demoStand = false }: { demoStand?: boolean }) {
return (
<Page
title="Протокол подтвержденных навыков"
eyebrow="Lincodex"
lead="Регистрация, вход и основные сценарии кабинетов уже работают. Заявленный уровень остается самооценкой: подтвержденную категорию присваивает только результат теста."
>
{demoStand ? (
<Section title="Для жюри">
<p>
Этот стенд показывает продукт на синтетических данных. Гид описывает маршрут на восемь
минут двумя ролями и отделяет имитации от работающего функционала.
</p>
<div className={styles.actions}>
<ButtonLink to={paths.demoGuide}>Открыть гид для жюри</ButtonLink>
</div>
</Section>
) : null}
<Section title="Кабинеты">
<ul className={styles.cabinets}>
{cabinets.map((cabinet) => (
+1
View File
@@ -1 +1,2 @@
export { paths } from "./paths";
export { standMode, standModeFrom, type StandMode } from "./stand";
+2
View File
@@ -9,6 +9,8 @@ export const paths = {
verifyEmail: "/verify-email",
support: "/support",
status: "/status",
/** Jury guide of the demonstration stand; the route exists only in a demo build. */
demoGuide: "/demo",
candidate: {
root: "/candidate",
onboarding: "/candidate/onboarding",
+16
View File
@@ -0,0 +1,16 @@
import { describe, expect, it } from "vitest";
import { standModeFrom } from "./stand";
describe("standModeFrom", () => {
it("turns the demonstration mode on only for the literal value true", () => {
expect(standModeFrom({ VITE_DEMO_STAND: "true" })).toEqual({ demo: true });
});
it("keeps the mode off when the build sets no flag", () => {
expect(standModeFrom({})).toEqual({ demo: false });
});
it.each(["false", "", "TRUE", "1", "yes"])("keeps the mode off for %j", (value) => {
expect(standModeFrom({ VITE_DEMO_STAND: value }).demo).toBe(false);
});
});
+18
View File
@@ -0,0 +1,18 @@
/**
* Mode of the running build. Builds that serve synthetic demonstration data
* set VITE_DEMO_STAND to "true": the isolated demonstration stand through
* deploy/docker/docker-compose.demo.yml, and the browser suite through
* deploy/docker/docker-compose.e2e.yml. Other builds leave it unset, so the
* jury guide and the demonstration banner are not part of them.
*/
export type StandMode = {
/** True only for a build that serves synthetic demonstration data. */
readonly demo: boolean;
};
/** Reads the mode from build-time environment values; testable without Vite. */
export function standModeFrom(env: Readonly<Record<string, unknown>>): StandMode {
return { demo: env.VITE_DEMO_STAND === "true" };
}
export const standMode: StandMode = standModeFrom(import.meta.env);
@@ -0,0 +1 @@
export { DemoStandBanner } from "./ui/demo-stand-banner";
@@ -0,0 +1,18 @@
.banner {
padding: var(--space-2) var(--space-4);
border-bottom: var(--line-strong) solid var(--color-border-strong);
color: var(--color-text);
background: var(--color-surface);
font-size: var(--font-size-s);
}
.banner p {
margin: 0;
max-width: 80rem;
margin-inline: auto;
}
.label {
color: var(--color-accent);
font-weight: var(--font-weight-bold);
}
@@ -0,0 +1,19 @@
import styles from "./demo-stand-banner.module.css";
/**
* Marks every page of the demonstration stand: the data is synthetic and the
* results are prepared for showing, not measured. It is rendered only by a
* demo build (see app routes), and it has no link, so the first link of a
* page stays the skip link.
*/
export function DemoStandBanner() {
return (
<aside className={styles.banner} aria-label="Статус стенда">
<p>
<strong className={styles.label}>Демонстрационный стенд.</strong> Все данные синтетические,
подготовленные результаты не подтверждают квалификацию. Гид для жюри есть на главной
странице.
</p>
</aside>
);
}