From 28e0ba7104e6562c2ab4c48eb857780804d8efd6 Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Tue, 20 Oct 2026 14:02:09 +0400 Subject: [PATCH] fix(street-level): /revmain cleanup after the slim rebuild - Google 3D: the OPEN button re-measures a ground whose tiles are still loading (a few times, a second apart) and on a map change, not only after the next camera move. - Mapillary: two mounts on one host during the first download share one build instead of leaking a second WebGL viewer. - Retired floating-panel keys (v8 panelPos, panelFloatHintShown) are dropped from localStorage; dead inline-position resets, the drag JSDoc and the dead qa-ui-disposal observer branch are gone. - Docs: z ladder, panel chrome, position storage and the fixture gate's actual coverage; changelog fragment for #974 (old .gev-cache/mapillary can be deleted). - ru/es: the layer is named as everywhere else in the UI. - Fixtures and test fakes: unused exports removed; a fake credit removal of an absent credit no longer drops another one; the tile test reset frees upstream slots. Co-Authored-By: Claude Opus 5.5 --- changelog.d/974-street-level-slim.md | 6 ++ docs/CODE-BOUNDARIES.md | 4 +- docs/CURRENT-STATE.md | 13 ++-- scripts/fixtures/street-level/kartaView.mjs | 5 -- scripts/fixtures/street-level/panoramax.mjs | 2 +- scripts/format-scope.json | 1 + scripts/qa-ui-disposal.mjs | 13 +--- server/providers/mapillary/tiles.js | 4 +- src/i18n/locales/es.json | 2 +- src/i18n/locales/ru.json | 2 +- src/layers/streetLevel/index.js | 40 ++++++++++-- src/layers/streetLevel/index.test.mjs | 63 ++++++++++++++++++- .../streetLevel/providers/mapillary/viewer.js | 16 ++++- src/layers/streetLevel/selection.test.mjs | 13 ++++ src/layers/streetLevel/viewerHost.test.mjs | 13 ++++ src/testSupport/streetLevelFakes.mjs | 7 ++- src/ui/applicationShell.js | 16 +---- src/ui/panelLayoutController.js | 8 --- src/ui/panelPositionControls.js | 16 +++++ src/ui/panelPositionControls.test.mjs | 34 ++++++++++ src/ui/shellLifecycle.test.mjs | 14 +---- src/ui/styles/foundation.css | 2 +- 22 files changed, 220 insertions(+), 74 deletions(-) create mode 100644 changelog.d/974-street-level-slim.md create mode 100644 src/ui/panelPositionControls.test.mjs diff --git a/changelog.d/974-street-level-slim.md b/changelog.d/974-street-level-slim.md new file mode 100644 index 000000000..8bc2b5346 --- /dev/null +++ b/changelog.d/974-street-level-slim.md @@ -0,0 +1,6 @@ +- Street Level is rebuilt around one small provider registry: Mapillary, + KartaView, Panoramax and Google Street View share one coverage drawer and + one photo viewer, one source lit at a time. Floating and docked panels, + FOLLOW, surface modes, the legend and the Mapillary proxy's disk cache are + gone; `.gev-cache/mapillary/` from earlier runs is no longer read and can be + deleted (gekh, #974). diff --git a/docs/CODE-BOUNDARIES.md b/docs/CODE-BOUNDARIES.md index 19a5ee372..eb393a2da 100644 --- a/docs/CODE-BOUNDARIES.md +++ b/docs/CODE-BOUNDARIES.md @@ -356,8 +356,8 @@ drag or final change. Feature adapters own data mapping and service subscription generic modules own DOM/listeners/timers and release them in `destroy()`. Keep persistence with panel chrome: collapse uses -`godsEyeView.v6.panelCollapsed.`, position uses -`godsEyeView.v8.panelPos.`, and share state uses the registered panel id. +`godsEyeView.v6.panelCollapsed.`, positions are +not stored (`godsEyeView.v8.panelPos.` stays reserved), and share state uses the registered panel id. Do not rename existing ids or reset persistence versions when adding a body. The WEATHER adapter is `src/ui/weatherPanel.js`; its observed-history selection remains transient. diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 9efbd4a94..3dfd73700 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -651,7 +651,7 @@ The UI facade composes separate owners for navigation authority, share restorati visual settings and panel chrome. Navigation owns request generations and follow handoff; restoration owns its coordinator, deferred notices, gestures and timer; visual settings own style/detection overrides and sensor cleanup; panel chrome -owns disclosure, docking and Cockpit panel snapshots. Each takes explicit +owns disclosure and Cockpit panel snapshots. Each takes explicit operations and reads instead of the complete shell. Existing controls, share formats and one-application-per-page behavior are preserved. @@ -977,10 +977,9 @@ start with current state, isolate listener failures and stop on disposal. The standalone entry composes the UI with the application's existing layer, terrain, navigation and rendering operations. The shell receives those instances -and assembles the controls. Panel layout scheduling, position preferences and -active drags, loading notices, recording presentation and DOM lookup have focused +and assembles the controls. Panel layout scheduling, loading notices, recording presentation and DOM lookup have focused owners. Disposal revokes queued presentation and listeners before asynchronous -Context restoration, cancels an unfinished drag without saving it, restores the +Context restoration, restores the recording HUD and releases status decoration without replacing accessible text. The ordinary control snapshot includes the current 3D model toggle and mode. @@ -3771,7 +3770,9 @@ runs against real Mapillary and needs `MAPILLARY_CLIENT_TOKEN`. `npm run qa:street-level:fixtures -- --url ` answers every Mapillary request from fixtures (`providers/mapillary/coverageFixture.mjs`, `scripts/fixtures/street-level/`), and KartaView's and Panoramax's too, so it -needs no network and covers the whole photo flow. CI runs the fixture gate against a production build served by `vite preview` with a dummy token. +needs no network. It opens and closes a photo from Mapillary, KartaView and +Panoramax; stepping, EXPAND, FIT/FILL, the filters and Street View stay with +the unit tests. CI runs the fixture gate against a production build served by `vite preview` with a dummy token. Directions is a keyless front end to the routing the voice agent already uses. Its row chips are the whole interface: DRIVE / WALK / BIKE pick the @@ -5064,7 +5065,7 @@ pins and share links already supply complete boxes. Pixel-mode pinch deltas receive bounded amplification before reaching the canvas; ordinary wheel, line/page-mode and native touch-pinch paths are left unchanged. The application scene owns and removes the relay listener. -- Z ladder: panels promote within 100–139 (renormalized on wrap), voice pill 150, toast 200, clean-view exit 300. +- Z ladder: panels around 100, voice pill 150, toast 200, clean-view exit 300. - Panel POSITION keys are versioned `v8` (`godsEyeView.v8.panelPos.`); collapsed-state keys remain `v6`. The one-time position reset clears stale DISPLAY placements that could overlap the Context rail. - Map Source lives in the bottom Visual Presets tray. The left accordion contains no MAP STACK panel, and the `k` panel token that addressed it is gone from the share registry, so legacy `ui=k...` state takes the ordinary unknown-token skip. - A dock popover (Visual Presets, Location) auto-dismisses on mouse-away unless pinned. Focus inside the tray defers that dismissal only when the browser reports `:focus-visible` — keyboard focus and typed-into fields hold the tray open; a mouse-clicked tile does not, because Chromium focuses a `