Repository navigation
Refactor 5/6: menu parts, redraws and effects; Stash workers; locations - #100
Merged
Merged
Conversation
|
LGTM 👍 The grouped comparisons preserve the distinction between full menu redraws and slider- or strip-only updates. Separate settings snapshots keep an in-progress browser redraw consistent without copying unchanged settings every frame. The Stash workers still publish work under the mutex and stop before joining, and the location helpers preserve the existing library keys and playback behavior for files, links, and Stash scenes. |
seaweeduk
force-pushed
the
refactor/wave-4
branch
from
November 22, 2026 20:14
d34f623 to
7e05671
Compare
seaweeduk
force-pushed
the
refactor/wave-3
branch
2 times, most recently
from
November 22, 2026 20:59
15c0f33 to
c684f02
Compare
seaweeduk
force-pushed
the
refactor/wave-4
branch
from
November 22, 2026 20:59
7e05671 to
3880f06
Compare
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.
Fifth layer of the structural refactor: the menu's buttons get a part kind, redraws are decided by grouped comparisons the compiler checks, what the menu changes goes through one services object, the Stash workers share one worker, and locations get one place. Nothing changes for users.
Steps in this layer: M7, M8, M9, D4, D5, D7, plus their review fixes.
M7: buttons drawn by a part kind.
Button's draw flags and look fields become onePartKindand onelook, anddrawButtonContentis one switch on the kind.Buttongoes from 90 fields to 78, anddrawButtonContentfrom 273 lines to 131. The list's "scroll to this row" is oneListViewport::setPosition.M8: redraws decided by groups.
MenuView's fields are grouped by what a change of them redraws. A field left out of the layout group's comparison doesn't compile:The Stash settings,
ControlMapandGestureMapreach the menu by pointer instead of being copied into the view every frame (two or three copies of each per frame before, none now). The redraw decision is the same field for field.M9: what the menu changes goes through
MenuServices. Ratings, the download queue, saved logins, SFTP host keys and the five sign-ins that run on detached threads go through one struct set at start-up. The menu holds the library and the downloads by const pointer, so a change that skips the services doesn't compile. No effect became a command;MenuCommandis unchanged.D5: one worker for Stash sync, write-back and folder finding.
StashWorker<Shared>owns the thread, the lock, the wake and the stop, and stops and joins in its destructor. Each class keeps its ownpoll(), which differ. Teardown against a server that never answers takes as long as before.D4: one place says what a location is.
locationholdsisStream()(a link or a Stash scene) andisLink()(a link only), which were two functions with the same name, and oneparentFolder()for files, SMB, SFTP and links. Listing, stat, read and remove stay with their callers: each one differs on purpose (statvslstat, what counts as missing, size limits), so joining them would change behaviour. Library keys come out the same for 227 test addresses.D7: ranges in one place. Every setting's range and step is in
value_ranges.h, used by the read, the command and the menu row.settings.confcomes out byte-identical.Review fixes. The folder finder stops before its last wake again. A default
MenuViewpoints at default settings, not null. The browser's fade-in readiness takes only the Offline look, as before M7. One setter installs the menu's services and what it reads.ButtonfieldsdrawButtonContentlinesMenu::updatelinesKnown and left as is
StashWorker::hand()publishes shared work under its mutex before notifying. The later folder and write-back bookkeeping stays on the main thread, and the worker's wait predicate also sees work queued before startup.Important
AI disclosure
anthropic/claude-opus-5-5highopenai/gpt-6.2-astrahighAgent harness OpenCode 2.3.2