Skip to content

Stop contributor comments rendering as page text - #89

Merged
richardkfm merged 1 commit into
mainfrom
claude/omos-predefined-map-targets-8ew3z5
Aug 21, 2026
Merged

richardkfm merged 1 commit into
mainfrom
claude/omos-predefined-map-targets-8ew3z5

Conversation

@richardkfm

Copy link
Copy Markdown
Owner

Django's {# … #} is a single-line comment. Five comments in the templates spanned several lines, which leaves the closing marker unmatched and puts the whole note on the page as visible text.

Spotted in a screenshot of the map: the target-area panel was showing {# The street-space layers are among the heaviest a workspace has, so they are offered rather… to the viewer.

Template What was leaking
workspaces/map.html the street-space note under "Show target areas"
workspaces/map.html the Vision Zero note in the target form
workspaces/methodology.html the area-target section note
datasets/_provenance_badge.html the badge's usage note
datasets/catalog_browse.html the search-bar gating note
datasets/_test_panel.html the panel's purpose note

All are now {% comment %} … {% endcomment %}, which is the multi-line form. Two came in with the target-areas feature (#86); the other three predate it — the provenance badge appears on every data-source row, so that one was on screen a lot.

Also removes a redundant syncAccidentLayers() call added in #88 next to the one the accidents branch already makes.

Verification

  • All 28 templates render-parse.
  • grep -rn "{#" backend/templates/ | grep -v "#}" returns nothing, so no multi-line comment remains anywhere in the template tree.
  • Full suite: 342 tests, the same 13 pre-existing failures as before this change.
  • ruff 0.15.8 clean.

Still open

This does not address the accidents heatmap still rendering empty after #88. The layer now downloads completely (200, 24.49 MB, 2.08 MB over the wire), so the remaining problem is on the display or filter side, not the transport side. That is being investigated separately.

Governance

VERSION 0.48.2 → 0.48.3 (PATCH — bug fix only). CHANGELOG.md under [Unreleased] / Fixed, README badge synced.


Generated by Claude Code

Django's {# … #} is a single-line comment. Five of them in the templates
spanned several lines, which leaves the closing marker unmatched and puts
the whole note on the page as visible text:

  workspaces/map.html      the street-space layer note under "Show target
                           areas", and the Vision Zero note in the target
                           form
  workspaces/methodology.html   the area-target section note
  datasets/_provenance_badge.html
  datasets/catalog_browse.html
  datasets/_test_panel.html

All five are now {% comment %} … {% endcomment %}, which is the multi-line
form. Two came in with the target-areas feature; the other three predate
it.

Verified by rendering: all 28 templates parse, and no {# without a closing
#} on the same line remains anywhere under backend/templates. Full suite:
342 tests, the same 13 pre-existing failures. ruff 0.15.8 clean.

VERSION 0.48.2 -> 0.48.3 (PATCH: bug fix). CHANGELOG and README badge
updated.
@richardkfm
richardkfm marked this pull request as ready for review August 21, 2026 09:10
@richardkfm
richardkfm merged commit beb2dbf into main Aug 21, 2026
3 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