Skip to content

Hoist shared constants and dedupe control icons - #102

Merged
veillette merged 1 commit into
mainfrom
cursor/hoist-constants-review-1e69
Jul 23, 2026
Merged

Hoist shared constants and dedupe control icons#102
veillette merged 1 commit into
mainfrom
cursor/hoist-constants-review-1e69

Conversation

@veillette

Copy link
Copy Markdown
Collaborator

Summary

Reviewed the codebase against the fleet scenerystack-constants guidance and hoisted values that were duplicated across files into TrackLabConstants.ts.

Hoisted

  • Screen layout: SCREEN_TOP_MARGIN, VIDEO_PLAYER_LEFT_SPACING, KINEMATICS_GRAPH_BOTTOM_MARGIN (join the other screen offsets already in TrackLabConstants)
  • Resize handles: shared size/offset/dilation used by DataTableNode and ResizeGestureHandler
  • Control-icon geometry: shared by ControlPanel and InfoDialogNode
  • Data precision: DATA_DECIMAL_PLACES for table cells and CSV export
  • Graph pan: PanGestureHandler now uses OVERLAY_DRAG_SPEED + new GRAPH_PAN_SHIFT_DRAG_SPEED

Related cleanup

  • Moved duplicated axes/calibration/magnifier/tracking glyphs into TrackLabIcons
  • Removed unused TRACK_LIST_LEFT_SPACING and PANEL_HEADER_HEIGHT
  • Corrected docs/CLAUDE.md that claimed 26 concurrent tracks; runtime cap is MAX_TRACKS = 4 (A–Z palette remains)

Left local (by design)

File-scoped visual constants (tape/angle endpoints, graph tick fonts, webcam modal radius, OpenCV thresholds, coordinate-system drag speeds) stay at the top of their single consumer.

Verification

  • npm run check — pass
  • npm test — 7/7 pass
  • npm run lint — pass (pre-existing nursery warnings in tests only)
Open in Web Open in Cursor 

Move cross-file layout, resize-handle, control-icon, and decimal-place
constants into TrackLabConstants; share axes/calibration/magnifier/tracking
glyphs via TrackLabIcons; drop unused spacing constants; and align MAX_TRACKS
docs with the runtime cap of 4.
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@veillette veillette left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

@veillette
veillette marked this pull request as ready for review July 23, 2026 19:32
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@veillette
veillette merged commit d2612ad into main Jul 23, 2026
7 of 8 checks passed
@veillette
veillette deleted the cursor/hoist-constants-review-1e69 branch July 25, 2026 03:37
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