Repository navigation
Refactor 4/6: the frame loop in phases, menu pages own their state - #99
Merged
Merged
Conversation
|
LGTM 👍 The frame phases preserve the ordering that matters: menu commands can stop or replace the video before the picture is selected again, and GL work is published before Vulkan submits the frame. The extracted playback and quality owners retain their deferred work, while the menu pages preserve their navigation state and share only the active list viewport. |
seaweeduk
force-pushed
the
refactor/wave-2
branch
from
November 22, 2026 20:14
769575c to
9fbb9b4
Compare
seaweeduk
force-pushed
the
refactor/wave-3
branch
from
November 22, 2026 20:14
5178a14 to
15c0f33
Compare
seaweeduk
force-pushed
the
refactor/wave-2
branch
from
November 22, 2026 20:59
9fbb9b4 to
06af570
Compare
seaweeduk
force-pushed
the
refactor/wave-3
branch
from
November 22, 2026 20:59
15c0f33 to
c684f02
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.
Fourth layer of the structural refactor: the rest of
run()'s features get owners, the frame loop becomes named phases, and the menu's page state moves out ofMenuinto each page's struct. Nothing changes for users.Steps in this layer: A8, A9, A10, A11, A12, M4, M5, M6, plus review fixes for waves 0 to 3.
Owners. Each takes its collaborators by reference when it's built;
run()calls it at the same points in the frame as before.run()QualityPanelFades,NoticesPlaybackSessionStashCommandsand every owner'shandle()/fill(view)execute's cases and theMenuViewbuildA11: commands and the view go to their owners.
executetriesapplySettingCommand, then each owner'shandle(). Each command still has exactly one handler. The switch left inexecutehas nodefault:and lists the commands owners handle as labels, so-Wswitchagain flags a command nobody handles.A12: the frame loop in named phases. The loop body is 35 lines of phase calls. The phases are lambdas defined once before the loop, so nothing is built per frame. What one phase works out for later ones is declared with them. The XR submit core stays in one phase, unchanged.
M4 to M6: the menu.
Menuinto one struct per page (Files, Library, Network, Downloads, settings, strip, keyboard, navigation column). The Stash and setup pages are nested inMenuinstead of being its friends: a narrow host interface would have needed about 80 forwarding calls. OneListViewportholds the list's scroll position.StashBrowse, that never seesMenu. The Scene tab's layout is one function per section.control_rules.layoutControlsandlayoutGestureEditorare split into their parts.Review fixes from earlier layers.
main.cpplinesrun()lines, phases includedMenudata memberslayoutSceneDetailslineslayoutControlslinesKnown and left as is
PanelFades::Framecopies threeVec3values, nine floats in all. They don't allocate.std::promise. Destroying it doesn't join the config worker.Important
AI disclosure
anthropic/claude-opus-5-5highopenai/gpt-6.2-astrahighAgent harness OpenCode 2.3.2