Commit Graph

183 Commits

Author SHA1 Message Date
Andrew Zambazos 659d1530b0 Extract BeginShutdown and unify shutdown flow
Introduce BeginShutdown() (declared in header) and move window-close shutdown logic into it. OnWindowCloseRequested and chrome close/exit handlers now call BeginShutdown; shutdown now collects closing_tab_browsers_ plus any active tab browsers into a single list before closing them. MaybeFinishShutdown was updated to consider closing_tab_browsers_ so shutdown won't finish prematurely. This centralizes shutdown behavior and ensures all relevant browser instances are closed cleanly.
2026-05-20 20:19:38 +12:00
Andrew Zambazos 302753cd3d Add first-run setup and theme synchronization
Introduce first-run setup flow and live chrome theme syncing.

- Add first_run_state.cpp/.h to read/write a first_run_state.json under user data and decide whether to show the setup UI.
- Wire first-run logic into NebulaController: track first_run_setup_active_, create initial setup tab, defer/bring up chrome browser accordingly, and add CompleteFirstRunSetup() to persist state and finish setup.
- Add SendThemeToChromeSurfaces() and handle "theme-update" and "complete-first-run" chrome commands; restrict setup completion to setup frame.
- Expose GetFirstRunStatePath() and GetSetupUrl() in UI path helpers and include the state file in the build list (CMakeLists.txt).
- Update chrome UI: new CSS variables and styles for tabs/url-bar; chrome.js can apply themes (applyTheme), persist/load theme, and listen for storage updates to apply theme changes live.
- Update customization.js, settings.js, and setup.js to normalize/persist themes, send theme updates to the native host (or fallback), and communicate completion via the native bridge when available; include customization.js in setup.html.

These changes allow the app to run an interactive first-run setup and keep the separate chrome UI in sync with user-selected themes.
2026-05-20 20:14:43 +12:00
Andrew Zambazos bbba5b2927 Replace UNREFERENCED_PARAMETER with NEBULA_UNUSED
Introduce NEBULA_UNUSED macro in platform types and replace usages of UNREFERENCED_PARAMETER across multiple source files to standardize unused-parameter handling. Update various platform stubs (Linux window/host), CEF handlers, and Windows startup code to use NEBULA_UNUSED. Also adjust NebulaController::OnWindowCloseRequested to stop force-destroying the top-level window and rely on MaybeFinishShutdown once browsers report OnBeforeClose.
2026-05-19 15:08:39 +12:00
andrew 29908646ea Add macOS Cocoa port and CEF helper support
Introduce a macOS Cocoa-based UI and CEF helper subprocess support. CMake: enable OBJCXX on Apple, treat mac sources as .mm, set -fobjc-arc, link Cocoa frameworks, and generate helper app targets using a mac Info.plist template; keep libcef logical target off macOS. Implementation: add Objective-C++ implementations for browser_host and nebula_window, convert startup to ObjC++ (prepare NSApplication), add process_helper_mac (CEF helper entry) and load CEF library from main/main_bigpicture on mac. Tooling/docs: add .clangd fallback flags, compile_commands symlink helper, update cross-platform docs for mac status. Misc: add menu-popup UI page, define UNREFERENCED_PARAMETER in platform/types.h, small code cleanups (use (void)layout, include platform/types.h) and update .gitignore.
2026-05-19 12:57:26 +12:00
andrew 8cf9b50690 Add MPL-2.0 & asset licenses; expand README
Add a full Mozilla Public License v2.0 (LICENSE) and a new ASSETS-LICENSE.md that clarifies Nebula branding, artwork, and other non-code assets are not covered by MPL and are All Rights Reserved unless stated otherwise. Update README.md with a detailed project overview: CEF migration, project status, goals, distribution direction, planned features, architecture notes, build instructions, and explicit licensing guidance separating source code (MPL-2.0) from branding assets and documentation.
2026-05-19 10:25:37 +12:00
Andrew Zambazos d6f15c5dce Add Big Picture mode and multi-target build
Introduce a Big Picture mode and support building two app targets. CMakeLists was refactored to add a helper (add_nebula_app_target) and now registers NebulaBrowser and NebulaBigPicture executables, moving UI/assets post-build copying into the helper. A new app/main_bigpicture.cpp entry was added and RunNebula now accepts LaunchOptions (AppMode) with a new LaunchOptions struct. NebulaController was extended heavily to manage a BigPicture browser role: creation, enter/exit mode, layout logic, cursor injection/removal, remote input handlers (mouse move/click/wheel/text), and state syncing. Cef/browser_client updated for the new BigPicture role and message filtering. Platform API gained MoveCursorToBrowserPoint with platform stubs/Win implementation. Big-picture UI files (CSS/JS/HTML) were also updated to support the new mode.
2026-05-18 22:07:41 +12:00
Andrew Zambazos b4d93f24cd Force close browsers and handle bigpicture exit
Call CloseBrowser(true) for chrome, popup and tab browsers to force shutdown. Immediately destroy the top-level window and call MaybeFinishShutdown() to avoid hangs when WM_CLOSE is not resent by Alloy child-window paths. Route "close" and new "exit-bigpicture" chrome commands through OnWindowCloseRequested so they trigger the same shutdown flow. Add IsBigPictureFrame and permit the "exit-bigpicture" process message from bigpicture internal frames.
2026-05-18 18:35:18 +12:00
Andrew Zambazos c514e4faec Menu popup: visibility, zoom sync, and tab fixes
Track menu popup visibility and propagate zoom level to the popup. Add menu_popup_visible_ flag, SendMenuPopupZoom(), and call it when creating/showing the popup and when adjusting zoom. Make CreateNewTab accept an optional URL and route popup/new-tab flows to it. Prevent per-tab child closes from triggering app shutdown by tracking closing_tab_browsers_ and adding ForgetClosingTabBrowser(). Treat MenuPopup role specially when enabling frame hit-testing.

Platform: remove usage of ApplyRoundedBrowserRegion and switch menu popup sizing to use resized client_size helpers (consolidate calculations across Win/Mac/Linux). UI: update menu-popup CSS/JS (new styling, font, zoom formatting API via NebulaMenuPopup.setZoomLevel), wire settings to use nebulaNative.postMessage for new-tab, and remove the static menu-popup.html. Misc: small chrome CSS/JS tweaks and ensure chrome state includes zoomLevel.
2026-05-18 18:28:20 +12:00
Andrew Zambazos e51594a010 Add platform abstraction & cross-platform ports
Introduce a cross-platform platform layer and port scaffolding for macOS and Linux. CMakeLists.txt refactored to select platform sources, set executable type per OS, and use CEF helper macros for runtime deployment. Add platform/types.h, startup/paths/browser_host APIs and implementations for Windows, macOS, and Linux (many are stubs for mac/linux). Refactor app entry and lifetime to use nebula::platform::AppStartup (app/main, run.{h,cpp}), move window/browser host logic into platform/browser_host.*, and update NebulaController to use platform APIs (native handles, sizing, visibility, cache-busting token, etc.). Add README and detailed docs/cross-platform.md describing build layout and porting status.
2026-05-18 17:25:04 +12:00
Andrew Zambazos 18bc607d93 Changed GitHub button in settings to Gitpub
Changed GitHub button in settings to Gitpub, yet to do icon
2026-05-16 13:27:25 +12:00
andrew 54216aa133 Persist site history to disk and integrate with settings
Add persistent site history storage and plumbing between the renderer settings UI and the native app. The app now loads/saves site_history.txt in the user data directory (max 200 entries, http/https-only, stored one URL per line) and records visited sites on navigation. Settings pages receive the history via injected JavaScript when the settings page finishes loading, and a "clear-site-history" message from the settings UI clears the on-disk history and updates the renderer.

Other changes: allow settings-related process messages from content frames in the CEF client, introduce OnContentLoadFinished to trigger history injection, expose electronAPI.send/sendToHost (and reuse the native postMessage handler) in the V8 context, and remove the BigPicture in-app history UI/refresh/clear handlers (history is now managed by the native app). Also cleaned up includes and added helper utilities for JSON escaping, lowercasing, and file path handling. The initial tab restore logic was simplified to always create an initial tab (home or initial_url) and persist the session.
2026-05-14 20:57:17 +12:00
andrew 8eb5c1a3b2 Persist session state and single-instance
Add session persistence and single-instance handling. Introduces browser/session_state.{h,cpp} to load/save a simple JSON session_state.json (limits restored tabs to 50, basic JSON parsing, atomic write via a .tmp rename). TabManager gains RestoreTabs and ActiveTabIndex to restore and track tabs. NebulaController now calls PersistSession on tab/title/activate/close events, flushes cookies on shutdown, and sets CEF runtime style to Alloy for embedded child browsers and devtools. run.cpp adds a named mutex to prevent multiple instances, enables persistent session cookies, and tweaks initial URL handling. Added GetSessionStatePath() to ui/paths and updated CMakeLists.txt to include the new source file.
2026-05-14 20:48:48 +12:00
andrew 406d73c10f Fullscreen and Fullscreen YouTube video fixes 2026-05-14 19:52:38 +12:00
andrew 6fac7e320b Made GPU diagnostics page more functional 2026-05-14 19:42:08 +12:00
andrew a32940a3f3 Enable GPU/WebGL and add persistent cache dirs
Enable hardware-accelerated rendering and persist GPU/cache data. Added a BrowserSettings() helper that enables WebGL and use it when creating Chrome/Content/MenuPopup browsers (src/app/nebula_controller.cpp). Configure CefSettings to use a persistent user data and cache directory (src/app/run.cpp) by calling nebula::ui::GetUserDataDirectory() and GetCacheDirectory(). Add command-line switches to initialize the GPU process and avoid sandbox/blocklist fallbacks (disable GPU sandbox, in-process-gpu, ignore-gpu-blocklist, enable-accelerated-video-decode, use ANGLE D3D11) to prevent GPU crashes and Chromium falling back to software rendering (src/cef/nebula_app.cpp). Implement GetUserDataDirectory() and GetCacheDirectory() (preferring %LOCALAPPDATA% with an executable-directory fallback) and expose them in the header (src/ui/paths.cpp, src/ui/paths.h). These changes ensure GPU shader caching, WebGL support, and smoother video/graphics behavior.
2026-05-14 19:37:49 +12:00
andrew 10180b7109 Support nebula:// internal pages & GPU tools
Introduce support for an internal nebula:// URL scheme and internal page routing (ResolveInternalUrl / ToInternalUrl), including dedicated slugs for home, settings, downloads, big-picture, gpu-diagnostics, insecure and a 404 fallback. Wire internal resolution into browser creation and tab navigation so internal pages load from local UI files. Add an insecure-warning interstitial flow with a navigate-insecure command and a one-shot bypass set (ShouldBypassInsecureWarning) so content can request navigating to an HTTP target after user confirmation. Harden BrowserClient handling to resolve Chromium new-tab and nebula internal URLs, redirect HTTP to the insecure warning when appropriate, and handle 404 responses by loading the internal 404 page. Update chrome UI behavior to hide internal home URLs, accept nebula:// in navigation input checks, and add a GPU Diagnostics page (revamped UI + diagnostic scripts) plus menu entry. Misc: improve URL utilities (scheme checks, percent-encoding, decorations), fix 404 display text, adjust menu popup size, tweak window frame styling (DWM attributes) and remove branding block from chrome UI CSS.
2026-05-14 19:11:06 +12:00
Andrew Zambazos dd6b3fa70d Menu popup, icons, remove nebot 2026-05-14 10:19:11 +12:00
Andrew Zambazos a8786b4c1c Add NebulaController, tab manager, and CEF clients
Introduce core application structure and browser management: add NebulaController and run entry (src/app/*) to centralize window, tab and CEF lifecycle logic; implement TabManager and NebulaTab (src/browser/*) for tab creation, navigation and state tracking; add URL utilities (NormalizeNavigationInput, JsonEscape) and CEF browser client glue (src/cef/browser_client.cpp/.h) to forward chrome commands and content events. Update app/main.cpp to delegate startup to nebula::app::RunNebula. Add UI assets (chrome.html, chrome.css, chrome.js, lucide, menu-popup updates) and remove obsolete nebot.html. Update CMakeLists to include new sources, add ${CMAKE_SOURCE_DIR}/src to includes and link dwmapi on Windows. Overall this refactors startup and splits responsibilities for cleaner tab and browser lifecycle handling.
2026-05-14 10:18:51 +12:00
Andrew Zambazos 207a849f06 Add Nebula Browser app, UI and assets
Add initial Nebula Browser project skeleton: CMakeLists to configure and link CEF (including post-build steps to copy runtime and UI files), a Windows CEF-based entry (app/main.cpp) that initializes CEF and loads the bundled UI, and a full ui/ and assets/ tree (HTML, CSS, JS, fonts, icons, and branding images). Update .gitignore to ignore build/out, thirdparty/cef, IDE and common OS artifacts.
2026-05-13 22:17:58 +12:00
Andrew Zambazos 79565f2ef3 Removed Electron Project 2026-05-13 17:18:10 +12:00
andrew adefa1706e Added OS context menu for linux 2026-02-25 11:57:31 +13:00
andrew 8b87a07d1b Merge remote-tracking branch 'origin/main' 2026-02-25 11:21:04 +13:00
andrew a101899d9c Add RGB CSS variables for theme colors
Introduce --primary-rgb, --accent-rgb, --success-rgb and --warning-rgb and replace hardcoded rgba(...) usages in CSS with rgba(var(--*-rgb), alpha) to allow dynamic alpha blending from theme colors. Add a hexToRgb helper in setup.js and populate these RGB variables in applyThemeToSetupPage (handles 3- and 6-digit hex and validates input), so runtime theme changes can drive translucent shadows, backgrounds and highlights.
2026-02-24 21:00:38 +13:00
andrew 0b51d133a4 Archive Steam docs; add itch.io upload guide
Move legacy Steam-related docs into documentation/archived and add a new UPLOAD-ITCH.md describing how to publish builds to itch.io with Butler. Update top-level README to state official releases will be on itch.io. Remove Steam-specific UI/features: drop steamCloudOptIn from first-run preferences, remove the Steam Cloud teaser and summary from the setup flow, and adjust settings/setup copy to reference handheld devices and non‑Steam distribution. Also make a small wording tweak in the plugins doc about rendererPreload.
2026-02-24 20:50:00 +13:00
andrew 6b2a7c8404 Hide default linux task buttons
The electron app now uses the built in menu bar on linux
2026-02-24 15:19:41 +13:00
andrew 618ea7d12d Prefer usr/user-data for portable data
Rename and consolidate portable user-data to usr/user-data and update tooling and runtime to match. Updated appdir-example/run-nebula.sh to point at usr/user-data; make-appdir.sh and update-appdir.sh now patch/copy the launcher, create the usr/user-data directory and set secure permissions (mkdir -p, chmod 700), and remove sed backups. portable-data.js now defaults to app-local user-data and prefers <AppDir>/usr/user-data on Linux AppDir builds (with safe fs checks). Also minor UI change in renderer/setup.css to make the footer background transparent and disable the backdrop blur.
2026-02-19 17:33:26 +13:00
andrew 0137df60dd Updated create and update appdir files to include Nebula-Desktop and Nebula-Controller files 2026-02-01 21:29:13 +13:00
Andrew Zambazos b725d5a672 Revise project description and status in README
Updated project status and focus, changing from Steam-centric to Linux-first. Clarified maintenance mode and community engagement.
2026-02-01 21:12:20 +13:00
Andrew Zambazos 86f3b10e80 Update README to reflect dormant project status
Updated project status and description in README.md to reflect that development is paused and the project is in a dormant state. Added a section clarifying the implications of this status and maintained the licensing information.
2026-01-31 19:28:27 +13:00
andrew 9df3dbeab0 Update README.md Nebula 2026-01-31 17:07:09 +13:00
andrew 8d41692f03 Improve zoom handling and setup UI layout
Enhanced zoom target selection to better support parent windows in desktop mode and improved menu popup zoom refresh. Updated setup.css to refine layout, scrolling, and visual effects, including better handling for small screen heights and improved sticky footer appearance.
2026-01-22 13:11:41 +13:00
andrew 28d2daf06d Improve default browser handling and protocol support
Adds explicit AppUserModelID for Windows, robust single-instance and protocol URL handling, and protocol registration for http/https in package.json. Enhances default browser logic to handle OS-specific requirements, provides user feedback in the setup UI, and allows opening system settings for default browser selection. Updates preload and renderer logic to support these changes.
2026-01-21 21:11:59 +13:00
andrew 97150ce2c4 Update setup.html 2026-01-21 11:44:46 +13:00
andrew c8c6397192 Update linux sh files and appdir folder 2026-01-21 11:26:26 +13:00
andrew 1c24b914b3 Update theme-manager.js 2026-01-21 10:59:21 +13:00
andrew e9cf7b29ae Create README-linux-upload.md 2026-01-21 10:46:23 +13:00
andrew 48ae196c4c Improve portable data path resolution logic
Updated getPortableDataPath to prefer storing 'user-data' in Documents/My Games/<AppName>, with a fallback to the app directory if necessary. This enhances data portability and aligns with common user data storage conventions.
2026-01-21 10:23:53 +13:00
andrew 6ea31e7f80 Add first-time setup onboarding flow
Introduces a multi-step onboarding process for first-time users, including theme selection and default browser setup. Adds setup.html, setup.js, and setup.css for the new UI, updates main.js and preload.js to support onboarding logic and IPC handlers, and adjusts theme-manager.js for correct theme directory resolution.
2026-01-20 22:07:22 +13:00
andrew a0e76e623d Add BrowserView tab system and overlay menu for desktop mode
Introduces a BrowserView-based tab management system for desktop mode, replacing webview elements for tab content. Adds IPC handlers and state management for creating, activating, destroying, and communicating with BrowserViews. Implements an overlay menu popup window for tab actions and zoom controls. Updates renderer UI to use a dedicated view host container, and refactors tab creation and navigation logic to use BrowserViews. Improves focus styling in CSS and updates preload and IPC messaging to support BrowserView contexts.
2026-01-19 20:57:24 +13:00
andrew 03a99b7d46 Improve tab navigation and gamepad D-pad support
Enhanced directional navigation logic to prioritize active tab panel content when moving from tab links, improving keyboard and controller accessibility. Added robust D-pad detection for gamepads, supporting both button and axis-based D-pads for broader controller compatibility. Updated settings tab logic to allow ArrowDown/ArrowRight to move focus from tabs to the active panel, with global fallback for improved accessibility.
2026-01-19 19:50:51 +13:00
andrew de64ae21c0 Add bookmark management UI and logic
Introduces UI buttons for adding bookmarks and current page bookmarks in bigpicture.html. Implements bookmark creation, editing, and saving logic in bigpicture.js, including OSK integration for bookmark input, persistent storage support, and improved rendering of bookmark tiles.
2026-01-19 14:55:37 +13:00
andrew ee548b2053 Add search history and zoom controls to settings
Implemented search history tracking and display using localStorage, with options to clear history from the settings page. Replaced the display scale slider with interactive zoom controls and preset buttons, applying zoom changes immediately. Updated styles and HTML structure to support these new features.
2026-01-18 16:22:39 +13:00
andrew 8df3e8bfe8 Improve tab history navigation and internal page handling
Refactors tab history management to prevent duplicate entries and ensure correct navigation for internal nebula:// pages. Updates back/forward navigation to use custom history tracking, properly converting between home and webview tabs, and disables navigation buttons based on history state instead of webview methods.
2026-01-18 16:06:55 +13:00
andrew a59209a40f Hide tab favicon on image load error
Adds an onerror handler to tab favicon images to hide them if the favicon fails to load, improving the appearance of tabs with missing or broken favicon URLs.
2026-01-18 15:55:22 +13:00
andrew 59118da998 Redesign 404 page with improved UI and UX
Revamps the 404.html page with a modern dark-themed design, enhanced layout, and improved messaging. Adds responsive styles, a prominent error icon, clearer action buttons, and displays the attempted URL. Refactors JavaScript for better navigation handling and integration with Electron or parent window messaging.
2026-01-18 15:52:41 +13:00
andrew 681b087f7a Rename internal URL scheme from browser:// to nebula://
Replaces all occurrences of the 'browser://' internal URL scheme with 'nebula://' across main process, plugin manager, and renderer files. This change standardizes the internal page scheme to 'nebula://' for improved clarity and branding.
2026-01-18 13:38:26 +13:00
andrew 0eb9ec0c9a Redesign settings UI and update Electron to v40
Revamps the settings page with improved layout, modernized CSS, and enhanced accessibility, including new layout helpers, better grouping, and consistent styling. Updates Electron from v39.2.7 to v40.0.0 in dependencies. Adds dynamic theme application to the settings page, ensuring user-selected themes are reflected immediately.
2026-01-18 13:22:46 +13:00
andrew bb4cbabb76 Redesign Electron updater UI and restrict updates to dev mode
Revamps the Electron update section in settings with a new UI, status banner, and clearer messaging. The updater logic is now only available in development mode; the main process disables update attempts in packaged builds. Updates to the renderer and main process ensure users on Steam or packaged builds are informed that updates are handled externally, while developers can check and install Electron updates during development.
2026-01-18 12:46:55 +13:00
andrew 00fccfdc1b Fix double zoom bug in Big Picture Mode display scaling
Removed unconditional CSS zoom call that was causing zoom to be applied
twice (Electron zoom + CSS zoom), resulting in squared scaling values.
Now correctly uses Electron zoom as primary with CSS as fallback only.
2026-01-18 12:17:51 +13:00
andrew 52a4d877a1 Enable portable user data on all platforms
Portable mode now works on Windows, macOS, and Linux, storing user data in a 'user-data' folder within the app directory by default. The mode is enabled by default and can be disabled via NEBULA_PORTABLE=0. All file operations for history and search data now respect portable mode, using secure file writes where appropriate. Updated .gitignore and package.json to exclude portable data from versioning and packaging. Also fixed Bing icon filename case in home.html.
2026-01-02 17:36:43 +13:00