Repository navigation
Cleanup: split the editor's two largest files, de-flake the menu test, auth forms into the model - #87
Merged
Merged
Conversation
The fade lasts 100ms; under a loaded suite the outside click's round trip can outlast it, so the per-frame sampling started after the menu was already gone and saw no frames at all. Freeze the animation as Svelte starts it and check its midpoint instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013y6z25YoKDW67GVGCFrXGC
The login and signup fields lived in component $state, with the password confirmation checked in the signup form. They are now $loginForm and $signupForm, patched like the profile form, and the mismatch is decided in auth.model before registerFx is called. The three copies of `e.data?.data?.<field>?.message || e.message` become pbErrorMessage in shared/api, typed against ClientResponseError instead of `any`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013y6z25YoKDW67GVGCFrXGC
The watchface page's face width, the slider thumb's offset (now computed from the track and thumb sizes, so it is actually centred) and two hex colours. The rest are blank-line-after-vars warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013y6z25YoKDW67GVGCFrXGC
Minor and patch releases only (vite 8.3, svelte 5.57, oxlint 1.89, playwright 1.64, pocketbase 0.27.3, …). The majors — Kit 3, adapter-static 4, vitest 5, TypeScript 7, @beacio/core 2, pixelmatch 8 — are left for their own branches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013y6z25YoKDW67GVGCFrXGC
The selection chrome (boxes, handles, pivot cross, snap guides) now lives in core/render/overlay.ts and the drag/resize/rotate/nudge math in shared/drag.ts, both pure. editor.svelte keeps the pointer and key handlers as glue and fires the same events as before. The selection colour becomes the --color-selection token, read once from CSS. tests/editor-drag.test.ts covers a corner resize. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013y6z25YoKDW67GVGCFrXGC
edit.model mixed actions on the existing layer tree with making new things from scratch. The creation half — number/image/widget, progress line and its recolour, slot and its metric icons, group/procedural ring, a ring's first bitmap, glyph rasterizing, adding/removing the AOD screen — moves to create.model, re-exported through editor.model so components still import a single editorModel. Removing a slot metric edits a slot that exists, so slotMetricRemoved stays in edit.model. create.model imports selectAdded and withAssets from edit.model; edit imports nothing back, so there is no cycle. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013y6z25YoKDW67GVGCFrXGC
GUIDE_COLOR leaves shared/constants.ts for --color-guide in tokens.css, read alongside --color-selection when the canvas loop starts. The snap browser test now loads tokens.css, since it mounts the page without the app's stylesheet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013y6z25YoKDW67GVGCFrXGC
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.
A sweep over the issues a review turned up. Each commit stands on its own.
Editor structure
editor.svelte1329 → 1016 lines: canvas overlay drawing and drag/resize/nudge geometry move into pure modules, with a unit test for the geometry. The selection and snap-guide colours become tokens (--color-selection,--color-guide) instead of hardcoded hex.edit.model.ts1289 → 707 lines: widget creation (number, image, progress line, slot, ring art, font frames, AOD screen) moves tocreate.model.ts, re-exported througheditor.model.ts, so components still import oneeditorModel.Flaky menu test
ui-menu.browser.test.ts › the menu animates shutsampled the 100ms outro frame by frame afterawait click(). Under a loaded suite the click's round trip can outlast the fade, so sampling began after the menu was gone. Reproduced by adding a 250ms delay after the click. The test now freezes the animation as Svelte starts it and checks the midpoint. It passes with the same delay and still fails when the transition is removed.Auth
$stateinto$loginForm/$signupForm. The password-confirmation check moves intoauth.model, beforeregisterFx.pbErrorMessage(e, ...fields)inshared/apireplaces threeany-typed copies of the PocketBase error parsing.Small
Verification:
pnpm check,lint,format:checkandbuildare clean.pnpm test: 60 files, 343 passed, 1 skipped.🤖 Generated with Claude Code
https://claude.ai/code/session_013y6z25YoKDW67GVGCFrXGC