feat: major architecture overhaul, in-place editing, and memory optimization#2
Merged
Conversation
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.
Context
We've observed the need for a major restructure of the application's UX and architecture. Previously, taking a capture would spawn a completely separate editor window, which disrupted the user's workflow. We needed a seamless, in-place editing experience where users could manipulate annotations right on the screen immediately after selecting a region.
Alongside the UX issues, we identified severe memory inefficiencies. The application was keeping multiple hidden windows running in the background at all times (Control Panel, Settings, Editor, and the Fullscreen Overlay). Additionally, the heavy image buffer of the last capture was kept in memory indefinitely because the old editor relied on it.
This massive refactoring gives users the power to edit annotations freely from a floating toolbar, automates the scrolling capture, introduces new tools and shortcuts, and drastically optimizes the application's lifecycle and RAM usage under the hood.
Proposed resolution
Shiftkey.textareaoverlay automatically resizes to match the text dimensions without clipping.SelectandErasertools to the suite, expanding the hotkeys to1-9. Changed size and thickness modifiers to[and](andCmd + [/Cmd + ]for font sizing while typing). AddedBackspaceandDeletesupport to instantly remove selected annotations. Updated the settings Cheat Sheet and the repository's README to reflect these changes.historySnapshotcapturing mechanism to fix asynchronous React closure bugs. Actions such as moving, erasing, deleting, or editing properties now correctly push their states to theundoStackwithout clearing the screen or grouping unrelated actions.control_paneltocapture_menuacross the project. Added a vertical separator in the toolbar to distinct tools from actions. Addressed bugs causing scrolling capture and the menu icon to freeze the screen.Impact
This PR completely overhauls the user experience and application performance.
UX Impact: The workflow is now incredibly fast and immersive. Users have absolute freedom to tweak their visual tutorials post-creation in-place, without having to undo and redraw to fix a slightly misaligned rectangle, a typo, or a wrong color. The automated scrolling capture makes long document saving effortless.
Performance Impact: Massive reduction in RAM consumption. By eliminating the background Editor window, transitioning Settings and Capture Menu to on-demand spawning, and aggressively clearing the image buffer upon completion, the application runs significantly lighter and more efficiently.
Screenshots (if applicable)
Impacted resources
App.tsx)stitcher.rs/lib.rs)textarea)Testing/validation
Selecttool and click on the elements. Verify that the bounding boxes and resize handles appear.Shiftto test proportions.BackspaceorDeleteto verify the selected annotation is removed.Cmd + [andCmd + ]while typing.Eraseron the blur stroke and verify it removes the entire stroke.Undo (Cmd+Z)andRedo (Cmd+Shift+Z)to ensure each state (including property changes and deletions) is restored perfectly.Rollback plan
If major regressions are found in the history stack, rendering logic, or window management:
References
N/A