Feature/dependency upgrade by ezroar reviewed - #369
Open
WhiteFang5 wants to merge 52 commits into
Open
Conversation
- Deleted stale package-lock.json that referenced old robotjs/iohook - Regenerated with new @jitsi/robotjs and uiohook-napi dependencies - Updated karma-base.conf.js: karma-coverage-istanbul-reporter → karma-coverage - Renamed structure.type.d.ts → structure.type.ts for proper module export Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Update ElectronProvider API usage (provideIpcRenderer → provideElectronAPI) - Fix Angular Material mat-slider to new API with matSliderThumb input - Migrate _theme.scss to Angular Material v15+ theming with @use syntax - Fix JSON imports to use default imports instead of named exports - Add Subject<void> type parameters for RxJS strict mode - Add $any() casts for strict template type checking - Rename .d.ts type files to .ts for proper module exports - Remove deprecated Node.js util import (isNullOrUndefined) - Fix zone.js import path for newer version Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add electron/preload.ts to tsconfig.serve.json so it gets compiled (preload is a separate entry point, never imported by main.ts) - Fix preload path in main.ts to always use electron/preload.js - Replace custom-electron-titlebar with HTML titlebar in settings window (window.require() unavailable with contextIsolation: true) - Add cross-window IPC forwarding in main.ts for thread control channels (thread-pause, settings-changed, etc.) - Add missing channels to preload send() whitelist Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Use cross-env for NODE_OPTIONS in package.json scripts (cross-platform) - Fix ESLint/TSLint errors: switch-case scoping, strict equality, Object -> object type, no-input-rename directive - Fix RxJS variable hoisting issues in stash-grid.service.ts - Fix async pipe negation in evaluate-dialog template - Update test infrastructure: remove require.context, add mock ElectronAPI and LocalForage providers, add test specs for services - Add @app/testing path alias in tsconfig.json Co-Authored-By: Claude Opus 4.6 <[email protected]>
When windowSetAlwaysOnTop(false) is called without a level, the preload sends undefined as the level arg. Electron 28's native setAlwaysOnTop validates arg 2 as a string when 3 args are passed, throwing "A string was expected". Only pass level/relativeLevel when level is truthy. Also harden shell-open-external and log handlers with type guards. Co-Authored-By: Claude Opus 4.6 <[email protected]>
The old custom robotjs fork accepted Windows virtual key codes as numbers (e.g. 0x43 for 'C'). The new @jitsi/robotjs requires string key names (e.g. 'c'). Add a VK-to-key-name mapping to convert numeric codes before passing them to robotjs. Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Replace debounce(() => EMPTY) with debounce(() => timer(0)) in overlay visibility pipeline. RxJS 7 changed debounce behavior: inner observable completion no longer emits buffered values, causing window.show() to never fire. - Add font:inherit to item-frame-value-input so ch-based width calculation matches the actual rendered font, fixing clipped stat numbers. - Fix requestAccessibility() crash guard for non-macOS platforms. - Fix send() error handler referencing wrong variable name (args vs additionalArgs). - Add debug logging for game detection, shortcut registration, and window show/hide (throttled to avoid log spam). Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Use showInactive() instead of show() for the overlay window to prevent stealing focus from PoE, which caused a rapid active/inactive flashing loop. - Coerce poe.active to boolean (!!poe.active) before sending via IPC to avoid Electron 28 serialization failure on undefined values. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ections Update all CSS selectors from legacy .mat-* to .mat-mdc-* for Angular Material v15+ MDC migration. Fix unhandled promise rejections in auto-updater and main process (loadURL, shell.openExternal). Fix isMinimized property→method call, child window close handler null safety, and tray double-click crash. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Only apply the custom PoEOverlayCommunityFork user-agent to API and XHR requests. Page loads (login, trade search) now use the default Chromium user-agent, preventing Cloudflare from flagging them as bot traffic. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Cloudflare's JS challenge also checks navigator.userAgent, not just the HTTP header. Remove "Electron/x.x.x" and "poe-overlay/x.x.x" from the in-page user agent on spawned BrowserWindows so login pages pass Cloudflare verification. Co-Authored-By: Claude Opus 4.6 <[email protected]>
… import Cloudflare Turnstile blocks Electron's embedded browser from completing verification. Instead, open the PoE login page in the user's default browser and let them paste their POESESSID cookie to authenticate. Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Bump version 0.8.39 → 0.9.0 to reflect the major dependency upgrade (Electron 8→28, Angular 9→17, new IPC architecture, native module replacements) - Add CHANGELOG entry for 0.9.0 - Fix evaluate-dialog: default privateLeague$ to false; add null-safety and error handler in checkPrivateLeague() so a failed league lookup doesn't leave the flag in an incorrect state Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- karma-base.conf.js: add headless Chrome flags for WSL compatibility
- spec_helper.spec.ts: add global beforeEach(resetTestingModule) so the
TestBed instantiated by beforeAll doesn't block the first spec from
calling configureTestingModule
- mock-electron-api.ts: add missing setSessionCookie/getSessionCookie spies
- 7 component specs: migrate ElectronProviderFake from Electron 8 IPC API
(provideRemote/provideIpcRenderer) to new provideElectronAPI()
- user-settings-form.component.spec.ts: use MockElectronProvider instead of
null-returning fake (AppService.isAutoLaunchEnabled calls electronAPI.once)
- evaluate-dialog.component.spec.ts: fix MatDialogRef null -> {close: ()=>{}}
- item-price-prediction.service.spec.ts: correct mock currencyId 'exalted'
-> 'exa' to match mock data; add leagueId: 'Delirium' to context init
- item-search-analyze.service.spec.ts: add leagueId: 'Delirium' to context init
- window.service.spec.ts: add explicit resetTestingModule in beforeEach
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…e; Re-normalized all files
…usable with the new tech stack
WhiteFang5
commented
Jul 29, 2026
WhiteFang5
commented
Jul 29, 2026
| this.window.removeAllListeners() | ||
| // Note: In the new architecture, we can't remove all listeners on the window | ||
| // We would need to track specific listeners and remove them individually | ||
| console.warn('removeAllListeners is no longer supported in context-isolated mode') |
Member
Author
There was a problem hiding this comment.
This should probably be fixed/implemented accordingly (and this method removed)
…ed by cloudflare when using the login feature
…ved redundant cookie IPC channels; Changed some titles/tooltips mentioning 'poe overlay' to now also mentioned 'community fork'; Fixed some IPC channel reply and communication issues
…be assigned a hotkey in-game instead)
…cat' to the list of currencies to obtain from poe ninja; Added support for 'Sanctum Relics' and 'Enshrouded' exchange rates (obtained from poe ninja)
…oE Client v3.29.1 (Hotfix 1)
…ebug purposes); Fixed an issue with shortcuts being registered multiple times (and thus triggering multiple times)
…oE Client v3.29.1 (Hotfix 1)
WhiteFang5
force-pushed
the
feature/dependency-upgrade-by-ezroar-reviewed
branch
2 times, most recently
from
August 3, 2026 19:28
89e06cd to
17caedb
Compare
WhiteFang5
force-pushed
the
feature/dependency-upgrade-by-ezroar-reviewed
branch
from
August 3, 2026 19:55
17caedb to
4e3ee51
Compare
… causing an error message to be displayed
…his fixes 'Vaal Domination' not being detected as vaal gem)
…oE Client v3.29.2
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.
Pulled the code created by Ezroar (see PR #365) to the main repo to allow reviewing and comment resolution right away without depending on Ezroar to fix things reviewers find/want to see changed.
Upgrade Summary by Ezroar:
PoE Overlay Full Dependency Upgrade Summary
This document summarizes the comprehensive dependency upgrade performed on the PoE Overlay project.
Version Changes
Replaced Native Modules
iohookuiohook-napi1.5.0iohookis unmaintained, no Electron 28 supportactive-winnode-window-manager2.2.2active-winis ESM-only, incompatible with Electron's CJScustom-electron-titlebarBreaking Changes & Fixes
Electron 28 — Context Isolation
Electron 28 enables
contextIsolationby default. The renderer process can no longer access Node.js or Electron APIs directly.Solution: Added a preload script using
contextBridge.exposeInMainWorld()to create a typedelectronAPIbridge.electron/preload.ts— defines all whitelisted IPC channels and exposes them viawindow.electronAPIsrc/app/core/type/electron-api.type.ts— TypeScript interface for the bridgewindow.electronAPIinstead ofrequire('electron').ipcRenderermain.tsfor: window management, clipboard, shell, global shortcuts, game detection, logging, keyboard/mouse automationwebPreferencesupdated tocontextIsolation: true,nodeIntegration: false,sandbox: falseServices updated:
ElectronProvider,AppService,WindowService,BrowserService,GameService,LoggerService,ShortcutService,ClipboardService,KeyboardService,MouseService,TradeNotificationsService,StashGridServiceElectron 28 — IPC Serialization
Electron 28 is stricter about IPC argument types.
undefinedarguments cause"conversion failure from undefined"errors — fixed with!!poe.activecoercionloadURL(),shell.openExternal(),autoUpdater.checkForUpdates()now return promises — added.catch()handlers throughoutmain.tsandelectron/auto-updater.tsprocess.on('unhandledRejection')handler as a safety netElectron 28 — Window Behaviour
BrowserWindow.show()steals focus from PoE, causing rapid active/inactive detection cycling. Fixed by usingshowInactive()in thewindow-showIPC handler.setAlwaysOnTop(flag, level):levelcan no longer beundefined— added guard to only pass it when definedisMinimized: Now a method, not a property — fixed in theopen-routehandlerwin?.moveTop()and try/catch aroundevent.reply()(sender webContents may be destroyed)win.webContents.send()to the guardedsend()helperRxJS 7 —
debounce(() => EMPTY)Breaking ChangeIn RxJS 6,
debounce(() => EMPTY)emitted the buffered value when the inner observable completed. In RxJS 7, completion silently drops the value.This caused the overlay to never become visible —
registerVisibleChange()inOverlayComponentuseddebounce((show) => show ? EMPTY : timer(1500)), which swallowed allshow=truesignals. Fixed by replacingEMPTYwithtimer(0).RxJS 7 — Other Migration
flatMap→mergeMapin 30+ filesAngular Material 17 — MDC Component Migration
Angular Material v15+ migrated all components to use MDC (Material Design Components) internally, changing all CSS class names. Updated all selectors across 14 SCSS files:
.mat-card.mat-mdc-card.mat-dialog-container.mat-mdc-dialog-container.mat-dialog-content.mat-mdc-dialog-content.mat-dialog-actions.mat-mdc-dialog-actions.mat-form-field.mat-mdc-form-field.mat-slide-toggle.mat-mdc-slide-toggle.mat-slider.mat-mdc-slider.mat-tooltip.mat-mdc-tooltip .mdc-tooltip__surface.mat-snack-bar-container.mat-mdc-snack-bar-container+.mdc-snackbar__surface.mat-progress-bar-*.mdc-linear-progress__*.mat-raised-button.mat-mdc-raised-button.mat-stroked-button.mat-mdc-outlined-button.mat-flat-button.mat-mdc-flat-button.mat-standard-chip.mat-mdc-chip.mat-form-field-prefix/suffix.mat-mdc-form-field-icon-prefix/suffixAdditional Angular Material fixes:
mat-stretch-tabsattribute →[mat-stretch-tabs]="true"bindingNative Module Replacements
iohook→uiohook-napi(electron/hook.ts)active-win→node-window-manager(electron/window.ts)windowManager.getActiveWindow()node-window-managerWindow APIrequestAccessibility()with try/catch (required on macOS, no-op on Windows)robotjs(electron/robot.ts)VK_TO_KEY_NAMEmapping to translate numeric virtual key codes fromuiohook-napito the string key names expected by robotjs (e.g.0x44→'d',0xA0→'shift')Cloudflare Login Fix
The custom
User-Agentheader (PoEOverlayCommunityFork/x.x.x) was applied to all HTTP requests, including BrowserWindow page loads. Cloudflare flagged these as bot traffic, blocking the PoE login page.Fixed by only applying the custom UA to API requests (
/api/URLs and XHR), letting page loads use the default Chromium user-agent.Settings Window — Custom Titlebar
Replaced
custom-electron-titlebarwith a simple HTML/CSS titlebar (draggable title area with close button, matching the dark theme).Overlay — Input Value Clipping
<input>elements in the evaluate overlay weren't inheriting the PoE-themed font. Width calculated usingchunits mismatched with the browser default font. Fixed by addingfont: inherit; padding: 0toitem-frame-value-input.component.scss.Cross-Window IPC
With context isolation enabled, child windows (settings, periodic-update-thread) can no longer share state directly. Added IPC channel forwarding in
main.tsfor: settings changes, trade notifications, stash grid, vendor recipes, account updates.TSLint → ESLint
.eslintrc.jsonwith Angular ESLint configurationangular.jsonto use@angular-eslint/builder:linttslint.jsonBuild Configuration
extractCss,namedChunks,vendorChunk)>=18.13.0BrowserModule→CommonModulein shared modulesGetting Started
Manual Testing Checklist
Due to the scope of changes, manual testing is critical:
Basic Functionality
Window Behaviour
Input Handling
Account & Login
Automation Features
UI Components
Known Considerations
Native Modules: After pulling these changes, always run
npm run electron:rebuildto ensure native modules are compiled for the correct Electron version.Context Isolation: All Electron APIs are now accessed through
window.electronAPI. Directrequire('electron')calls in renderer code will not work.WSL Build: Building from WSL may hit memory limits or native module compilation issues. Build from a Windows terminal for production builds.