feat(ui): add zoom controls and optimise startup sequence#40
Merged
flexiondotorg merged 4 commits intomainfrom Mar 24, 2026
Merged
feat(ui): add zoom controls and optimise startup sequence#40flexiondotorg merged 4 commits intomainfrom
flexiondotorg merged 4 commits intomainfrom
Conversation
Scale window dimensions by zoom factor before construction to match window frame size with content size. Move setZoomFactor call into ready-to-show handler to ensure content zooms after page load, not just the window frame. Fixes inconsistent zoom behaviour between zoom factor settings and actual window appearance. Signed-off-by: Martin Wimpress <code@wimpress.io>
- Move splash creation to app.whenReady() to show feedback immediately - Show splash after loadFile() without waiting for ready-to-show - Wait for did-navigate-in-page before closing splash to ensure page content is rendered - Show main window before closing splash to prevent blank flash - Defer module initialisation (notifications, Discord, MPRIS, wedge) to first did-finish-load - Move CSS and script injection to use await for proper sequencing - Simplify splash close timing logic with unified Promise.all() gate Signed-off-by: Martin Wimpress <code@wimpress.io>
Poll for main > .content-container > .section element and reduce DevTools timeout fallback to 3.5 seconds for faster feedback. Signed-off-by: Martin Wimpress <code@wimpress.io>
Contributor
There was a problem hiding this comment.
2 issues found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/main.ts">
<violation number="1" location="src/main.ts:295">
P2: The readiness poll is never cancelled after the timeout path wins, so it can run indefinitely and execute JavaScript every 100ms.</violation>
<violation number="2" location="src/main.ts:387">
P1: These integration `init()` calls now run on every `did-finish-load`, which re-registers player listeners and duplicates background timers/updates after reloads.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…ution - Move integration initialisation (notifications, Discord, MPRIS, wedge) inside firstLoad guard to prevent duplicate listeners, timers, and D-Bus registrations on every page reload - Add pollCancelled flag to halt readiness poll when window ready, preventing indefinite executeJavaScript calls every 100ms after timeout race completes Signed-off-by: Martin Wimpress <code@wimpress.io>
Contributor
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Requires human review: This PR modifies the core startup sequence, reorders module initialization, and introduces DOM-dependent polling logic in the main process, which requires human verification.
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.
Summary
Improves startup user experience with zoom controls for the transport bar (LCD) and splash screen, plus optimised startup sequence to eliminate blank window flash and ensure content renders before closing the splash.
Changes
Testing
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com