Control descriptions: full IOF coverage, smarter autodetect, print/editor sheet parity - #27
Merged
Merged
Conversation
Data model and sheet - ControlDescription gains e (appearance / second feature) and h (other information); dimensions move from column E to F as the spec requires. One shared descriptionCells() converter replaces the two duplicated OCAD->IOF converters. - courses.description_instructions (JSONB, new migration) holds special-instruction rows (13.x) and the finish variant (14.x). - Shared buildDescriptionSheet() row model: 3-row IOF header (event / classes / course . length . climb), start row, controls, specials, finish with the measured last-control -> finish distance. Used by the on-map sheet in the course editor, the print block and the layout editor preview so screen and print are identical. - IOF sheet rules: bold header with thick cell rules, thick line under start, after every third description, on either side of a special instruction and above the finish; thick verticals after columns C and F (A B C | D E F | G H); alternate row shading. Editor - Reworked ControlDescriptionEditor: labelled 3x3 compass grid for column C, visible names under every symbol (mobile), E/H sections, live summary sentence, bottom sheet on narrow screens. en/sv. - Crosshair cursor in editor mode and a magnifier loupe while dragging (MapLoupe over passive TileLayers sharing the blob cache). - Context-menu actions are disabled instead of silently ignored while a save is in flight or the control list has not loaded. Autodetect - New passes: crossing/junction (F, with the second feature in E, also path . path . junction), bend, free end, which-of-similar (C), side-of / outside corner for compact areas, edge / part / inside and outside corner for extended areas. - OCAD Bezier segments are flattened onto the drawn curve; junction snap tolerance 0.3 mm; within 1.5 mm the junction replaces the plain line candidate. - Extended areas rank by depth-from-edge + 0.5 mm so a boulder beside the control beats the open land it stands in. - autoDescribe fills the top candidate on create; on move it replaces an untouched auto description (never a hand-edited one). The menu offers a single replacement suggestion only when it differs. Also fixes a flaky runner-count read in structured-search-names.spec. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings control descriptions to full IOF 2018/2024 coverage and fixes the field-testing findings that followed.
Data model & sheet
ControlDescriptiongainse(appearance / second feature) andh(other information). Dimensions move from column E to F per the spec. One shareddescriptionCells()replaces two duplicated OCAD→IOF converters.courses.description_instructionsJSONB (migration20260924180000_course_description_instructions) for special-instruction rows (13.x) and the finish variant (14.x).buildDescriptionSheet()row model: 3-row IOF header (event / classes / course · length · climb), start row, controls, specials, finish with the measured last-control → finish distance. Used by the on-map sheet, the print block and the layout-editor preview, so screen and print are identical.Editor
ControlDescriptionEditor: labelled 3×3 compass grid for column C, visible symbol names (mobile-friendly), E/H sections, live summary sentence, bottom sheet on narrow screens.en/svcomplete.MapLoupeover passiveTileLayers sharing the blob cache).Autodetect
path · path · junction), bend, free end, which-of-similar (C), side-of / outside corner for compact areas, edge / part / inside & outside corner for extended areas.autoDescribefills the top candidate on create; on move it replaces an untouched auto description (never a hand-edited one). The menu offers a single replacement suggestion only when it differs.Also fixes a flaky runner-count read in
structured-search-names.spec.ts.Docs
docs/course-editor.md,docs/course-maps.md,docs/control-descriptions-and-editor-geometry.md,docs/features.md, newdocs/bugfix-control-description-columns.md.Verification
pnpm build— cleanhost-dbstack rebuilt (oxygen-api/oxygen-webBuilt + Started)Major-version drift (informational)
vitest4.1.10 → 5.0.1,@vitest/coverage-v84.1.10 → 5.0.1typescript6.0.3 → 7.0.2dotenv17.4.2 → 18.0.3prisma7.9.1 → 8.0.0-rc.15 (RC — do not bump yet)Out of scope / follow-ups
Purple Pen / IOF XML import-export of descriptions, upper/lower column C from contours, dimension symbols 9.x beyond free text.