163 Commits

Author SHA1 Message Date
1984b0bde6 fix(ET-007): address 6 P1 findings from review (docs + code)
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 6s
CI / lint (pull_request) Successful in 4s
CI / test (pull_request) Successful in 5s
CI / build (push) Successful in 4s
CI / build (pull_request) Successful in 2s
12-review.md (REQUEST_CHANGES, attempt 2/3) flagged 6 must-fix items
in the analysis/architecture artefacts plus matching bugs that had
already leaked into the committed implementation. This patch lands
both: documents corrected, code aligned with corrected specs, tests
updated.

P1-1: TRZ/ADR/Data/Risks referenced fictional layer ids
(`trails-grade1..5-halo-satellite`, `paths-bridleway-halo-satellite`).
Actual style*.json has only `trails-track-halo-satellite` and
`trails-path-bridleway-halo-satellite`; grade differentiation lives
inside one `match` expression on `tracktype` within `trails-track`.
Docs rewritten to operate on real ids.

P1-2: POI labels contrast was broken — spec changed only halo-color
to black, leaving `text-color: #333333` (light theme baseline)
unreadable over the new black halo. Code+docs now switch BOTH
`text-color` (-> `#ffffff` on satellite) AND halo together, with
per-theme baselines (`#333333` light / `#e0e0e0` dark) restored on
return to Schematic.

P1-3: BRD §5 hillshade risk said «hillshade auto-disabled on
satellite», contradicting TRZ/ADR/AC. BRD wording aligned: hillshade
keeps working over satellite; visual check is AC-04.

P1-4: background-color had four divergent sources (`#1a1a1a`,
`#2a2a2a`, `#1a1a2e`, `#f0ede6`), incl. an inverted-theme typo and a
baseline `#1a1a1a` that didn't match the actual `style-dark.json:28`
value `#1a1a2e`. Settled on ADR-004's single-constant model: `#2a2a2a`
on satellite for both themes; on Schematic restore per-theme baselines
`#f0ede6` (light) / `#1a1a2e` (dark). `_applyBackgroundForSatellite`
fixed accordingly.

P1-5: app.js already had `layerState.basemap` and `toggleLayer
('basemap')` (legacy «Базовая карта» switch). Neither TRZ nor ADR
specified the interaction. Added save&restore contract: on entering
Satellite save `layerState.basemap` to `_savedBasemapState` and
force-hide `osm-base`; on returning to Schematic restore osm-base
visibility from the saved value. CSS hook `body.satellite-active
#btn-basemap { display:none }` keeps the user from trying to enable
a hybrid mode (out of scope, BRD §3). TRZ §5.6, ADR-004 §8.

P1-6: `restoreTrailsState()` and `onTrailsCheckbox()` only managed
visibility of `trails-track` / `trails-path-bridleway`, leaving
their halo-underlay siblings as «phantom» halos when the user
unchecked grunты/тропы under Satellite. Introduced
`_applyTrailHaloVisibility(map, base)` reading checkbox state from
DOM; called from `onTrailsCheckbox`, `restoreTrailsState`, and both
branches of `applyBaseLayer`. Rule: halo visible ⇔ (base ===
satellite) AND (checkbox ON). TRZ §5.7, ADR-004 §9.

Docs bumped: BRD v2, TRZ v2, AC v2, Data v2, Risks v2; ADR-004
получает «Ревизии»-секцию (status remains accepted — only editorial
fixes, no decision change).

Tests:
- tests/unit/base_layer.test.js: rewritten 2 background-color
  assertions (#1a1a1a expectation removed), added 6 new tests for
  P1-2 / P1-4 (POI text-color per-theme baselines, single satellite
  bg #2a2a2a, baseline restore on Schematic).
- All 33 JS unit tests + 22 pytest static checks green.
- Full pytest suite: 76 passed (excluding pre-existing
  shapely-import skipped collection in tests/unit/test_health.py).

Refs: ET-007
Review: docs/work-items/ET-007/12-review.md (P1-1..P1-6)
ADR: docs/work-items/ET-007/06-adr/ADR-004-satellite-base-layer.md (rev. 2026-05-31)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-31 21:05:49 +00:00
475d42187d feat(web): спутниковая подложка с переключателем Схема/Спутник
All checks were successful
CI / lint (push) Successful in 3s
CI / test (push) Successful in 5s
CI / build (push) Successful in 1s
CI / lint (pull_request) Successful in 4s
CI / test (pull_request) Successful in 5s
CI / build (pull_request) Successful in 1s
ET-007: добавлен сегментированный переключатель «Подложка» в попап
слоёв; ленивое создание Esri World Imagery raster-source при первом
включении «Спутник»; восстановление выбора из localStorage и переживание
смены темы через rebuildMapOverlays().

- src/web/index.html: блок .terrain-base-row в #terrain-popup
- src/web/app.css: стили .terrain-base-row / .terrain-base-label / .base-seg
- src/web/app.js: блок ET-007 с onBaseLayerToggle, applyBaseLayer,
  restoreBaseLayerState, syncBaseLayerUI; хук в rebuildMapOverlays()
  первым, чтобы terrain/trails/POI лежали поверх спутника
- src/web/style.json, style-dark.json: halo-underlay-слои
  trails-track-halo-satellite и trails-path-bridleway-halo-satellite
  (visibility:none по умолчанию, включаются на спутнике для контраста)
- tests/unit/base_layer.test.js: 28 behavioural JS-тестов (U-01..U-05,
  U-10..U-11, I-01..I-07, halo, z-order, private mode, тёмная тема)
- tests/unit/test_base_layer.py: 22 pytest-проверки (HTML/CSS/app.js/
  style.json структурные + node --test runner)

Refs: ET-007
ADR: docs/work-items/ET-007/06-adr/ADR-004-satellite-base-layer.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-31 20:09:19 +00:00
29d8461c0c reviewer(ET): auto-commit from reviewer run_id=29
All checks were successful
CI / lint (push) Successful in 3s
CI / test (push) Successful in 5s
CI / build (push) Successful in 3s
2026-05-31 20:07:34 +00:00
231c99c045 docs(ET-007): architecture - ADR, infra-requirements, data-requirements, tech-risks
All checks were successful
CI / lint (push) Successful in 3s
CI / test (push) Successful in 6s
CI / build (push) Successful in 1s
2026-05-31 20:01:06 +00:00
d7d06bb046 docs(ET-007): analyst artifacts - BRD, TRZ, AC, TestPlan, UI tests
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 6s
CI / build (push) Successful in 1s
2026-05-31 18:28:31 +00:00
5bb2fa96d7 docs: init ET-007 business request
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 6s
CI / build (push) Successful in 1s
2026-05-31 15:49:26 +03:00
322de2d8e9 Merge pull request 'feat: add UI/visual testing to pipeline' (#9) from feature/ui-testing-pipeline into main
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
2026-05-23 01:58:50 +03:00
b09907e683 feat: add UI/visual testing to pipeline
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 5s
CI / build (push) Successful in 2s
CI / lint (pull_request) Successful in 4s
CI / test (pull_request) Successful in 4s
CI / build (pull_request) Successful in 1s
2026-05-23 01:58:14 +03:00
9eaeb36105 Merge pull request 'docs: fix inconsistencies after ET-006 review' (#8) from docs/review-fixes into main 2026-05-22 20:23:30 +03:00
00fb1c0413 docs: fix inconsistencies after ET-006 review
All checks were successful
CI / lint (pull_request) Successful in 3s
CI / test (pull_request) Successful in 5s
CI / build (pull_request) Successful in 2s
- README: add GPX upload feature to fiche list and intro section
- CLAUDE.md: clarify ADR convention (per-work-item vs global)
- ET-005: add YAML frontmatter to business request
- PH-7: document F-07/F-08 done, F-10 pending in phase BRD
- docs/architecture: add client modules table (app.js, units.js, gpx.js)
2026-05-22 20:22:06 +03:00
7bf1205c5e Merge pull request 'feat(gpx): загрузка и визуализация GPX-треков (ET-006)' (#7) from feature/ET-006-gpx-upload into main 2026-05-22 13:35:21 +03:00
23cc89d416 tester(ET): auto-commit from tester run_id=19
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 6s
CI / lint (pull_request) Successful in 3s
CI / build (push) Successful in 1s
CI / test (pull_request) Successful in 5s
CI / build (pull_request) Successful in 1s
2026-05-22 06:45:35 +00:00
e1dd7039a7 reviewer(ET): auto-commit from reviewer run_id=18
All checks were successful
CI / lint (push) Successful in 3s
CI / test (push) Successful in 4s
CI / lint (pull_request) Successful in 3s
CI / test (pull_request) Successful in 5s
CI / build (push) Successful in 3s
CI / build (pull_request) Successful in 2s
2026-05-22 06:04:55 +00:00
25e4476cf7 fix(gpx): устранить падение статистики на больших треках, учесть все треки файла
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 5s
CI / lint (pull_request) Successful in 3s
CI / test (pull_request) Successful in 5s
CI / build (push) Successful in 3s
CI / build (pull_request) Successful in 2s
Правки по код-ревью ET-006 (docs/work-items/ET-006/12-review.md):

- P1-1: trackStats считал min/max высот через Math.min/max.apply — на
  треках в сотни тысяч точек это бросало RangeError и валило загрузку
  файла (нарушение REQ-NF-01). Расчёт переписан на однопроходный
  аккумулятор (makeStatsAccumulator/accumulatePoint/finalizeStats)
  без apply.
- P2-1: статистика и профиль высот учитывали только tracks[0].
  Добавлены aggregateStats() и buildFileProfileSamples() — сводка и
  профиль теперь охватывают все треки файла (REQ-F-09, AC-02).
- P2-2: расчёт статистики на async-пути парсинга вынесен в чанковый
  trackStatsChunked() — соответствие букве ADR-003 §2.
- P3-1: ось и tooltip профиля высот форматируют расстояние через
  formatKm() — согласование с выбором км/мили из ET-005.
- P3-2: childText() переименована в firstTagText() — имя соответствует
  фактическому поведению (поиск по всем потомкам).
- P3-4: убран дублирующийся 'use strict'.

Добавлены регрессионные unit-тесты: большой трек без падения,
эквивалентность trackStatsChunked синхронному trackStats (в т.ч. на
треке длиннее размера чанка), агрегация статистики и профиля по
многотрековому файлу.

Refs: ET-006

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 06:01:51 +00:00
19354ed905 reviewer(ET): auto-commit from reviewer run_id=16
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 5s
CI / lint (pull_request) Successful in 3s
CI / build (push) Successful in 2s
CI / test (pull_request) Successful in 5s
CI / build (pull_request) Successful in 2s
2026-05-22 01:06:44 +00:00
8dc150ae14 Merge stale remote ET-006 branch after rebase onto main
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 5s
CI / build (push) Successful in 1s
CI / lint (pull_request) Successful in 3s
CI / test (pull_request) Successful in 4s
CI / build (pull_request) Successful in 1s
Локальная ветка была перебазирована на актуальный origin/main (стадия
development, алгоритм п.2). Удалённая ветка содержала те же 4 doc-коммита
ET-006 до ребейза. Стратегия `ours`: дерево уже корректно (перебазировано
на main + реализация), удалённый тип становится предком для fast-forward
push без force-push.
2026-05-22 01:01:45 +00:00
55c9c389cd feat(gpx): загрузка и визуализация GPX-треков (ET-006)
Клиентская загрузка GPX 1.1: парсинг через DOMParser с чанковой
конвертацией (ADR-003), отрисовка треков и waypoints на карте,
панель #sheet-gpx со списком треков, статистикой и canvas-профилем
высот. GPX-слои встают ниже маршрута OSRM и восстанавливаются после
смены стиля карты (REQ-F-13).

- src/web/gpx.js — новый модуль фичи (ADR-002): парсинг, модель
  window.gpxTracks, слои/маркеры карты, sheet-gpx, профиль высот
- index.html / app.css — кнопка загрузки, кнопка тулбара, панель
  #sheet-gpx, toast-уведомления, индикатор парсинга
- app.js — один хук rebuildGpxOverlays() в rebuildMapOverlays()
- тесты: gpx.test.js (node --test, U-01..U-21) +
  test_gpx_upload.py (pytest: статические проверки + JS-раннер)

Refs: ET-006

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 01:00:27 +00:00
62c2ee85dc architect(ET-006): ADR-002/003, infra-requirements, data-requirements, tech-risks 2026-05-22 00:42:00 +00:00
2104f12d86 docs(ET-006): TRZ v2 — persist GPX layers across map style switch 2026-05-22 00:42:00 +00:00
73b29aeba8 docs(ET-006): status → approved 2026-05-22 00:42:00 +00:00
dcf3d244f7 docs(ET-006): BRD, ТЗ, AC, Test Plan — загрузка GPX-треков 2026-05-22 00:42:00 +00:00
fda40f20fe architect(ET-006): ADR-002/003, infra-requirements, data-requirements, tech-risks
All checks were successful
CI / lint (push) Successful in 3s
CI / test (push) Successful in 4s
CI / build (push) Successful in 3s
2026-05-22 03:38:47 +03:00
a0546abdd1 docs(ET-006): TRZ v2 — persist GPX layers across map style switch
All checks were successful
CI / lint (push) Successful in 3s
CI / test (push) Successful in 5s
CI / build (push) Successful in 1s
2026-05-22 03:33:15 +03:00
9fc1ef485a docs(ET-006): status → approved
All checks were successful
CI / lint (push) Successful in 3s
CI / test (push) Successful in 4s
CI / build (push) Successful in 3s
2026-05-22 03:21:27 +03:00
9b930c5c83 docs(ET-006): BRD, ТЗ, AC, Test Plan — загрузка GPX-треков
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 4s
CI / build (push) Successful in 3s
2026-05-22 03:16:20 +03:00
6effac9cce Merge pull request 'ET-005: переключатель единиц измерения расстояний (км/мили)' (#6) from feature/ET-005- into main
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
2026-05-22 01:50:13 +03:00
3f6e7ae284 tester(ET): auto-commit from tester run_id=12
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 4s
CI / lint (pull_request) Successful in 4s
CI / test (pull_request) Successful in 5s
CI / build (push) Successful in 3s
CI / build (pull_request) Successful in 1s
2026-05-21 21:29:11 +00:00
d32ad8f018 reviewer(ET): auto-commit from reviewer run_id=11
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 5s
CI / lint (pull_request) Successful in 3s
CI / build (push) Successful in 2s
CI / test (pull_request) Successful in 4s
CI / build (pull_request) Successful in 3s
2026-05-21 19:59:23 +00:00
2fe5cfe453 feat(web): переключатель единиц измерения расстояний (км/мили)
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 5s
CI / build (push) Successful in 2s
CI / lint (pull_request) Successful in 4s
CI / test (pull_request) Successful in 4s
CI / build (pull_request) Successful in 1s
Добавляет сегментированный toggle км/мили в попап рельефа. Новый модуль
src/web/units.js — единственный источник истины по выбору единицы, её
персистентности (localStorage: distance_unit, дефолт km) и форматированию
отображаемых расстояний (Units.formatDistance).

Все места форматирования в app.js переведены на централизованный
форматтер; пересчёт всех видимых расстояний выполняет единый оркестратор
onUnitChange по событию unitchange (карточки маршрутов, лист точек,
линейка, масштабная линейка, связка, «красивый» маршрут).

Экспорт GPX и параметры построения маршрута остаются метрическими
(риск R6). units.js подключается строго перед app.js (риск R7).

Refs: ET-005
2026-05-21 19:36:13 +00:00
bafbea2dab architect(ET-005): ADR, infra-requirements, data-requirements, tech-risks
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 5s
CI / build (push) Successful in 1s
2026-05-21 22:18:08 +03:00
2458a3efe0 docs(ET-005): Test Plan
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 4s
CI / build (push) Successful in 1s
2026-05-21 22:07:40 +03:00
2d29106c45 docs(ET-005): Acceptance Criteria
All checks were successful
CI / lint (push) Successful in 3s
CI / test (push) Successful in 4s
CI / build (push) Successful in 2s
2026-05-21 22:05:33 +03:00
2f2beb0447 docs(ET-005): TRZ
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 4s
CI / build (push) Successful in 1s
2026-05-21 22:05:21 +03:00
420df39347 docs(ET-005): BRD
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 4s
CI / build (push) Successful in 1s
2026-05-21 22:05:07 +03:00
d16a4747a0 docs: init ET-005 business request
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 4s
CI / build (push) Successful in 2s
2026-05-21 22:02:32 +03:00
b725810404 Merge pull request 'feat(web): POI visibility checkbox in terrain popup (ET-002)' (#5) from feature/ET-002-poi-toggle into main
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
2026-05-21 19:36:21 +03:00
9ffd6f4b7e Merge branch 'main' into feature/ET-002-poi-toggle
All checks were successful
CI / lint (push) Successful in 3s
CI / test (push) Successful in 4s
CI / lint (pull_request) Successful in 3s
CI / build (push) Successful in 2s
CI / test (pull_request) Successful in 4s
CI / build (pull_request) Successful in 3s
2026-05-21 19:33:41 +03:00
c36ee9d39e test(ET-002): test report PASS - all tests green, ready to deploy
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 5s
CI / lint (pull_request) Successful in 3s
CI / test (pull_request) Successful in 4s
CI / build (push) Successful in 3s
CI / build (pull_request) Successful in 1s
2026-05-21 19:29:40 +03:00
a4a0aabfc3 docs(ET-002): code review APPROVED - no P0/P1 findings
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 5s
CI / lint (pull_request) Successful in 4s
CI / test (pull_request) Successful in 4s
CI / build (push) Successful in 3s
CI / build (pull_request) Successful in 3s
2026-05-21 19:19:42 +03:00
8c17a4f508 feat(web): add POI visibility checkbox to terrain popup
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 5s
CI / build (push) Successful in 15s
CI / lint (pull_request) Successful in 4s
CI / test (pull_request) Successful in 4s
CI / build (pull_request) Successful in 3s
Adds a «POI» checkbox to the terrain popup that toggles the
poi-circles and poi-labels layers via map.setLayoutProperty. The
choice is persisted in localStorage (key `poi-visible`) and restored
on page load and after style changes, kept consistent with the
runtime layerState.poi per ADR-0001.

Tests: behavioral JS unit tests (TP-01..TP-04) run via `node --test`,
wrapped by tests/unit/test_poi_toggle.py with static structure checks
so they execute under the existing `pytest tests/` CI step.

Refs: ET-002

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 15:50:54 +00:00
af579f7f2a docs(ET-002): add ADR-0001 and infra requirements for POI toggle
All checks were successful
CI / lint (push) Successful in 4s
CI / test (push) Successful in 4s
CI / build (push) Successful in 3s
Record architecture decision to implement POI visibility toggling
client-side (setLayoutProperty + localStorage), reusing the existing
layerState model, with no backend, DB or infrastructure changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 14:51:37 +00:00
73c9dc46a0 docs(ET-002): status → approved 2026-05-20 10:04:56 +03:00
f1f4d5f336 docs(ET-002): BRD, ТЗ, AC, Test Plan — чекбокс POI в попапе рельефа 2026-05-20 09:54:32 +03:00
832099c3c6 docs: restructure phases — per-phase BRD, remove monolithic pilot BRD 2026-05-18 08:47:22 +03:00
f561c3bd41 fix: switchMapStyle loads style as JSON with absolute tile URLs
Fixes trails/tracks not rendering after theme switch.
The issue was that map.setStyle(url) caused MapLibre to resolve
relative tile paths without /enduro/ prefix, resulting in 404s.
2026-05-17 11:03:51 +03:00
fdc9836690 Merge PR #4: restore UI phase 5.4 + ET-001 2026-05-16 23:51:54 +03:00
8d36f38be6 fix: restore UI to phase 5.4 (terrain, scale bar, zoom controls)
All checks were successful
CI / lint (push) Successful in 5s
CI / test (push) Successful in 9s
CI / build (push) Successful in 18s
CI / lint (pull_request) Successful in 5s
CI / test (pull_request) Successful in 9s
CI / build (pull_request) Successful in 2s
2026-05-16 22:17:10 +03:00
00859de48e Merge pull request 'feat(ET-001): exclude barriers and footways from OSRM routing' (#3) from feature/ET-001-barriers-footways into main
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
2026-05-15 22:21:16 +03:00
0d57e470a1 test(ET-001): test report — PASS
All checks were successful
CI / lint (push) Successful in 9s
CI / test (push) Successful in 5s
CI / build (push) Successful in 3s
CI / lint (pull_request) Successful in 4s
CI / test (pull_request) Successful in 5s
CI / build (pull_request) Successful in 4s
All 8 pytest cases pass, ruff clean on src/ and tests/.
5/5 test plan TCs covered (TC-001..TC-005). No P0/P1/P2 bugs.
Verdict: PASS → stage:ready-to-deploy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 22:19:17 +03:00
d17162908f review(ET-001): code review — APPROVED
All checks were successful
CI / lint (push) Successful in 7s
CI / test (push) Successful in 6s
CI / build (push) Successful in 8s
Все AC выполнены, ruff чистый, 7/7 тестов проходят. Замечания только P3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 22:15:42 +03:00