Migrate from Tkinter to Electron with Apple TV UI, credential management, and embedded browser #15

Merged
Copilot merged 3 commits from copilot/add-apple-tv-ui-features into STG 2025-11-17 08:35:35 -06:00
Copilot commented 2025-11-17 07:30:39 -06:00 (Migrated from github.com)

Replaces Tkinter GUI with Electron implementation featuring Apple TV-inspired interface, secure credential storage, and in-app web browsing.

Implementation

Electron Architecture

  • Main process (main.js): Window management, BrowserView for embedded browsing, IPC handlers for service launching and credential operations
  • Preload bridge (preload.js): Secure IPC using contextBridge with context isolation
  • Renderer (renderer.js): Service grid, keyboard navigation (arrow keys + Enter), credential modal (Ctrl+S)

Apple TV UI (styles.css, index.html)

  • Card-based 16:9 layout with scale(1.1) translateY(-10px) on focus
  • Cubic-bezier transitions (0.3s), glow shadows, gradient backgrounds
  • Responsive grid: grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))
  • Keyboard focus indicators with smooth animations

Credential Management

  • electron-store with AES encryption for per-service credentials
  • Modal UI for save/load/delete operations
  • Framework ready for service-specific auto-login injection

Embedded Browser

  • Services launch in BrowserView covering full window
  • Esc returns to home, preserving browser session
  • Replaces external browser launches with in-app experience

Security

  • Context isolation enabled, node integration disabled in renderer
  • Credentials encrypted at rest, never in config files
  • CodeQL scan: 0 vulnerabilities

Compatibility

Python/Tkinter version remains functional with same config.json format. Both versions can coexist:

npm start          # Electron edition
python castroix.py # Python edition

Testing

  • Electron: 5/5 tests (config loading, file structure, service validation)
  • Python: 21/21 tests passing (backward compatibility verified)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • redirector.gvt1.com
    • Triggering command: /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --enable-crash-reporter=7fc01fa4-ae15-43f2-89ea-e9101cac1e7f,no_channel --user-data-dir=/home/REDACTED/.config/castroix --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,11036720606727772599,7657390543721789921,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /home/REDACTED/work/castroix/castroix/node_modules/electron/dist/electron . --no-sandbox (dns block)
    • Triggering command: /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --enable-crash-reporter=7fc01fa4-ae15-43f2-89ea-e9101cac1e7f,no_channel --user-data-dir=/home/REDACTED/.config/castroix --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12365620752115418662,6720334983841780898,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Add these features. Use Electron instead of Tkinter
Apple TV-like UI - Smooth animations, modern design, focus navigation
Automatic Credentials - Secure storage, auto-login to streaming services
Embedded Browser - Full web browser wrapped in the application


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Replaces Tkinter GUI with Electron implementation featuring Apple TV-inspired interface, secure credential storage, and in-app web browsing. ## Implementation ### Electron Architecture - **Main process** (`main.js`): Window management, BrowserView for embedded browsing, IPC handlers for service launching and credential operations - **Preload bridge** (`preload.js`): Secure IPC using `contextBridge` with context isolation - **Renderer** (`renderer.js`): Service grid, keyboard navigation (arrow keys + Enter), credential modal (Ctrl+S) ### Apple TV UI (`styles.css`, `index.html`) - Card-based 16:9 layout with `scale(1.1) translateY(-10px)` on focus - Cubic-bezier transitions (0.3s), glow shadows, gradient backgrounds - Responsive grid: `grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))` - Keyboard focus indicators with smooth animations ### Credential Management - `electron-store` with AES encryption for per-service credentials - Modal UI for save/load/delete operations - Framework ready for service-specific auto-login injection ### Embedded Browser - Services launch in `BrowserView` covering full window - Esc returns to home, preserving browser session - Replaces external browser launches with in-app experience ## Security - Context isolation enabled, node integration disabled in renderer - Credentials encrypted at rest, never in config files - CodeQL scan: 0 vulnerabilities ## Compatibility Python/Tkinter version remains functional with same `config.json` format. Both versions can coexist: ```bash npm start # Electron edition python castroix.py # Python edition ``` ## Testing - Electron: 5/5 tests (config loading, file structure, service validation) - Python: 21/21 tests passing (backward compatibility verified) > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `redirector.gvt1.com` > - Triggering command: `/proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --enable-crash-reporter=7fc01fa4-ae15-43f2-89ea-e9101cac1e7f,no_channel --user-data-dir=/home/REDACTED/.config/castroix --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,11036720606727772599,7657390543721789921,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041` (dns block) > - Triggering command: `/home/REDACTED/work/castroix/castroix/node_modules/electron/dist/electron . --no-sandbox` (dns block) > - Triggering command: `/proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --enable-crash-reporter=7fc01fa4-ae15-43f2-89ea-e9101cac1e7f,no_channel --user-data-dir=/home/REDACTED/.config/castroix --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,12365620752115418662,6720334983841780898,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/SluberskiHomeLab/castroix/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > Add these features. Use Electron instead of Tkinter > **Apple TV-like UI** - Smooth animations, modern design, focus navigation > **Automatic Credentials** - Secure storage, auto-login to streaming services > **Embedded Browser** - Full web browser wrapped in the application </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.
SluberskiHomeLab (Migrated from github.com) reviewed 2025-11-17 07:30:39 -06:00
Sign in to join this conversation.
No description provided.