Commit Graph

123 Commits

Author SHA1 Message Date
Maxim Dolgolyov d701d824ba docs(plans): план реализации учебника Физика 7 (Исаченкова, 2022)
Полный план в стиле PLAN_PHYSICS_8: 5 содержательных глав, 42 параграфа,
6 виртуальных ЛР, 8 фаз реализации, ~62 800 LOC.

Особенности курса:
- Новая глава §§1–7 «Методы познания»: измерения, СИ, цена деления, погрешность.
- Глава 4 «Давление» — гидростатика, закон Паскаля, барометры (нет в phys 8).
- Глава 5 «Работа/мощность/энергия» — закон сохранения механической энергии.
- Палитра sky/blue (#0284c7), не пересекается с violet phys 8, amber phys 10, teal phys 11.
- Новые хелперы в phys.js: forceVector, dynamometer, connectedVessels,
  hydraulicPress, mercuryBarometer, HillSlideSim, PendulumSim и др.
- Учтены уроки phys 9: cache-busting ?v=YYYYMMDD, sidebar-фикс на desktop,
  delimiters для renderMathInElement, скобка вне $..$.

Главный визуал курса — закон сохранения механической энергии
(горка с тележкой / маятник, графики E_к(t)/E_п(t)/E_полн(t)).
ИТОГО: 5-й физический курс проекта, первый учебник 7 класса по физике.
2026-05-30 10:12:48 +03:00
Maxim Dolgolyov 8f1fba25f9 docs(plans): мощный план Физики 9 — 19 флагман-интерактивов и симуляторов 2026-05-30 09:59:59 +03:00
Maxim Dolgolyov 8a480c8ead docs(plans): расширенный план Физики 9 — детально по каждому § и ЛР 2026-05-30 09:39:50 +03:00
Maxim Dolgolyov 839f9f65dd docs(plans): план улучшения визуала и интерактивов Физики 9 2026-05-30 09:26:06 +03:00
Maxim Dolgolyov d52ad9b06f docs(plans): план интеграции Физика 9 (Исаченкова 2019, 5 глав, 36§ + 12 ЛР) 2026-05-29 22:51:42 +03:00
Maxim Dolgolyov 8e8988ec23 docs(plans): добавлен план реализации Физика 8 (Исаченкова, 2018) 2026-05-29 22:20:00 +03:00
Maxim Dolgolyov a24c334730 docs(plans): убраны лабораторные работы из плана Физика 11
- Удалён physics_11_labs.html из списка файлов
- Удалена секция 'Лабораторный эксперимент' в хабе и wireframe
- Убрана волна W15 'physics_11_labs.html — 9 лабораторных работ' (W16 polish → W15)
- Обновлены счётчики: 10 файлов → 9, ~28 сессий → ~26, 16 волн → 15
- Из итогов убрана строка про 9 лабораторок
2026-05-29 17:35:51 +03:00
Maxim Dolgolyov dc7ad11e52 docs(plans): добавлен большой план реализации Физика 11 (Жилко-Маркович-Сокольский 2021)
Самый большой план проекта:
- 8 глав, 45 параграфов
- Новая библиотека phys-fx.js (~1000 строк): осциллограммы, маятники,
  волны, LC-контуры, RayTracer (линзы/зеркала/призмы), фотоэффект,
  атом Бора, спектры, ядро, радиоактивный распад, цепная реакция
- 8 цветовых тем по главам (cyan/violet/amber/sky/yellow/emerald/red/indigo)
- ~92 босса, ~135 квизов, 9 ачивок (включая phys11_master)
- 9 лабораторных работ — отдельная страница
- 16 волн реализации (~28 сессий) — крупнейший курс проекта
- Стиль единый с geom11_ch1 / geom10_r1 (2-кол layout, psel-grid, wg)
- Глобальный RAF-таймер для экономии CPU при 5-10 симуляциях на странице
- IntersectionObserver для паузы невидимых симуляций
2026-05-29 17:32:27 +03:00
Maxim Dolgolyov 995661158b docs(plans): добавлен план реализации Алгебры 9 + Геометрии 9
Полный план по учебникам Беларуси 2019:
- Algebra_Arefieva_9kl_rus_2019.pdf (4 главы, 19 §)
- Geometriya_Kazakov_9kl_rus_2019.pdf (4 главы, 16 §)

Порядок реализации: сначала вся Алгебра 9 (Phases 0-5),
затем вся Геометрия 9 (Phases 6-11).

Включает:
- Полное содержание каждой главы с ключевыми формулами
- SVG-стандарт качества (хелперы regularPoly, rightAngle,
  angleArcAuto, tickMarks, arrow, axes2D, plotFunc)
- Типы SVG по темам для каждого учебника
- Правила drag-интерактивов из опыта Геом 8
- Phase-by-phase порядок реализации (11 phase)
- Структура каждой главы (Wave 0 skeleton, Wave 1-N §, Wave финал)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 23:39:29 +03:00
Maxim Dolgolyov 085b7322cf chore(plans): mark admin-redesign + lab-split as Complete
Both features merged to master; status updated from In Progress to

Complete with merge-commit refs for traceability.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 11:16:39 +03:00
Maxim Dolgolyov 5fa2844451 docs(lab-split): mark phases 1-4 done, phase 5 deferred
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 23:03:56 +03:00
Maxim Dolgolyov 92b5c39860 refactor(lab): phase 2 — extract inline glue script to /js/labs/lab-glue.js
lab.html 4324L → 3499L (-825L). 824 lines of glue code moved.

Position preserved: lab-glue.js loads after lab-init.js, before

newton.js / forcesandbox.js / etc. — same execution order as inline.

node --check passes. /lab returns 200. /js/labs/lab-glue.js returns 200.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 22:36:26 +03:00
Maxim Dolgolyov 46e6d82010 refactor(lab): phase 1 — extract inline style block to /css/lab.css
lab.html 5180L → 4324L (-856L). All CSS moved to frontend/css/lab.css

(855L). Added <link> tag after ls.css for proper cascade.

Visual rendering unchanged — pure file move.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 22:35:07 +03:00
Maxim Dolgolyov 77ebe9e3e4 chore(plan): lab-split 5-phase plan
PLAN.md + 5 subplans + CONTEXT.md

Strategy: Incremental | Mode: Automated | Execution: Direct

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 22:33:41 +03:00
Maxim Dolgolyov ce183ef14d docs(admin-redesign): mark phase 6 done + final-review prep
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 00:15:07 +03:00
Maxim Dolgolyov 3f89030b6e feat(admin): Phase 6 sub-commit 2 — remove .user-panel overlay
Now that the deep pages (sub-commit 1) work, retire the legacy
.user-panel inline overlay entirely.

* admin.html: removed <div class="user-panel" id="user-panel"> block
  inside #tab-users, removed dead .user-panel* CSS (kept .btn-close
  for any external use).
* users.js: removed openUserPanel / closeUserPanel / reloadUserPanel
  and their closure state (activeTr, activeUserRole). User row onclick
  switched from openUserPanel(...) → AdminRouter.navigate('#users/N').
  clearUserHistory / toggleBanUser / confirmDeleteUser / openEditUserModal
  / openUserPermsModal / doSet/doReset* all refactored to use the
  getActiveUid() helper (reads window.activeUid, set by user-detail.init)
  + reloadDetailAndList() helper (refreshes deep page + list together).
* sessions.js: row click + eye-button switched from toggleDrawer(id)
  → gotoSession(id) → AdminRouter.navigate('#sessions/N'). Removed
  toggleDrawer + renderDrawer functions (~60L) and openDrawerId state.
  Inline drawer markup removed from the row template.

Verified node --check on all touched JS. ast-index confirms zero
remaining usages of openUserPanel / closeUserPanel / reloadUserPanel /
toggleDrawer across the repo.

This completes Phase 6 and the admin-redesign feature.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 00:08:13 +03:00
Maxim Dolgolyov bd3020067b feat(admin): Phase 6 sub-commit 1 — add deep-page sections (overlay still works)
Add user-detail.js (~370L) and session-detail.js (~180L) section
modules that render full pages for #users/:id and #sessions/:id, plus
admin.js dispatch and HTML tab-panes. The legacy .user-panel overlay
is intentionally still in place — sub-commit 2 will remove it once the
deep pages are verified.

* admin.js: DEEP_ROUTES map + activateDeepPane(); activate(route, params)
  signature; initial dispatch respects hash params (so F5 on #users/123
  goes straight to the deep page).
* admin.html: new tab-panes #tab-user-detail / #tab-session-detail and
  two script tags. Old #user-panel overlay untouched.
* user-detail.js: header (avatar/role/email/meta) + sub-tabs
  (Обзор/Сессии/Классы/Audit) with URL-synced sub-tab routing
  (#users/N/sessions etc). Overview: 4 stat cards + per-subject SVG
  bar chart. Sessions: clickable rows that navigate to #sessions/N.
  Classes: placeholder empty-state (no per-user classes endpoint).
  Audit: client-side filter of /admin/audit-log by uid match. Header
  action buttons (Изменить/Права/История/Бан/Удалить) call existing
  overlay handlers; window.activeUid is set before opening any modal.
* session-detail.js: full header (user/subject/score/stats) + per-
  question correctness layout reusing the drawer renderer. Delete
  button uses LS.adminDeleteSession then navigates to #sessions.
  Clicking the user name opens the user deep page.
* users.js: quickOpenUserSessions now navigates to
  #users/<uid>/sessions instead of the bare #sessions list.

Verified node --check on all new/modified JS. baseline npm test still
shows pre-existing 3 auth failures unrelated to this change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 00:01:22 +03:00
Maxim Dolgolyov 69113ab35e feat(admin): phase 5 — per-row quick actions for users + sessions
Hover-only action buttons (right-aligned, opacity transition, hidden on mobile).

- users.js: 4 actions (ban/unban, award coins, sessions, delete) — replaces `>` glyph cell, falls back to glyph for non-admin / self

- sessions.js: 2 actions (view, delete)

- DELETE /api/admin/sessions/:id (NEW): transactional (assignment_sessions=NULL, user_answers, session_questions, test_sessions), audit-logged, admin-only

- event.stopPropagation defence-in-depth (each button + parent .row-actions)

- LS.confirm for destructive ops; LS.modal for award-coins amount/reason

- CSS injected once via #row-actions-style id-dedup (same content in both sections)

Existing user-panel overlay + session toggle-drawer flows untouched (Phase 6 removes overlay).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 23:53:19 +03:00
Maxim Dolgolyov f562fe4a71 feat(admin): phase 4 — Cmd+K command palette
Global search modal: actions + users + tests + classes.

- GET /api/admin/search?q=X (~50L controller): 3 parameterized LIKE queries, admin-only

- frontend/js/admin/palette.js (~366L): custom lightweight modal (not LS.modal — footer-button oriented), Ctrl+K/Cmd+K capture-phase override of generic /js/search.js, debounce 150ms, race-guard via _reqSeq, min-query 2 chars, 8 hardcoded actions, ↑↓ wrap + Enter, click-outside close

- adminGlobalSearch helper: drop ignored 'limit' param (server hardcodes 5/3/3)

window.AdminPalette = { open, close, isOpen } exposed for Phase 5/6 use.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 23:39:59 +03:00
Maxim Dolgolyov 41acbdd0d0 feat(admin): phase 3 — dashboard #overview landing
GET /api/admin/overview returns 24h digest (~0.08ms/call).

- adminController.getOverview: 7 prepared statements (users 24h, sessions 24h, active users, classes count, failed sessions, banned this week, top-5 sessions)

- new section frontend/js/admin/sections/overview.js (~205L): bento-grid cards, alerts (only when >0), top-5 table, quick-links

- nav-item + tab-pane reordered: #overview is now default; #stats remains routable

Auth: admin-only (inside requireRole('admin') block, sibling of /stats).

Backward compat: all 13 existing routes unchanged.

Known follow-ups (post-merge polish):

- activeClasses counts all (label could be 'Всего классов')

- failedSessions24h includes in_progress (could tighten to abandoned only)

- topSessions24h drops NULL-score completed rows

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 23:26:59 +03:00
Maxim Dolgolyov 8a815ca3eb docs(admin-redesign): mark phase 2 done + handoff notes for phase 3+ 2026-05-16 22:52:24 +03:00
Maxim Dolgolyov 8a7bed487f feat(admin): phase 1 — hash-router
AdminRouter wraps existing switchTab for deep-linking.

- frontend/js/admin/router.js (new, 102L): parse/navigate/current/on/off, recursion guard via _navigating flag

- admin.html: +1 <script> before admin.js

- admin.js: switchTab(btn, opts) + initAdminRouter IIFE for hashchange dispatch

Backward compat: all 21 onclick=switchTab(this) callsites continue working.

F5 / back / forward / deep-link verified.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 22:22:20 +03:00
Maxim Dolgolyov 76e376ee04 chore(plan): admin-redesign 6-phase plan
PLAN.md + 6 subplans + CONTEXT.md

Strategy: Incremental | Mode: Automated | Execution: Orchestrator

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 21:47:55 +03:00