Repository navigation
Split App.tsx: side panel and history logic - #34
Merged
Merged
Conversation
- Panel.tsx: the inspector beside the map, props only - history.ts: commit, undo, redo and the sheet list operations as pure functions, now tested (cap, no-op edits, sheet index maths) No behaviour change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016C1G4M3Q75H4ct7Z9N3maY
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.
Stacked on #33 (base is that PR's branch; retarget to
mainonce it merges).App.tsxmixed several jobs. This takes out two, by job, without changing behaviour:src/Panel.tsx: the inspector beside the map (fill, shape, markers, text style, links, picture, notes). It takes props only.src/history.ts: commit, undo, redo and the sheet-list operations (park, add, delete, open) as pure functions. They now have tests (src/history.test.ts): the undo cap, no-op edits, undo/redo, and the index maths of deleting a sheet, none of which had a test before.App.tsxgoes from 1030 to about 900 lines.Not split yet: persistence and file handling, the canvas camera and pointer tools, the map rendering and the toolbar. They share a lot of state with the rest of the component, so each needs its own step.
Checks:
tscclean, 157 vitest tests pass,npm run buildpasses. Smoke test in Chromium against the dev server: the panel renders, Tab adds a topic, undo and redo work, and no console errors. Not run in the Tauri window.Generated by Claude Code