Commit graph

78 commits

Author SHA1 Message Date
Claude
9bd0e7b025
refactor: remove banned imports from test files
Some checks failed
Security Scan / security (push) Failing after 27s
- window/persistence_test.go: path/filepath → core.JoinPath
- display/display_test.go: path/filepath → core.JoinPath/PathDir
- browser/service_test.go: errors → core.NewError
- notification/service_test.go: errors → core.NewError

Zero banned imports in ALL gui files — production AND test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:53:40 +01:00
Claude
f1f7fcfab9
refactor: remove banned imports from display, window/layout, window/state
Some checks failed
Security Scan / security (push) Failing after 28s
- display/events.go: encoding/json → core.JSONMarshal/JSONUnmarshal
- display/display.go: os, filepath → core.Env, core.JoinPath
- window/layout.go: encoding/json, os, filepath → core primitives
- window/state.go: encoding/json, os, filepath → core primitives

All 17 packages build and test clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:37:47 +01:00
Claude
22668f7faa
feat(display): wire events, dock, notification actions to WebSocket bridge
Some checks failed
Security Scan / security (push) Failing after 29s
- Import events package in display orchestrator
- Bridge events.ActionEventFired → EventCustomEvent WebSocket broadcast
- Bridge dock.ActionProgressChanged → EventDockProgress
- Bridge dock.ActionBounceStarted → EventDockBounce
- Bridge notification.ActionNotificationActionTriggered → EventNotificationAction
- Bridge notification.ActionNotificationDismissed → EventNotificationDismiss
- 5 new EventType constants

All 17 packages build and test clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:33:46 +01:00
Claude
18a455b460
refactor: migrate entire gui to Core v0.8.0 API
Some checks failed
Security Scan / security (push) Failing after 25s
- Import paths: forge.lthn.ai/core/go → dappco.re/go/core
- Import paths: forge.lthn.ai/core/go-log → dappco.re/go/core/log
- Import paths: forge.lthn.ai/core/go-io → dappco.re/go/core/io
- RegisterTask → c.Action("name", handler) across all 15 services
- QueryHandler signature: (any, bool, error) → core.Result
- PERFORM(task) → Action.Run(ctx, opts)
- QUERY returns single core.Result (not 3 values)
- All 17 packages build and test clean on v0.8.0-alpha.1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:14:19 +01:00
Claude
84ec201a05
feat: notification perms/categories, dock progress/bounce, webview zoom/print
Some checks failed
Security Scan / security (push) Failing after 28s
Notification: RevokePermission, RegisterCategory, action broadcasts
Dock: SetProgressBar, Bounce/StopBounce, ActionProgressChanged
Webview: QueryZoom, TaskSetZoom, TaskSetURL, TaskPrint (with PDF export)
MCP: 4 new event tools (emit, on, off, list)
Environment: HasFocusFollowsMouse query
ContextMenu: Update, Destroy, GetAll, OnShutdown cleanup

Core upgraded to v0.8.0-alpha.1 (added alongside existing v0.3.3 —
full module path migration pending).

All 17 packages build and test clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:19:39 +01:00
Claude
bb5122580a
feat(environment,contextmenu): expand with new queries and lifecycle
Some checks failed
Security Scan / security (push) Failing after 26s
Environment:
- QueryFocusFollowsMouse IPC query
- 9 new tests (accent colour, file manager, focus follows mouse)

Context Menu:
- TaskUpdate (remove-then-add semantics)
- TaskDestroy (remove + release)
- QueryGetAll
- OnShutdown cleanup
- 12 new tests

All 17 packages build and test clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:08:50 +01:00
Claude
484f7138ee
feat(mcp): add event_emit, event_on, event_off, event_list tools
4 new MCP tools for the events package:
- event_emit — fire custom events with optional data
- event_on — register event listener via IPC
- event_off — remove listeners by name
- event_list — query all registered listeners

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:03:30 +01:00
Claude
de6c6c3405
feat(window): zoom, content, bounds, fullscreen, print + new events pkg
Some checks failed
Security Scan / security (push) Failing after 26s
Window package:
- 15 new PlatformWindow methods (zoom, content, bounds, states, print, flash)
- 16 new IPC types (tasks + queries for all new capabilities)
- ZoomIn/ZoomOut step 0.1, clamped to minimum 0.1
- SetURL, SetHTML, ExecJS for webview content control
- 36 new tests with Good/Bad/Ugly coverage

Events package (NEW — 17th package):
- Custom event system bridged to Core IPC
- Emit, On, Off, OnMultiple, Reset via Platform interface
- ActionEventFired broadcast for agent consumption
- 17 tests

All 17 packages build and test clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:01:40 +01:00
Claude
dcd2c9bcb8
feat(events): new package — custom event system bridged to Core IPC
- Platform interface wrapping EventManager (Emit, On, Off, OnMultiple, Reset)
- TaskEmit, TaskOn, TaskOff, QueryListeners IPC message types
- ActionEventFired broadcast for agent consumption
- Service with listener tracking and shutdown cleanup
- 17 tests with Good/Bad/Ugly coverage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:59:34 +01:00
Claude
31f6e0b67e
feat(dialog): expand with typed tasks, file options, 3 new MCP tools
Some checks failed
Security Scan / security (push) Failing after 25s
- TaskOpenFileWithOptions, TaskSaveFileWithOptions with extended options
- TaskInfo, TaskQuestion, TaskWarning, TaskError convenience tasks
- OpenFileOptions: CanChooseDirectories, CanChooseFiles, ShowHiddenFiles
- 3 new MCP tools: dialog_info, dialog_warning, dialog_error
- 29 new tests with Good/Bad/Ugly coverage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:55:55 +01:00
Claude
0f6400052c
feat(keybinding): add TaskProcess, error sentinels, concurrency test
- Platform.Process(accelerator) for programmatic trigger
- TaskProcess IPC task with ActionTriggered broadcast
- ErrorNotRegistered sentinel for remove/process on unknown bindings
- 5 new tests: process good/bad/ugly, remove sentinel, concurrent adds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:55:01 +01:00
Claude
ab0722d19e
feat(screen): expand with QueryCurrent, ScreenPlacement, Rect geometry
- Platform.GetCurrent() for active screen query
- ScreenPlacement with Apply() for window positioning rules
- Rect geometry: Origin, Corner, InsideCorner, IsEmpty, Contains, RectSize, Intersect
- Point type, Alignment/OffsetReference constants
- 18 new tests with Good/Bad/Ugly coverage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:54:17 +01:00
Claude
ee34ed5b26
fix(mcp): remove duplicate coreerr imports in 3 tool files
Some checks failed
Security Scan / security (push) Failing after 25s
Pre-existing build errors in tools_clipboard.go, tools_contextmenu.go,
tools_environment.go — each had coreerr imported twice. Removed duplicates.

All 16 packages build and test clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:51:06 +01:00
Snider
13a493f57d refactor(ax): AX compliance sweep — comments, error handling, test names
Some checks failed
Security Scan / security (push) Failing after 26s
Test / test (push) Failing after 56s
- Fix window/service.go: replace 3 fmt.Errorf calls with coreerr.E() (removes implicit fmt dependency)
- Add usage-example comments to all bare Register() functions across 10 packages
- Remove redundant prose comments (Options/Service/Register/OnStartup/HandleIPCEvents boilerplate)
- Add Result-type comments to message types in contextmenu, keybinding, notification packages
- Fix test naming to TestFilename_Function_{Good,Bad,Ugly} pattern in display_test, window_test, persistence_test, service_screen_test
- Convert New() and CreateWindowOptions doc comments to usage-example style

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 12:18:41 +01:00
2001e7ed87 Merge pull request '[agent/codex:gpt-5.4-mini] Update the code against the AX design principles in ~/spec/r...' (#4) from main into dev
Some checks failed
Security Scan / security (push) Failing after 35s
Test / test (push) Failing after 41s
2026-03-31 05:57:04 +00:00
Virgil
089bdacadb refactor(ax): align GUI surface with AX principles
Some checks failed
Security Scan / security (push) Failing after 29s
Test / test (push) Successful in 2m21s
Apply declarative window specs across display, MCP, and window service paths; route layout/window controls through IPC tasks; and add a local Wails stub so the workspace builds cleanly here.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 05:56:36 +00:00
Snider
bff6c5b7d3 refactor(ax): add screen service tests and window improvements
Some checks failed
Security Scan / security (push) Failing after 29s
Test / test (push) Failing after 2m2s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 06:38:55 +01:00
Virgil
02ea237a1d refactor(ax): use primary screen size for layouts 2026-03-31 05:38:00 +00:00
Snider
0e624bfb7b refactor(ax): merge mini AX pass
Some checks failed
Security Scan / security (push) Failing after 30s
Test / test (push) Failing after 2m10s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 06:32:06 +01:00
Virgil
35f8f5ec51 refactor(ax): align GUI APIs with AX principles 2026-03-31 05:31:00 +00:00
Virgil
2b6e6cee0b refactor(ax): finish AX cleanup in display stack
Some checks failed
Security Scan / security (push) Failing after 28s
Test / test (push) Failing after 2m9s
2026-03-31 05:24:09 +00:00
Virgil
da22bedbc6 refactor(ax): align public APIs with AX principles
Some checks failed
Security Scan / security (push) Failing after 42s
Test / test (push) Failing after 1m31s
2026-03-31 05:13:43 +00:00
Snider
b559562dd9 fix(dx): use coreerr.E() and go-io, update CLAUDE.md, add tests
Some checks failed
Security Scan / security (pull_request) Failing after 28s
Test / test (pull_request) Failing after 1m59s
- Replace 90+ fmt.Errorf calls with coreerr.E() from go-log across
  display, window, systray, keybinding, contextmenu, and mcp packages
- Replace os.ReadFile/WriteFile/MkdirAll with coreio.Local in
  window/layout.go and window/state.go
- Update CLAUDE.md: fix key files table for new package structure,
  document error handling and file I/O conventions, add missing deps
- Add 37 tests for window package (task handlers, persistence,
  tiling modes, snap positions, workflow layouts)
- Window coverage: 47.1% → 69.8%

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 09:05:35 +00:00
Snider
4bdbb68f46 refactor: update import path from go-config to core/config
Some checks failed
Security Scan / security (push) Failing after 9s
Test / test (push) Failing after 1m21s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 10:26:36 +00:00
Snider
ec492658c2 fix(mcp): add safe type assertions and complete stub handlers
Some checks failed
Security Scan / security (push) Failing after 9s
Test / test (push) Failing after 1m40s
Replace all 32 unchecked type assertions (result.(Type)) with safe
ok-pattern checks that return descriptive errors on type mismatch.

Complete stub handlers in tools_window.go (restore, title, visibility,
fullscreen) and tools_layout.go (save, restore, list, delete, get,
tile, snap) using proper IPC message types instead of workarounds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:28:15 +00:00
Snider
f884d698b2 fix(display): correct GetWindowTitle and add WS input validation
Some checks failed
Security Scan / security (push) Failing after 9s
Test / test (push) Has been cancelled
GetWindowTitle was returning info.Name (the window's identifier) instead
of the actual title. Added Title() to the PlatformWindow interface and
Title field to WindowInfo so the real title flows through queries.

Added wsRequire() helper and input validation for all webview:* WS
message cases — window name is required for every webview action, and
selectors/URLs are validated where they'd cause errors if empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:25:29 +00:00
Snider
ed44b6f7f9 fix(webview): broadcast ActionConsoleMessage and ActionException via watchers
Wire up go-webview ConsoleWatcher and ExceptionWatcher on real connectors
after connection creation, converting go-webview types to our own and
broadcasting via s.Core().ACTION().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:23:12 +00:00
Snider
19b949b8f3 test(mcp): add subsystem tests with IPC round-trip verification
Fix cyclic type panic in contextmenu tools by using map[string]any
for ContextMenuDef which contains self-referencing MenuItemDef.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:10:06 +00:00
Snider
a89e66c832 feat(mcp): add browser, contextmenu, keybinding, dock, lifecycle tools (11)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:08:34 +00:00
Snider
69a57a6946 feat(mcp): add notification, tray, environment tools (9)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:08:29 +00:00
Snider
985d3c737c feat(mcp): add screen, clipboard, dialog tools (14)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:08:26 +00:00
Snider
39d222d598 feat(mcp): add window and layout tools (22)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:08:22 +00:00
Snider
38fbf083d8 feat(mcp): add webview tools (18)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:08:18 +00:00
Snider
6dab7eae52 feat(mcp): add display subsystem skeleton
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:04:13 +00:00
Snider
b3f380e949 feat(display): add webview IPC->WS bridging (18 cases)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:03:50 +00:00
Snider
e1012982b3 test(webview): add service tests with mock connector
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:02:38 +00:00
Snider
67a364cf4e feat(webview): add service with connector interface and IPC handlers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:01:57 +00:00
Snider
465ef415a3 feat(webview): add IPC message types and own types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:01:03 +00:00
Snider
49a83110fb refactor(display): migrate stale Wails calls to IPC, remove wrapper types
Some checks failed
Security Scan / security (push) Failing after 9s
Test / test (push) Failing after 1m35s
Migrate handleOpenFile to dialog.TaskOpenFile IPC, handleSaveFile/handleRun/
handleBuild to ActionIDECommand IPC. Remove DialogManager, EnvManager,
EventManager interfaces and wailsDialogManager, wailsEnvManager,
wailsEventManager adapter structs. App interface now has Quit() + Logger() only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:53:50 +00:00
Snider
07bc116abd feat(display): add contextmenu integration and ActionIDECommand to orchestrator
Add HandleIPCEvents cases for contextmenu.ActionItemClicked and
ActionIDECommand, WS->IPC bridge cases for contextmenu:add/remove/get/list,
EventContextMenuClick and EventIDECommand constants.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:52:38 +00:00
Snider
94c17b88c2 feat(contextmenu): add contextmenu core.Service with Platform interface and IPC
Completes full Wails v3 Manager API coverage through the IPC bus.
Service maintains in-memory registry, delegates to Platform for native
context menu operations, broadcasts ActionItemClicked on menu item clicks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:51:33 +00:00
Snider
7ea92419ae feat(display): add dock + lifecycle HandleIPCEvents and WS bridge integration
Some checks failed
Security Scan / security (push) Failing after 8s
Test / test (push) Failing after 1m36s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:42:48 +00:00
Snider
6241bdddb6 feat(lifecycle): add application lifecycle core.Service with Platform interface and IPC
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:41:42 +00:00
Snider
073794aed0 feat(dock): add dock/badge core.Service with Platform interface and IPC
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:40:41 +00:00
Snider
22315d07bb feat(display): wire keybinding, browser, and file drop through orchestrator
Some checks failed
Security Scan / security (push) Failing after 7s
Test / test (push) Failing after 1m32s
Adds EventKeybindingTriggered and EventWindowFileDrop EventType constants.
HandleIPCEvents bridges keybinding.ActionTriggered and window.ActionFilesDropped
to WS events. handleWSMessage bridges WS commands to IPC for keybinding:add,
keybinding:remove, keybinding:list, browser:open-url, browser:open-file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:38:18 +00:00
Snider
23bf0302d3 feat(window): add file drop support to PlatformWindow interface
Adds OnFileDrop(handler func(paths []string, targetID string)) to PlatformWindow.
trackWindow() now wires file drop callbacks to ActionFilesDropped broadcasts.
Updates both exported MockWindow and unexported mockWindow with the new method.
Wails adapter maps WindowFilesDropped event with DroppedFiles and DropTargetDetails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:36:55 +00:00
Snider
1e0b89b94e feat(browser): add browser core.Service with Platform interface and IPC
Implements pkg/browser with three-layer pattern: IPC Bus -> Service -> Platform.
Stateless service — delegates OpenURL and OpenFile to platform adapter.
No queries or actions, tasks only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:35:01 +00:00
Snider
3954725d45 feat(keybinding): add keybinding core.Service with Platform interface and IPC
Implements pkg/keybinding with three-layer pattern: IPC Bus -> Service -> Platform.
Service maintains in-memory registry, ErrAlreadyRegistered on duplicates.
QueryList reads from service registry, not platform.GetAll().
ActionTriggered broadcast on shortcut trigger via platform callback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:34:30 +00:00
Snider
bba743d2cb refactor(display): remove extracted clipboard/dialog/notification/theme/screen code
Some checks failed
Security Scan / security (push) Failing after 9s
Test / test (push) Failing after 1m33s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:24:06 +00:00
Snider
335d93d05c feat(display): bridge new service Actions to WSEventManager
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:20:43 +00:00