Commit Graph

36 Commits

Author SHA1 Message Date
Константин Лебединский 547840d671 docs(qa): tester guide for versioning and AI features
Made-with: Cursor
2026-04-27 23:50:38 +05:00
Константин Лебединский 4b0d56ff0e feat(flask): E1.0–E1.3, E1.8 — миграция на Python/Flask + AI v2
Этап 1 миграции TestingWebApp на целевой стек (Python/Flask/Jinja),
БД остаётся clinic_tests.

E1.0 — База Flask-приложения: SQLAlchemy/psycopg2 пул, Flask sessions,
фабрика create_app, blueprint main с / и /health, base.html в стиле
кабинета HR (Tailwind CDN + Manrope + Material Symbols), 404/500.

E1.1 — Auth + /api/me: Flask sessions (signed cookie) вместо JWT,
bcrypt + Werkzeug, опц. HR_AUTH=1 с UPSERT в clinic_tests.users по
staff_id. UI /login, JSON /api/auth/{login,logout,me}, декораторы
@login_required / @require_role.

E1.2 — Тесты: список + редактор. 10 эндпоинтов, сервисы test_draft,
test_access, test_chain, ai_editor, llm_client, draft_validator,
editor_content. UI /tests (каталог + создание) и /tests/<id>/edit
(редактор с AI). Полный мобильный UX (аккордеоны/drag-n-drop) — в E1.7.

E1.3 — Импорт документов: pypdf + python-docx, эндпоинт
POST /api/tests/import/document, кнопка «Импорт документа» в
AI-панели редактора, лимит 16 МБ.

E1.8 — AI v2: страница /settings (статус ENV-ключа + ping),
ai/generate-by-title (без сетки), ai/check (рецензия), ai/improve
(массовое было→стало с чекбоксами). Унифицированный ответ AI-ошибок:
{ error, code, settingsUrl }.

Docker:
- docker-compose.dev.yml: добавлены DATABASE_URL, HR_AUTH/HR_DATABASE_URL,
  DEEPSEEK_API_KEY/OPENAI_API_KEY/LLM_BASE_URL/LLM_MODEL и сеть postgres
  для testing-flask.

Документация:
- docs/migration-final.md — двух-этапный план (Этап 1: унификация
  стека внутри TestingWebApp; Этап 2: слияние с tgFlaskForm).
- docs/migration-final-inventory.md — карта 22 эндпоинтов Express.

Made-with: Cursor
2026-04-27 23:29:26 +05:00
Константин Лебединский 31b51b7768 docs: move user guide out of sprints; sync design docs with UI
- СПРИНТЫ: remove inline instruction and sprint 4; link to РУКОВОДСТВО + images
- Add docs/РУКОВОДСТВО_КАБИНЕТ_ТЕСТОВ.md (user-facing, with SVG refs)
- ПРЕДЛОЖЕНИЕ_ДИЗАЙН: актуализация TestDetail/cabinet-theme vs legacy TestForm
- PROJECT_STATUS, DEV_CONTOUR, шаги 05+README, migration, README: current block names and links

Made-with: Cursor
2026-04-27 20:48:52 +05:00
Константин Лебединский 5cd94c05ad docs: user guide for cabinet, sprint 4, SVG placeholders; drop token sprint
- Replace old sprint 4 (design tokens) with sprint 4: plain-language guide + images
- Add 'Как пользоваться' section: list, about test, questions, save, history, show/assign
- Add docs/images/cabinet-ui SVG placeholders and README for swapping in PNGs

Made-with: Cursor
2026-04-27 20:37:46 +05:00
Константин Лебединский f1f5223076 feat(test detail): regroup sections, copy, and editor affordances
- AccSection: optional subtitle; disclosure body top padding
- Renames: О тесте, Вопросы, История (Версии + Прохождения), Показ в каталоге
- Move import into Вопросы as «Документ в вопросы»; remove duplicate import section
- Merge publication + assignment with subheads Видимость / Кому выдать; non-full-width actions
- Assign: «Выбрать всех (N)»; search row height tweaks
- Editor: крестик удаления варианта; единый футер + вариант/удалить вопрос; + вопрос в отдельной полосе
- AI block: test-detail-ai-panel (lighter, aligned with rest)
- History: empty state for runs; attempts error only in section (remove hero duplicate)

Made-with: Cursor
2026-04-27 20:36:09 +05:00
Константин Лебединский 72a5863871 fix(mobile): version card height, assign list, header safe-area
- version cards: flex-grow 0 for main in column layout (no empty vertical gap)
- test detail: slightly larger gaps between accordion bricks; more bottom padding for fixed footer
- header: respect safe-area insets for top and sides (logout away from screen edge)
- assign: compact toolbar inputs on narrow screens; taller scroll area; row borders a bit stronger
- assign rows: center checkbox with text; clamp meta to 3 lines with ellipsis; checkbox size + accent-color

Made-with: Cursor
2026-04-27 20:19:51 +05:00
Константин Лебединский f7d9cbb1c4 fix(tests list): stack card on mobile, full-width title and Pass button
- max-width 640px: column layout, no split title/button in one row
- Pass button full width in side row; remove flex-end empty strip
- Scope list-row :hover to hover+fine pointer; add :active on link for touch
- list-row--action link hover also scoped to fine pointer

Made-with: Cursor
2026-04-27 20:08:33 +05:00
Константин Лебединский 9a85a13e08 fix(tests list): full-height link in split row for mobile tap
- list-row__main: flex column + stretch; list-row__link: flex:1 to fill
  height next to «Пройти» so taps below title hit the <a>
- Subtle -webkit-tap-highlight-color on list link

Made-with: Cursor
2026-04-27 19:45:13 +05:00
Константин Лебединский 3e70f4322d Sprint 2: attempt cards, file import button, question layout, radio/check, sticky save
- Replace attempts table with attempts-card-list cards
- Custom import: sr-only file input + btn-styled label
- question-editor-block: stack header on mobile, row from 520px
- option marks: radio for single correct, checkbox for multiple
- Fixed bottom actions on max-width 640px with draft status; hide in-flow panel
- Update СПРИНТЫ_МОБИЛЬНЫЙ_ДИЗАЙН.md and DOC/ШАГИ/ШАГ_2026-04-27_003.md

Made-with: Cursor
2026-04-27 19:38:42 +05:00
Константин Лебединский 1db3653e66 docs: sprint checklist use [x]/[ ] task list format
Made-with: Cursor
2026-04-27 19:35:57 +05:00
Константин Лебединский 5db12c2348 Mobile UI sprint 1: actions-bar, version cards, meta line, safe area
- Add docs/СПРИНТЫ_МОБИЛЬНЫЙ_ДИЗАЙН.md and DOC/ШАГИ/ШАГ_2026-04-27_002.md
- cabinet-theme: .actions-bar, .version-card-list, .list-row__meta-tail,
  .inline-actions--block-mobile, btn--sm/ghost tweaks, safe-area main padding
- TestDetail: replace version table with cards; command panel uses actions-bar;
  assign list only when there are people; publication full-width on narrow
- TestsList: version suffix in non-breaking tail span

Made-with: Cursor
2026-04-27 19:35:08 +05:00
Константин Лебединский 2a05f41b65 Redesign test editor: meta, content, AI shape, command bar
- Split draft editor into AccSection Метаинформация and Содержание
- AI generation: topic, question count (1–30), answers per question (2–8)
- Move save and back-to-list to bottom command panel; remove AI from hero
- Normalize generated options to requested count; sync ai topic on import draft
- Add DOC/ШАГИ/ШАГ_2026-04-27_001.md and track design proposal doc

Made-with: Cursor
2026-04-27 19:07:00 +05:00
Константин Лебединский b3e3757a92 docs: миграция на tgFlaskForm и производительность Flask; контур flask_app; UI без лишних описаний
Made-with: Cursor
2026-04-27 18:43:51 +05:00
Константин Лебединский 47279c72e3 chore: фронт :3107, API :3001 (Docker, Vite, CORS, доки)
- compose: testing-web 3107:80, testing-backend 3001:3001, PORT+FRONTEND_URL
- nginx → testing-backend:3001; Vite 3107, proxy /api → 3001
- server default PORT 3001; Dockerfile EXPOSE 3001; CORS dev — localhost:3107
- README, журнал, user guide

Made-with: Cursor
2026-04-24 23:14:33 +05:00
Константин Лебединский 42b5e9ad44 chore: API на хосте 3107 (согласовано с Vite proxy)
- compose: 3107:3107 вместо 3002:3107
- README: прямой URL API с хоста
- vite: комментарий про порт

Made-with: Cursor
2026-04-24 23:09:18 +05:00
Константин Лебединский 0fe04d4d99 feat: полный бэк и фронт (попытки, разбор, импорт, ИИ, назначения)
- Сервисы: testAttemptService, testAccess, document import/gen/extract, LLM, assignment, aiEditor
- Конфиг: devAuthor, featureFlags; messages/ru; интеграция V.9 (skip без БД)
- API/роуты: app, auth, server; Dockerfile и env example
- Фронт: TestAttempt, TestAttemptReview, AttemptReviewBlock, стили, правки App/api/login/vite
- compose и README; смоук-тесты расширены

Закрывает отсутствие модулей в origin после клона.

Made-with: Cursor
2026-04-24 22:55:15 +05:00
Константин Лебединский a68331c86b docs: статус проекта, инструкция dev, обновление всех .md
- PROJECT_STATUS: что сделано (черновики, версии, разбор, каталог) и планы
- DEV_CONTOUR_USER_GUIDE: сценарии для проверяющих на dev-стенде
- README, ТЗ, card1, журнал, бэклоги, шаги 01–11+README, спринты, TEST_TABLES: ссылки и примечания
- backend/PROGRESS: ссылка на PROJECT_STATUS

Made-with: Cursor
2026-04-24 22:12:06 +05:00
Константин Лебединский 4801ea9f19 UI: фамилия с инициалами в шапке, подпись автора у тестов
- Хедер: отображать Фамилия И. О., полное ФИО в title.
- Список тестов и карточка: «Автор: Вы» для своих, иначе «Автор: Фамилия И. О.».
- API: в каталоге и summary/versions — created_by, author full_name (camelCase в JSON).

Made-with: Cursor
2026-04-24 22:08:45 +05:00
Константин Лебединский 89da5b60b7 feat(docker): docker-compose.dev — backend+nginx, общий Postgres, миграции в entrypoint
Made-with: Cursor
2026-04-24 20:36:49 +05:00
Константин Лебединский 8ffd104f64 chore: общий Postgres по умолчанию; compose standalone + подсказки .env
Made-with: Cursor
2026-04-24 20:33:14 +05:00
Константин Лебединский 699277be07 fix(migrate): освобождать клиент пула, диагностика ECONNREFUSED и AggregateError
Made-with: Cursor
2026-04-24 20:31:43 +05:00
Константин Лебединский 5631d85238 feat(card1): версии тестов API, черновик, HR-login, import, UI
- V.1–V.3: saveTestDraft, fork при попытках; миграция 003 staff_id
- V.4–V.6: REST /api/tests, activate, PATCH, start attempt
- A: HR_DATABASE_URL + Werkzeug/bcrypt, JWT staffId, HR_AUTH
- D.1: multipart /api/tests/import/document
- Frontend: login, список тестов, экран версий/черновика/попытки
- ТЗ: V.10 назначения vs активная версия; журнал приёма

Made-with: Cursor
2026-04-24 20:30:09 +05:00
Константин Лебединский 7fa6f98ee1 docs: БД clinic_tests + hr_bot_test, staff_id, RBAC, telegram_id справка
Made-with: Cursor
2026-04-24 20:23:59 +05:00
Константин Лебединский 675555531f feat(db): DATABASE_URL и общий Postgres (Postgres_TG_Bots), БД clinic_tests
Made-with: Cursor
2026-04-24 20:16:22 +05:00
Константин Лебединский c381283ee4 chore: eslint — убрать 2 error (unused), журнал A1–A4 проверки
Made-with: Cursor
2026-04-24 20:12:33 +05:00
Константин Лебединский 26b5eddefa docs: S1-01 ручная проверка — card1 V.1/V.2/V.3
Made-with: Cursor
2026-04-24 20:10:58 +05:00
Константин Лебединский fcc6fae463 docs: S1-00 ручная проверка — журнал и раздел B
Made-with: Cursor
2026-04-24 20:10:19 +05:00
Константин Лебединский 997a71b974 docs: ручные проверки — один шаг из чата, ответ ОК/не ОК, заполняет ассистент
Made-with: Cursor
2026-04-24 19:32:02 +05:00
Константин Лебединский e87168d3a0 feat: журнал тестирования, бэклог идей; V.2 hasAnyAttemptForTest + unit tests; ссылки в спринтах
Made-with: Cursor
2026-04-24 19:26:02 +05:00
Константин Лебединский 4eeb3fbc62 docs: card1 (версии, документ, auth Postgres_TG_Bots); миграция 002 parent_id+unique active; спринт1+бэклог под Node
Made-with: Cursor
2026-04-24 19:17:46 +05:00
Константин Лебединский 93dcfcf4ff docs: add revision task spec (dev)
Made-with: Cursor
2026-04-23 21:14:22 +05:00
Константин Лебединский 6f9a80be16 Update README.md - remove tech stack, DB schema, API endpoints, project structure and development plan 2026-03-21 17:13:45 +05:00
Константин Лебединский ccec6ef950 added README 2026-03-21 16:52:11 +05:00
Константин Лебединский 986fb00a32 gitignore added 2026-03-21 16:11:48 +05:00
Константин Лебединский 046d8b3170 gitignore added 2026-03-21 16:10:41 +05:00
Константин Лебединский b42a3c3d55 docs folder with steps 2026-03-21 16:06:24 +05:00