refactor(ax): remove legacy compatibility aliases
Some checks failed
Security Scan / security (push) Failing after 14s
Test / test (push) Successful in 1m5s

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-03-31 07:28:11 +00:00
parent f854b65720
commit 450d04411a
5 changed files with 3 additions and 50 deletions

View file

@ -74,10 +74,9 @@ The help service can work standalone or integrated with Core:
### With Display Service
When Display service is available, help opens through the IPC action system:
When Display service is available, help opens through the display service's declarative window API:
```go
// Automatically uses display.open_window action
helpService.Init(core, displayService)
helpService.Show()
```
@ -134,19 +133,6 @@ The help window opens with default settings:
| Width | 800px |
| Height | 600px |
## IPC Action
## Display Integration
When using Display service, help triggers this action:
```go
{
"action": "display.open_window",
"name": "help",
"options": {
"Title": "Help",
"Width": 800,
"Height": 600,
"URL": "/#anchor", // When using ShowAt
},
}
```
The help window spec stays internal to the service. Callers initialize the help service with the display service and then call `Show()` or `ShowAt()`; the display layer opens the window from a declarative `window.Window` spec.

View file

@ -30,9 +30,6 @@ import (
// Options holds configuration for the display service.
type Options struct{}
// WindowInfo is an alias for window.WindowInfo (backward compatibility).
type WindowInfo = window.WindowInfo
// Service manages windowing, dialogs, and other visual elements.
// It orchestrates sub-services (window, systray, menu) via IPC and bridges
// IPC actions to WebSocket events for TypeScript apps.
@ -56,11 +53,6 @@ func NewService() (*Service, error) {
}, nil
}
// New is kept for backward compatibility with older callers.
func New() (*Service, error) {
return NewService()
}
// Register creates a factory closure that captures the Wails app.
// Pass nil for testing without a Wails runtime.
func Register(wailsApp *application.App) func(*core.Core) (any, error) {
@ -241,9 +233,6 @@ type WebSocketMessage struct {
Data map[string]any `json:"data,omitempty"`
}
// WSMessage is kept for backward compatibility with older callers.
type WSMessage = WebSocketMessage
// requireWebSocketField extracts a string field from WebSocket data and returns an error if it is empty.
func requireWebSocketField(data map[string]any, key string) (string, error) {
v, _ := data[key].(string)
@ -848,11 +837,6 @@ func (s *Service) GetWebSocketEventManager() *WebSocketEventManager {
return s.events
}
// GetEventManager is kept for backward compatibility with older callers.
func (s *Service) GetEventManager() *WebSocketEventManager {
return s.GetWebSocketEventManager()
}
// --- Menu (handlers stay in display, structure delegated via IPC) ---
func (s *Service) buildMenu() {

View file

@ -91,12 +91,6 @@ func NewWebSocketEventManager() *WebSocketEventManager {
return em
}
// WSEventManager is kept for backward compatibility with older callers.
type WSEventManager = WebSocketEventManager
// NewWSEventManager is kept for backward compatibility with older callers.
func NewWSEventManager() *WebSocketEventManager { return NewWebSocketEventManager() }
// broadcaster sends events to all subscribed clients.
func (em *WebSocketEventManager) broadcaster() {
for event := range em.eventBuffer {

View file

@ -17,11 +17,6 @@ func NewService(c *core.Core) *Subsystem {
return &Subsystem{core: c}
}
// New is kept for backward compatibility with older callers.
func New(c *core.Core) *Subsystem {
return NewService(c)
}
// Name returns the subsystem identifier.
func (s *Subsystem) Name() string { return "display" }

View file

@ -41,12 +41,6 @@ type TaskMaximize struct{ Name string }
// TaskMinimize minimizes a named window.
type TaskMinimize struct{ Name string }
// TaskMaximise is kept for backward compatibility with older callers.
type TaskMaximise = TaskMaximize
// TaskMinimise is kept for backward compatibility with older callers.
type TaskMinimise = TaskMinimize
type TaskFocus struct{ Name string }
type TaskRestore struct{ Name string }