Repository navigation
Refactor 3/6: first features out of the frame loop - #98
Merged
Merged
Conversation
|
LGTM 👍 The extracted features preserve the frame-loop ordering that matters: delete confirmation still checks the playing file, seek cancellation keeps its pause and resume behavior, and deferred settings are saved before playback switches files. The menu dispatch table retains each page’s layout, redraw, and navigation behavior. The shared data helpers leave database schemas, transaction boundaries, and download limits unchanged. |
seaweeduk
force-pushed
the
refactor/wave-1
branch
from
November 22, 2026 20:14
333e557 to
fa8a120
Compare
seaweeduk
force-pushed
the
refactor/wave-2
branch
from
November 22, 2026 20:14
769575c to
9fbb9b4
Compare
seaweeduk
force-pushed
the
refactor/wave-1
branch
from
November 22, 2026 20:58
fa8a120 to
848682b
Compare
seaweeduk
force-pushed
the
refactor/wave-2
branch
from
November 22, 2026 20:59
9fbb9b4 to
06af570
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.
Third layer of the structural refactor: the first features leave
run()with their own state, the menu pages get one dispatch table, and the data layer loses its copied helpers. Nothing changes for users.Steps in this layer: A3, A4, A5, A6, A7, M3, D3, D6.
Each feature that leaves
run()becomes a class that owns its state and takes the collaborators it needs by reference when it's built.run()keeps a few calls at the same points in the frame as before.run()DeletionPassthroughStickSeekcancel()RunningVideoButtonJobspress(job, hand, context)returns what to say, show and runflowchart LR F["run(): frame"] -- "Frame{...}" --> S["StickSeek::update"] F -- "job, Context" --> J["ButtonJobs::press"] -- "JobAction" --> F F --> R["RunningVideo::saveDue"] F --> P["Passthrough::settle / poll / fill"] F --> D["Deletion::poll"]Menu::kPages[]has one row per page: its flags (alone, grouped, list, Stash, pictures, thumbnails, kept) and itslayout,drawHeading,leaveandupdate. The if-ladders in page layout, drawing,showPageandupdate, and five per-page predicates, now read the table, and Stash's three second-level switches are gone.Statement,execanduserVersionmove tosqlite_utiland are used by the library, the library index and the Stash store. The library writer's transaction, retry and reused statements don't change.--stash-syncdiagnostic andStashOutboxget files of their own; four identical curl write callbacks become one; five files useserver_json's accessors instead of their own; frame scaling moves toframe_scaler.main.cpplinesrun()linesButtonJobs::pressis 166 lines: it is the old switch, one case per job with no shared state, moved unchanged.Known and left as is
Important
AI disclosure
anthropic/claude-opus-5-5highopenai/gpt-6.2-astrahighAgent harness OpenCode 2.3.2