Commit a0ec1de
authored
feat: migrate from Wails v2 to v3 (#44)
* deps: add @wailsio/runtime to omniviewdev-runtime package
* build: replace Makefile and wails.json with Taskfile build system
* feat: add v3 menu system with context menu stubs and keybindings
* feat: add WindowManager with main window hide-on-close recycling
* deps: add wails v3 dependency alongside v2 for migration
* feat: add wails v3 vite plugin, update vite to v8
* refactor: migrate EventEmitter interface and all call sites to wails v3 API
* feat: add typed event registration for v3 TypeScript binding generation
* feat: migrate main.go entry point, app service, and asset handler to wails v3
* feat: migrate resource controller to v3 service, delete client wrapper
* feat: migrate all remaining controllers to v3 services, remove all wails v2 imports
- Migrate exec, logs, metric, networker, settings, data, ui, utils, devserver, diagnostics
- Delete 7 client wrapper files
- Convert dialog calls in installer.go to v3 builder pattern
- Update main.go service registration with interface wrappers
- Zero wails/v2 imports remaining in Go codebase
* feat: migrate runtime package to re-export @wailsio/runtime v3 APIs
* feat: migrate all frontend event listeners to @wailsio/runtime Events API
- Update 22 source files and 4 test files
- EventsOn → Events.On with event.data unwrapping
- EventsOff → Events.Off
- BrowserOpenURL → Browser.OpenURL
- Update imports from wailsjs/runtime to @wailsio/runtime or @omniviewdev/runtime/runtime
* deps: remove wails v2 dependency — go mod tidy confirms zero v2 usage
* build: delete legacy wails.json and Makefile — replaced by Taskfile
* feat: complete frontend migration to v3 bindings
- Generate v3 bindings to packages/omniviewdev-runtime/src/bindings/
- Update all hook imports from wailsjs/go/ to v3 binding paths
- Remove all namespace patterns (types.Connection -> Connection)
- Update WatchState enum to v3 member names
- Delete old wailsjs/ directory
- Update Taskfile binding generation to output to correct location
- Update api.ts and models.ts to re-export v3 bindings
* ci: migrate PR checks from make to task, install wails3 + go-task
* fix: update remaining v2 Window API calls to v3 Window object methods
* fix: migrate remaining UI files from v2 namespace patterns to v3 direct imports
* fix: complete UI model import migration to v3 direct imports
* fix: use export type for EmitFunc re-export (isolatedModules)
* fix: resolve multi-arg event payloads and restore CreateTerminal binding
- Wrap multi-arg Emit calls in struct payloads (UpdatePayload, UpdateErrorPayload, DevServerErrorPayload)
- Add typed event registration for update events
- Restore CreateTerminal method on exec controller (wraps CreateSession with TTY)
- Fix frontend tuple destructuring to use struct payload fields
- Regenerate v3 bindings (222 methods, 28 enums, 118 models)
* fix: eliminate binding warnings with proper service wrappers
- Replace PluginManagerService interface embedding with explicit method delegation
(excludes SetDevServerChecker, SetPluginLogManager, HandlePluginCrash)
- Create PluginLogService wrapper exposing only frontend-safe methods
(excludes OnEmit/EmitFunc, Stream, Close, LogDir)
- Create DevServerService wrapper to prevent service/model type shadowing
- Update api.ts and models.ts for new binding file names
- Binding warnings reduced from 7 to 3 (remaining are transitive SDK types)
* fix: replace interface embedding with explicit method delegation for all service wrappers
All controller service wrappers now use explicit method delegation instead of
interface embedding. This ensures the binding generator only discovers
frontend-safe methods and eliminates all 7 binding warnings:
- PluginManagerService: 22 frontend methods, excludes SetDevServerChecker/etc
- ResourceControllerService: 45 methods, excludes OnPlugin*/Run/SetCrashCallback
- ExecControllerService: 14 methods, excludes plugin lifecycle
- LogsControllerService: 9 methods
- MetricControllerService: 8 methods
- NetworkerControllerService: 9 methods
- SettingsControllerService: 8 methods
- DataControllerService: 4 methods
- SettingsProviderService: 19 methods, excludes Initialize/RegisterChangeHandler
- PluginLogService: 5 methods, excludes OnEmit/Stream/Close
- DevServerService: 12 methods, separates service from model type
Binding generation: 0 warnings, 16 services, 174 methods, 28 enums, 110 models
* feat: type all events properly for v3 typed event system
- Replace map[string]interface{} with ConnectionStatusPayload for connection/status
- Register connection/status, watch/STATE, plugin/process/log, menu events via RegisterEvent[T]
- Add event constants for all menu events
- Import eventcreate.ts and reference eventdata.d.ts in runtime.ts for type augmentation
- 32 fully typed events in CustomEvents interface (was 23)
- Update test assertions to use typed payloads
* fix: resolve all TypeScript type errors in runtime hooks
- Remove unnecessary `as` casts where CustomEvents provides proper types
- Add null guards for v3 binding return types (T | null)
- Fix CancellablePromise/TanStack Query type mismatch in useResourceMetrics
- Handle optional map values in useWatchState and useConnectionStatus
- Runtime package typecheck: 0 errors
* fix: rewrite all Taskfiles to match canonical wails3 scaffold
- Root Taskfile: dev task just calls wails3 dev (no manual build/run)
- darwin Taskfile: proper build:native with DEV flag, correct run task with APP_NAME in paths
- linux/windows Taskfiles: simplified to match scaffold pattern
- build/Taskfile.yml: proper deps chain (install:frontend:deps, generate:bindings, build:frontend)
- config.yml dev_mode.executes drives the dev lifecycle automatically
* fix: add build:dev script matching wails3 scaffold pattern
build:dev does a non-minified development vite build, needed because
the Go binary embeds dist/ even in dev mode while Vite dev server
provides hot reload on the side.
* fix: remove -q flag from pnpm build command (unsupported by vite 8)
* fix: set vite dev server port to 9245 to match wails3 config
* fix: reorder service registration so controllers initialize before plugin loading
Controllers must receive ctx from ServiceStartup BEFORE the bootstrap
service calls pluginManager.Initialize(), which triggers OnPluginStart
on all controllers. Without ctx, gRPC stream creation panics with nil
pointer dereference.
Follows Wails v3 documented pattern: 'The context will be valid as long
as the application is running, and will be cancelled right before shutdown.'
* fix: update vite config for plugin-react v6 and Vite 8
- Replace babel config with @rolldown/plugin-babel + reactCompilerPreset
- Update @vitejs/plugin-react to v6
- Install @rolldown/plugin-babel
- Eliminates esbuild/optimizeDeps deprecation warnings
* fix: final migration sweep — delete legacy v2 runtime, add dist/.gitkeep
- Delete packages/omniviewdev-providers/internal/runtime/ (legacy v2 wailsjs wrapper)
- Update providers index.ts to re-export from @wailsio/runtime directly
- Update portforward hooks to use Browser.OpenURL instead of BrowserOpenURL
- Add dist/.gitkeep for go:embed directive on fresh clones
- Add @wailsio/runtime dependency to providers package
* fix: add per-card error boundaries to prevent plugin crashes from taking down the IDE
- HomepageCard: wrap plugin component in ErrorBoundary with InlineErrorFallback
so a single card crash shows an inline error with retry, not a full-page crash
- LinkedResourceDrawer: wrap sidebar component in ErrorBoundary so plugin
sidebar crashes don't block the entire drawer
Both use resetKeys tied to the specific plugin/resource so retries are scoped.
* fix: improve card error fallback with centered layout and truncated error message
* fix: configure Vite HMR to connect directly to dev server
Wails v3's asset server proxy doesn't support WebSocket upgrades,
so HMR module updates can't flow through it. Configure the HMR client
to connect directly to localhost:9245 via ws:// protocol, bypassing
the Wails proxy while keeping module fetches proxied.
* fix: remove custom server config to match wails3 scaffold — fixes HMR
The scaffold has zero server config. wails3 dev handles port assignment
via CLI flags and WAILS_VITE_PORT env var. Our custom server block with
host/port/strictPort/hmr was overriding Vite's defaults and breaking
the HMR connection through the Wails webview proxy.
* fix: restore HMR config with localhost/ws protocol per wailsapp/wails#3064
The Wails webview loads from wails.localhost which can't resolve
WebSocket connections. The confirmed fix from the community is to set
server.hmr.host='localhost' and server.hmr.protocol='ws' so the HMR
client connects directly to the Vite dev server bypassing wails.localhost.
* fix: add explicit clientPort to HMR config for Wails webview compatibility
* fix: use dedicated HMR port to bypass Wails WebSocket blocking
The Wails v3 asset server returns 501 for WebSocket upgrade requests,
preventing Vite HMR from connecting through the proxy. Use a separate
port (9246) for the HMR WebSocket so the webview connects directly
to Vite, bypassing the asset server entirely.
* fix: use application.AssetFileServerFS instead of http.FileServerFS
http.FileServerFS always serves from embedded dist/ assets, completely
bypassing the Wails dev server proxy. application.AssetFileServerFS
checks FRONTEND_DEVSERVER_URL and proxies to the Vite dev server in
dev mode, serving live content with HMR support. This is why:
- import.meta.env.DEV was false (serving production build)
- HMR client was never injected
- Dev mode indicator was missing from footer
* cleanup: remove unnecessary HMR port workaround
The separate HMR port (9246) was a workaround for when the webview
was loading from embedded dist/ assets. Now that AssetFileServerFS
proxies to Vite in dev mode, HMR works natively through the proxy.
Only keep hmr.host=localhost and hmr.protocol=ws per wailsapp/wails#3064.
* feat: add server mode for Playwright E2E testing
- Add Server options (localhost:34115) to application.Options for
headless HTTP server mode (built with -tags server)
- Add build:server and run:server tasks to Taskfile
- Update Playwright config to use run:server with /health endpoint
- Server mode serves the same app without native GUI dependencies,
suitable for CI/CD testing
* feat: configure Playwright E2E for Wails v3 server mode
- Add ServerOptions (port 34115) to application.Options
- Playwright config targets server mode at localhost:34115
- Server mode tasks commented out — blocked by Wails v3 alpha.74 macOS
build tag conflict (darwin files don't exclude server tag)
- E2E tests can run in CI on Linux where server mode works
- TODO: uncomment server tasks when Wails fixes upstream
* chore: gitignore omniview binary
* ci: migrate all workflows from Wails v2 to v3
- pr.yml: task + wails3 for builds and E2E (server mode on Linux)
- nightly.yaml: task + wails3 for all 3 platform builds, Go 1.24→1.26
- release.yaml: task + wails3 for all 3 platform builds
- All: output paths updated from build/bin/ to bin/
- All: wails build replaced with task common:build:frontend + go build
* fix: add dist/.gitkeep so go:embed works before frontend build
* ci: install correct Wails v3 Linux deps with cached apt action
Match Wails v3 CI (build-and-test-v3.yml): libgtk-3-dev libwebkit2gtk-4.1-dev
libwayland-dev build-essential pkg-config. Use awalsh128/cache-apt-pkgs-action
for caching across runs.
* ci: update Node.js to v24, install correct Wails v3 Linux deps
* chore: update toolchain — Node 24, Go 1.26, pnpm 10, @types/node latest
* ci: disable E2E (server mode broken in alpha.74), fix setup-task rate limit
- E2E job disabled with if:false until Wails v3 fixes BrowserWindow.AttachModal
- Add repo-token to all arduino/setup-task calls to prevent GitHub API rate limiting
* ci: create proper macOS .app bundles in all build workflows
- Add .app bundle creation step (Contents/MacOS + Resources + Info.plist)
- Sign and notarize the .app bundle, not the bare binary
- DMG references Omniview.app instead of bare Omniview
- Add CGO/MACOSX_DEPLOYMENT_TARGET env vars for macOS builds
- PR artifacts zip the .app bundle
* fix: render Info.plist from config.yml — fixes corrupt macOS .app bundle
Info.plist had Go template placeholders ({{.Name}}, {{.Info.ProductVersion}})
from the v2 era. Ran wails3 update:build-assets to render actual values.
Also removed stale CFBundleURLTypes with unrendered template vars.
* fix: address code review findings
Critical:
- UI ServiceWrapper: replace struct embedding with explicit delegation,
excluding OnPluginInit/Start/Stop/Shutdown/Destroy from frontend
Important:
- PluginAssetHandler: replace panic with 500 response on UserHomeDir failure
- PluginAssetHandler: compile regex once at package level, not per request
- Main window: add UseApplicationMenu: true for Windows/Linux menu support
- Wire SetupKeyBindings and SetupContextMenus (were defined but never called)
* fix: add dist/.gitkeep for go:embed (force-add past .gitignore)1 parent 8582397 commit a0ec1de
272 files changed
Lines changed: 14923 additions & 7788 deletions
File tree
- .github/workflows
- backend
- diagnostics
- pkg/plugin
- data
- devserver
- exec
- logs
- metric
- networker
- resource
- settings
- ui
- utils
- window
- build
- darwin
- ios
- linux
- nfpm
- windows
- nsis
- docs/superpowers
- plans
- specs
- e2e
- packages
- omniviewdev-providers
- internal/runtime
- lib/portforward
- omniviewdev-runtime
- src
- bindings
- encoding/json
- github.com
- omniviewdev
- omniview
- backend
- diagnostics
- pkg/plugin
- devserver
- lifecycle
- metric
- pluginlog
- registry
- resource
- types
- ui
- utils
- internal/telemetry
- plugin-sdk
- pkg
- config
- types
- v1
- exec
- logs
- metric
- networker
- resource
- settings
- wailsapp/wails/v3/internal
- time
- context
- plugins
- settings
- hooks
- connection
- data
- exec
- logs
- metric
- networker
- resource
- types
- utils
- wailsjs
- go
- data
- devserver
- diagnostics
- exec
- logs
- main
- metric
- networker
- pluginlog
- plugin
- resource
- settings
- telemetry
- ui
- utils
- runtime
- omniviewdev-showcase
- omniviewdev-ui
- ui
- components
- tables/Resources
- actions
- cells
- contexts
- features
- devtools
- logger
- pluginlogs
- plugins
- adapters
- react
- federation
- hooks
- plugin
- resource
- settings
- layouts/core/main
- BottomDrawer
- __tests__
- Header
- areas
- pages
- [plugin]
- [connectionID]/resources
- connecting
- home
- plugins
- settings
- providers
- BottomDrawer
- __tests__
- containers
- LogViewer
- hooks
- sources
- __tests__
- RightDrawer
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
93 | 99 | | |
94 | | - | |
| 100 | + | |
95 | 101 | | |
96 | | - | |
| 102 | + | |
97 | 103 | | |
98 | | - | |
99 | | - | |
| 104 | + | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
103 | 113 | | |
104 | | - | |
105 | | - | |
106 | | - | |
| 114 | + | |
| 115 | + | |
107 | 116 | | |
108 | 117 | | |
109 | 118 | | |
110 | 119 | | |
111 | 120 | | |
112 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
113 | 132 | | |
114 | 133 | | |
115 | 134 | | |
| |||
129 | 148 | | |
130 | 149 | | |
131 | 150 | | |
132 | | - | |
| 151 | + | |
133 | 152 | | |
134 | | - | |
| 153 | + | |
135 | 154 | | |
136 | 155 | | |
137 | 156 | | |
138 | 157 | | |
139 | 158 | | |
140 | 159 | | |
141 | 160 | | |
142 | | - | |
| 161 | + | |
143 | 162 | | |
144 | 163 | | |
145 | 164 | | |
| |||
153 | 172 | | |
154 | 173 | | |
155 | 174 | | |
156 | | - | |
| 175 | + | |
157 | 176 | | |
158 | 177 | | |
159 | | - | |
160 | 178 | | |
161 | 179 | | |
162 | 180 | | |
163 | 181 | | |
164 | 182 | | |
165 | 183 | | |
166 | 184 | | |
167 | | - | |
168 | | - | |
| 185 | + | |
| 186 | + | |
169 | 187 | | |
170 | 188 | | |
171 | 189 | | |
172 | 190 | | |
173 | 191 | | |
174 | | - | |
| 192 | + | |
175 | 193 | | |
176 | 194 | | |
177 | 195 | | |
| |||
188 | 206 | | |
189 | 207 | | |
190 | 208 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
195 | 214 | | |
196 | 215 | | |
197 | 216 | | |
| |||
213 | 232 | | |
214 | 233 | | |
215 | 234 | | |
216 | | - | |
217 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
218 | 243 | | |
219 | | - | |
220 | | - | |
221 | | - | |
| 244 | + | |
| 245 | + | |
222 | 246 | | |
223 | 247 | | |
224 | 248 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 249 | + | |
| 250 | + | |
229 | 251 | | |
230 | 252 | | |
231 | 253 | | |
232 | 254 | | |
233 | 255 | | |
234 | | - | |
| 256 | + | |
| 257 | + | |
235 | 258 | | |
236 | 259 | | |
237 | | - | |
| 260 | + | |
238 | 261 | | |
239 | 262 | | |
240 | 263 | | |
241 | 264 | | |
242 | 265 | | |
243 | 266 | | |
244 | | - | |
| 267 | + | |
245 | 268 | | |
246 | 269 | | |
247 | 270 | | |
| |||
278 | 301 | | |
279 | 302 | | |
280 | 303 | | |
281 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
282 | 311 | | |
283 | | - | |
| 312 | + | |
284 | 313 | | |
285 | | - | |
| 314 | + | |
286 | 315 | | |
287 | | - | |
288 | | - | |
| 316 | + | |
289 | 317 | | |
290 | 318 | | |
291 | 319 | | |
292 | 320 | | |
293 | | - | |
294 | | - | |
295 | | - | |
| 321 | + | |
| 322 | + | |
296 | 323 | | |
297 | 324 | | |
298 | 325 | | |
299 | 326 | | |
300 | 327 | | |
301 | | - | |
| 328 | + | |
| 329 | + | |
302 | 330 | | |
303 | 331 | | |
304 | | - | |
| 332 | + | |
305 | 333 | | |
306 | 334 | | |
307 | 335 | | |
308 | 336 | | |
309 | 337 | | |
310 | 338 | | |
311 | | - | |
| 339 | + | |
312 | 340 | | |
313 | 341 | | |
314 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
28 | 40 | | |
29 | | - | |
| 41 | + | |
30 | 42 | | |
31 | 43 | | |
32 | | - | |
| 44 | + | |
33 | 45 | | |
34 | 46 | | |
35 | | - | |
| 47 | + | |
36 | 48 | | |
37 | 49 | | |
38 | | - | |
| 50 | + | |
39 | 51 | | |
40 | 52 | | |
41 | 53 | | |
| |||
53 | 65 | | |
54 | 66 | | |
55 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
56 | 74 | | |
57 | 75 | | |
58 | 76 | | |
59 | 77 | | |
60 | 78 | | |
61 | | - | |
62 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
63 | 87 | | |
64 | 88 | | |
65 | | - | |
| 89 | + | |
66 | 90 | | |
67 | 91 | | |
68 | 92 | | |
| |||
78 | 102 | | |
79 | 103 | | |
80 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
81 | 111 | | |
82 | 112 | | |
83 | 113 | | |
| |||
90 | 120 | | |
91 | 121 | | |
92 | 122 | | |
93 | | - | |
| 123 | + | |
94 | 124 | | |
95 | 125 | | |
96 | | - | |
| 126 | + | |
97 | 127 | | |
98 | 128 | | |
99 | | - | |
| 129 | + | |
100 | 130 | | |
101 | 131 | | |
102 | 132 | | |
103 | | - | |
| 133 | + | |
104 | 134 | | |
0 commit comments