Repository navigation
Fix project-review bugs, autosave and export issues, and code health - #1
Merged
Merged
Conversation
Open Project (picker, drag-and-drop and the sample project) loaded straight over unsaved content. All opens now go through requestOpenProject, which asks first via ReplaceProjectModal (the generalized New Project dialog). Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
index.html hardcoded the analytics hostname, so the __ODS_HOSTNAME__ token the Vite plugin replaces never existed and the env setting was ignored. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Exports rendered the full map at native size with no pixel cap, and iOS Safari silently fails to encode canvases above ~16.7M pixels. On iOS the export is now scaled to fit, the modal says so, and encoding or render failures show an error instead of an unhandled rejection. Desktop keeps full resolution. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
validateProjectFile only checked that tracks, paths and annotations were arrays, so a damaged entry got through and crashed rendering later. Each entry is now checked for the fields and numeric coordinates the canvas needs, and the error names the damaged entry. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Every autosave re-encoded the whole project, including the base64 map image (up to ~27MB), on the main thread. The image is now written to its own IndexedDB key only when it changes, and the project JSON keeps a placeholder. Projects saved by older builds still load and are migrated on their next save. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
setMapImage sat outside the undo snapshot, so replacing or dropping in a new map could not be undone. The image is now part of the snapshot and goes through the same history recording as other edits. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Autosave was silent, so users could not tell whether their work was saved. The status bar now shows Saving, Saved HH:MM or Autosave failed. A close prompt appears only when an edit is still waiting to be written or the last write failed. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Exporting a non-component function from TopBarMenu.tsx broke Fast Refresh and caused the only lint warning in the project. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Six modals repeated the same window keydown listener. They now call one hook. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The validator and the iOS export-scale rule lived inside modules that import the store and canvas, so they could not be tested directly. Both are now standalone, with the device passed in for export scaling. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…wport math Adds npm test (vitest run) with Vitest 4.1.11. The first suite covers the project file validator (including the bundled sample), iOS export scaling, viewport clamping and text-scale helpers. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The README was still the Vite template. It now covers setup, scripts, the env setting, project layout and the .anal format. CI runs lint, tests and the production build on pushes to main and on pull requests. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Nothing called it; export goes through ExportModal and downloadExport. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Replaces package-lock.json with bun.lock (regenerated with Bun 1.3.11) so the repo has a single lockfile. The README and CI workflow now use bun install (frozen lockfile), bun run lint, test and build. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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
Fixes the bugs from the project review and adds the code-health and UX work
requested alongside them. Each change is its own commit so they can be reviewed
or reverted individually.
Bug fixes
VITE_ANALYTICS_HOSTNAMEnow takes effect.index.htmlhardcoded the domain, so the build-time token never matched..analentries are rejected up front. Each track, drawing, annotation and map image is checked, and the error names the bad entry.Performance
UX
Code health
useEscapeKey.npm test) with 21 tests on those modules.Testing
npm test,npm run lint,npm run buildpass locally.Notes for review
package-lock.jsonwas replaced by a regeneratedbun.lock, and the README and CI use Bun commands.🤖 Generated with Claude Code