Skip to content

v78–v79: deletable reference points + undo/redo, and a phone bottom sheet - #2

Merged
danlessa merged 2 commits into
mainfrom
claude/reference-delete-undo-redo-6un2o1
Sep 20, 2026
Merged

danlessa merged 2 commits into
mainfrom
claude/reference-delete-undo-redo-6un2o1

Conversation

@danlessa

@danlessa danlessa commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Summary

Two releases, one per commit (changelog trio + sw.js VERSION move together in each):

v78 — reference points are editable

  • Delete by clicking a marker. Each reference marker opens a popup with its label (ref N · r, c) and a "Remover esta referência" button. Deleting splices the ref out, renumbers the survivors, nulls refPopM and invalidates the cached accessibility matrix (same as any ref-set change). Marker clicks stop propagating so inspecting a ref never drops a new one underneath.
  • Undo / redo bar (↶ ↷) parked directly under the 🔍 search button in the Leaflet top-left column, plus Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y outside text inputs. Snapshot history of the ref set: map click, popup delete, Place random / census (one step per batch), Clear refs, GeoJSON load, bundle import. No-op operations (clearing an empty set) are dropped. Snapshots carry qmcIndex, refPopM and the "N references" cap; restore rebuilds markers directly so a cap lowered after the snapshot cannot FIFO-trim what undo brings back. History resets on DEM load (snapshots index the old grid). Compute-time network re-snapping is deliberately not recorded.

v79 — phone layout: bottom sheet instead of a sidebar

  • At ≤ 860 px the slide-in drawer becomes a bottom sheet with three snap points: peek (handle + Compute), half (52 %, default on load) and full. Drag the head to snap to the nearest point; tap the handle to cycle.
  • Compute + time estimate move into the sheet head on phones and return to #run-slot on desktop (same elements reparented, so app.js's runBtn reference is untouched). A map tap collapses to peek via the existing __simuDrawer.close() hook.
  • Hamburger and backdrop hidden on phones; right stack is locate / layers; status pill moves to top centre; in the full state the floating map controls hide.
  • Touch targets ≥ 40 px, 16 px inputs (no iOS focus zoom), 20 px checkboxes, overscroll-behavior: none.
  • The drawer inline script's CSP sha256 hash was recomputed (the body changed — the old hash silently disabled the script).

Desktop layout is unchanged.

Test plan

  • node test-worker-pool.mjs, node test-dem-smoothing.mjs, node test-water-raster.mjs pass (no engine changes; run as regression).
  • Headless Chromium (Playwright) smoke test on a synthetic 20×20 DEM: click-add, popup delete, renumbering, undo/redo via buttons and keyboard, batch undo of Place random, no-op clear not recorded, cap edge case — 27/27 checks, no page errors.
  • iPhone 13 emulation: sheet loads at half; handle tap cycles full → peek; drag snaps to half; __simuDrawer.close() → peek; Compute visible in every state; status pill at top; resizing desktop ↔ phone moves Compute into the sheet head and back. Desktop 1400×900 renders as before.
  • Manual check on a real phone (Safari iOS + Chrome Android): drag feel, safe-area padding, keyboard behaviour on number inputs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LsTBrbygn5kgoLKbRApM9i

claude and others added 2 commits September 20, 2026 13:26
Clicar num marcador de referência abre um popup com o rótulo e o botão
"Remover esta referência" (sobreviventes renumeradas, matriz de
acessibilidade invalidada; o clique não atravessa para o mapa).

Barra ↶ ↷ estilo zoom estacionada logo abaixo do botão 🔍 (Ctrl+Z /
Ctrl+Shift+Z / Ctrl+Y fora de campos de texto) com histórico de snapshots
do conjunto: clique no mapa, remoção, Distribuir aleatórias/censo (lote =
um passo), Limpar, GeoJSON e importação de bundle. A snapshot carrega
qmcIndex, refPopM e o campo "N referências"; a restauração reconstrói os
marcadores sem passar pelo corte FIFO. Zera ao carregar outro DEM.

Changelog trio (CHANGELOG.md, help modal, sw.js) + VERSION v77 → v78.

Co-Authored-By: Danilo Lessa Bernardineli <danilo.lessa@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsTBrbygn5kgoLKbRApM9i
…oque

Em telas ≤ 860 px a gaveta lateral deslizante é substituída por uma folha
ancorada embaixo com três posições (mínima / meia / cheia): arrasto pela
cabeça com encaixe na mais próxima, toque na alça alterna. O botão Calcular
(+ estimativa) é movido para a cabeça da folha no celular e volta ao
#run-slot no desktop; um toque no mapa recolhe a folha para a mínima
(__simuDrawer.close). Hambúrguer e pano de fundo escondidos no celular;
pilha da direita localizar/camadas; pílula de status no topo; na posição
cheia os controles flutuantes do mapa se escondem.

Alvos de toque ≥ 40 px, campos com 16 px (sem zoom de foco no iOS),
overscroll-behavior none. Hash CSP do script inline da gaveta recalculado.

Changelog trio (CHANGELOG.md, help modal, sw.js) + VERSION v78 → v79.

Co-Authored-By: Danilo Lessa Bernardineli <danilo.lessa@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsTBrbygn5kgoLKbRApM9i
@danlessa danlessa changed the title v78: referências removíveis pelo marcador + desfazer/refazer do conjunto v78–v79: deletable reference points + undo/redo, and a phone bottom sheet Sep 20, 2026
@danlessa
danlessa merged commit 1f456a7 into main Sep 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants