Skip to content

refactor(map-editor): review follow-up on the AI map editor - #581

Merged
camreeves merged 1 commit into
PPT-2832-ai-map-reviewfrom
PPT-2832-codex-review
Oct 15, 2026
Merged

camreeves merged 1 commit into
PPT-2832-ai-map-reviewfrom
PPT-2832-codex-review

Conversation

@camreeves

Copy link
Copy Markdown
Contributor

Review follow-up for the Codex half of the AI map editor UI, stacked on #570 (base PPT-2832-ai-map-review).

Change

  • annotationPoints() in ai/annotations.ts now works out the points a mark covers: its path, its box corners and an arrow's tip. The context builder, which decides whether a mark lies outside the map, and the snapshot renderer, which grows the picture to fit off-map marks, each had their own copy of that calculation. Behaviour is unchanged.

Reviewed and left alone

  • Coloured, rectangle and freehand annotations, and their hit-testing. Freehand marks are normalised to a bounding box before matching, so the size filter works for them too.
  • Canvas expansion: the root-only rule, keeping the old bounds, the four-times limit, all-or-nothing acceptance, and the live view_box getter.
  • Translucent default fill for new booking overlays, and opacity attributes mirrored into inline styles.
  • Piece association for nested CAD lines and punctuation glyphs in outlined labels.
  • The quota refresh after submit, and a blocked checkbox selection restoring the last valid preview.
  • Map Studio source-SVG preservation. Imported SVGs are sanitised and only ever rendered through <img> data URLs.

Noted, not changed

  • buildProposal now validates the full proposal and then the ticked subset, so every checkbox toggle runs validation twice, render check included. On the large Medibank maps that may be noticeable. Caching the full validation per job would remove it.

Checks: map-editor tests (24 files, 292 tests) and lint pass.

🤖 Generated with Claude Code

The context builder and the snapshot renderer each worked out a mark's extent
from its path points, box corners and arrow tip. Both now use
annotationPoints() from annotations.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
frontend-templates Ignored Ignored Oct 15, 2026 12:10pm UTC

@camreeves
camreeves merged commit 53b7d96 into PPT-2832-ai-map-review Oct 15, 2026
2 checks passed
@camreeves

Copy link
Copy Markdown
Contributor Author

Superseded: this commit was pushed straight to PPT-2832-ai-map-review and is described on #570 (#570 (comment)). GitHub marked this PR merged because its commit is now in that branch; nothing went to develop.

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.

1 participant