Commit Graph

17 Commits

Author SHA1 Message Date
Vantz Stockwell
8b0289d133 fix: updater API URL — remove /v1/ prefix, Gitea uses /api/packages/ not /api/v1/packages/
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m6s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 12:22:24 -04:00
Vantz Stockwell
c782fcc2c3 fix: add updater API response logging to diagnose update check failures
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m3s
Logs the raw API response body and status from Gitea package API,
plus parsed version count and current version comparison. This will
show exactly why updates aren't being detected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 12:18:31 -04:00
Vantz Stockwell
af629fa373 fix: add username field to SSH key credential form — was missing entirely
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m3s
Root cause of pubkey auth failure: SSH key credentials had no username,
so ConnectSSH defaulted to "root" and the server rejected the key.
The SSH key form in ConnectionEditDialog only had Name, PEM, Passphrase.
Added Username field between Name and PEM.

Delete your existing SSH key credentials and re-create them with the
correct username.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 12:15:08 -04:00
Vantz Stockwell
ddd214d6d8 feat: add file logging to %APPDATA%\Wraith\wraith.log for headless debugging
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m5s
slog now writes to wraith.log instead of stdout. Debug-level logging enabled.
ConnectSSH and UpdateConnection log credential resolution details. This lets
us diagnose the pubkey auth issue without needing a console window.

Check: %APPDATA%\Wraith\wraith.log after attempting a connection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 12:09:56 -04:00
Vantz Stockwell
9338fef0c2 fix: auto-switch sidebar to SFTP on SSH connect + credential debug logging
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m4s
Sidebar automatically switches from Connections to SFTP tab when an SSH
session becomes active. Added slog debug output to ConnectSSH showing
credentialID, vault state, and loaded credential details to diagnose
pubkey auth failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:54:21 -04:00
Vantz Stockwell
999f8f0539 fix: OAuth token exchange — try JSON then form-encoded, show actual error in browser
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m2s
The callback page now shows the real error message instead of a generic
"Failed to exchange" message. Token exchange tries JSON Content-Type first
(matching Claude Code's pattern) with form-encoded fallback. Full response
body logged for debugging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:48:54 -04:00
Vantz Stockwell
901d9c257d fix: SSH key double-base64 encoding — PEM was corrupted during storage
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m3s
Root cause: frontend btoa() encoded the PEM before sending to Go []byte
parameter. Wails already base64-encodes []byte over JSON bridge, so the
vault stored base64(base64(pem)) — garbage. Fix: Go method now accepts
string, frontend sends raw PEM. Keys must be re-added after this update.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:39:24 -04:00
Vantz Stockwell
163af456b4 fix: SSH password prompt on auth failure, version from Go backend, visible errors
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m5s
- ConnectSSH returns NO_CREDENTIALS error when no credential is stored
- Frontend catches auth failures and prompts for username/password
- ConnectSSHWithPassword method for ad-hoc password auth
- Version loaded from Go backend (build-time -ldflags) in settings + unlock screen
- Connection errors shown as alert() instead of silent console.error
- Added UpdateService.CurrentVersion() and WraithApp.GetVersion()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:38:08 -04:00
Vantz Stockwell
b46c20b0d0 feat: wire all remaining stubs — settings, SFTP, RDP, credentials, FreeRDP callbacks
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m4s
Four-agent parallel deployment:

1. Settings persistence — all 5 settings wired to SettingsService.Set/Get,
   theme picker persists, update check calls real UpdateService, external
   links use Browser.OpenURL, SFTP file open/save calls real service,
   Quick Connect creates real connection + session, exit uses Wails quit

2. SSH key management — credential dropdown in ConnectionEditDialog,
   collapsible "Add New Credential" panel with password/SSH key modes,
   CredentialService proxied through WraithApp (vault-locked guard),
   new CreateSSHKeyCredential method for atomic key+credential creation

3. RDP frontend wiring — useRdp.ts calls real RDPGetFrame/SendMouse/
   SendKey/SendClipboard via Wails bindings, ConnectRDP on WraithApp
   resolves credentials and builds RDPConfig, session store handles
   RDP protocol, frame pipeline uses polling at 30fps

4. FreeRDP3 callback registration — PostConnect and BitmapUpdate callbacks
   via syscall.NewCallback, GDI mode for automatic frame decoding,
   freerdp_context_new() call added, settings/input/context pointers
   extracted from struct offsets, BGRA→RGBA channel swap in frame copy,
   event loop fixed to pass context not instance

11 files changed. Zero build errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:25:03 -04:00
Vantz Stockwell
df23cecdbd fix: wire connection CRUD, add Group+/Host+ buttons, fix vault stubs
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m5s
- Delete connection/group now calls real Go backend (was local array splice)
- Duplicate connection calls ConnectionService.CreateConnection
- Rename group calls new ConnectionService.RenameGroup method
- Added Group+ and Host+ buttons to sidebar header
- Vault change password wired to real unlock/create flow
- Export/import vault shows helpful path info instead of stub alert

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:08:40 -04:00
Vantz Stockwell
8572e6e7ea fix: wire SSH/SFTP/terminal to real Go backend — kill all stubs
Critical path wired end-to-end:
- ConnectSSH on WraithApp resolves credentials from vault, builds auth methods
- SSH output handler emits Wails events (base64) to frontend
- useTerminal.ts forwards keystrokes to SSHService.Write, resize to SSHService.Resize
- useTerminal.ts listens for ssh:data:{sessionId} events and writes to xterm.js
- session.store.ts connect() calls real Go ConnectSSH, not mock
- useSftp.ts calls real SFTPService.List instead of hardcoded mock data
- SFTP client auto-registered on SSH connection via pkg/sftp
- DisconnectSession cleans up both SSH and SFTP

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:49:21 -04:00
Vantz Stockwell
75afa70155 fix: OAuth redirect URI must use localhost not 127.0.0.1 + wire vault/connections/import to Go backend
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m4s
2026-03-17 10:28:48 -04:00
Vantz Stockwell
a1dce82d99 fix: wire vault persistence, connection loading, and MobaXterm import to real Go backend
Replace all TODO stubs in frontend stores with real Wails Call.ByName
bindings. The app store now calls WraithApp.IsFirstRun/CreateVault/Unlock
so vault state persists across launches. The connection store loads from
ConnectionService.ListConnections/ListGroups instead of hardcoded mock
data. The import dialog calls a new WraithApp.ImportMobaConf method that
parses the file, creates groups and connections in SQLite, and stores
host keys. ConnectionEditDialog also uses real Go CRUD calls. MainLayout
loads connections on mount after vault unlock.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:27:50 -04:00
Vantz Stockwell
fbd2fd4f80 feat: wire real Claude API — OAuth login + live chat via Wails bindings
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m2s
Replace mock responses in the XO copilot panel with real Wails binding
calls to the Go AIService backend:

- StartLogin now opens the browser via pkg/browser.OpenURL
- SendMessage returns ChatResponse (text + tool call results) instead of
  bare error, fixing the tool-call accumulation bug in messageLoop
- Add GetModel/SetModel methods for frontend model switching
- Frontend useCopilot composable calls Go via Call.ByName from
  @wailsio/runtime, with conversation auto-creation, auth checks, and
  error display in the chat panel
- Store defaults to isAuthenticated=false; panel checks auth on mount
- CopilotSettings syncs model changes and logout to the backend

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:22:07 -04:00
Vantz Stockwell
f22fbe14fa feat: auto-updater — check Gitea packages for new versions, download + install
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m5s
Add internal/updater package with UpdateService that queries the Gitea
generic-package API for newer releases, downloads the installer with
SHA256 verification, and launches it to apply the update. Includes
semver comparison (CompareVersions) and comprehensive test coverage
with httptest-based mock servers.

Wire UpdateService into WraithApp (app.go accepts version param) and
register as a Wails service in main.go. Frontend StatusBar shows a
blue pill notification when an update is available; SettingsModal About
section displays the current version and a "Check for Updates" button
with idle/checking/found/up-to-date/error states.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:11:50 -04:00
Vantz Stockwell
7ee5321d69 feat: AI copilot backend — OAuth PKCE, Claude API streaming, 16 tools, conversations
Some checks failed
Build & Sign Wraith / Build Windows + Sign (push) Has been cancelled
- OAuth PKCE flow for Max subscription auth (no API key needed)
- Claude API client with SSE streaming (Messages API v1)
- 16 tool definitions: terminal, SFTP, RDP, session management
- Tool dispatch router mapping to existing Wraith services
- Conversation manager with SQLite persistence
- Terminal output ring buffer for AI context
- RDP screenshot encoder (RGBA → JPEG with downscaling)
- Wired into Wails app as AIService

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 09:09:23 -04:00
Vantz Stockwell
8a096d7f7b Wraith v0.1.0 — Desktop SSH + RDP + SFTP Client
Some checks failed
Build & Sign Wraith / Build Windows + Sign (push) Has been cancelled
Go + Wails v3 + Vue 3 + SQLite + FreeRDP3 (purego)
183 tests, 76 source files, 9,910 lines of code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 08:19:29 -04:00