Implement Atlas Controls#355
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the 'Atlas' canvas feature, integrating tldraw to provide an interactive, camera-tracked workspace. It establishes a comprehensive set of reusable components, including a customizable Button, a loading Skeleton, and a flexible Card system supporting text and chart variants (with tabbed line-chart and table views powered by recharts). Additionally, the PR updates the frontend style guides to enforce category-first naming and flat-by-default folder structures, introduces several SVG icons, and adds utility functions and hooks for layout and resize handling. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Implement Atlas Controls
Adds the floating control chrome for the Atlas (tldraw) canvas — a zoom control, export button, and a tool palette — plus the supporting design-system pieces (icons, tokens, typography, a
Buttonsize variant).Controls component
scopes/atlas/components/controls.tsx+.module.scss, rendered through tldraw'sInFrontOfTheCanvasslot so it reads live editor state viauseEditorwhile staying out of the canvas transform.0–200scale via a newmapRangehelper, and steps by a constant amount.select/hand/text), with the active tool highlighted.Buttonelement with per-statecolorSchemes.Atlas editor config
scopes/atlas/config.tscentralizes the zoom config:MIN_ZOOM/MAX_ZOOMand an evenly-spacedZOOM_STEPSarray generated from a single display-step value (keeps the on-screen increment constant), plus the display range.atlas.tsxnow caps the camera zoom (setCameraOptions), styles the built-in text tool to match the design system, and tints the selection stroke from the accent token (updateThemes). Selection colours are also wired through--tl-color-*overrides inatlas.module.scss.Design system
cursor,hand,insert_text,minus,plus.Button: new requiredsizeprop ('small' | 'large') →data-size.colors.json): addedcontrol-surface,control-surface-hover,control-accent,control-accent-content,control-content, andsurface-content; renamedcard-shadow→shadow.type-control → type-label-large,type-label → type-label-medium,type-tab → type-label-small(title/bodyunchanged); all usagesupdated.
Follow-ups
Controlsexport button is a no-op (// TODO: Support export here) — needs wiring to the canvas export API.Testing
pnpm lint(type-check + Biome + Stylelint) andpnpm buildpass.