Skip to content

feat(ui): add zoom controls and optimise startup sequence#40

Merged
flexiondotorg merged 4 commits intomainfrom
more-zoom
Mar 24, 2026
Merged

feat(ui): add zoom controls and optimise startup sequence#40
flexiondotorg merged 4 commits intomainfrom
more-zoom

Conversation

@flexiondotorg
Copy link
Copy Markdown
Member

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

  • Add zoom level tray submenu (100%, 125%, 150%, 175%, 200%) with persistent settings stored in config
  • Enlarge transport bar with default zoom factor 1.45x
  • Apply zoom factor to About and Splash window content
  • Optimise startup sequence: move splash display to app-ready event, defer module initialisation, add content render polling before splash close
  • Refine splash close timing to await main content container rendering

Testing

  • Verify tray zoom submenu displays all levels and persists selection across restarts
  • Confirm transport bar enlarges to 1.45x zoom on startup
  • Validate startup no longer shows blank window before splash appears
  • Check splash closes only after main content renders (polls for main > .content-container > .section)
  • Test About and Splash windows respect zoom setting

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

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>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@flexiondotorg flexiondotorg merged commit 8e2a577 into main Mar 24, 2026
11 checks passed
@flexiondotorg flexiondotorg deleted the more-zoom branch March 24, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant