Commit Graph
13 Commits
Author SHA1 Message Date
andy ecb46cda6f Fix section headers requiring double-click to toggle
Add cursor: pointer and -webkit-user-select: none to form section
headers so WebKit does not initiate text selection on the first click,
which was swallowing the toggle interaction.
2026-04-15 00:00:00 +01:00
andy 8ca351c4a1 Fix UI visibility, form CSS, and quick-connect modal
- Fix drawer/modal backdrop class names and is-visible transitions
- Add protocol tab, settings tab, and command palette CSS
- Add form-section-content as CSS alias for form-section-body
- Add missing form CSS: form-hint, form-toggle, jump-host-row, preset-row
- Add btn-outline, form-input-sm, form-select-sm styles
- Replace window.prompt() with custom modal for WKWebView compatibility
- Remove diagnostic banner and instrumentation
2026-04-15 00:00:00 +01:00
andy e6bdbef26c Fix JS execution: wrap all scripts in IIFEs to avoid WebKit global scope conflicts
WebKit's WKWebView rejects top-level const/let declarations that shadow
global function names. Since utils.js defines functions like stateLabel()
at the global scope (non-module scripts), and later files destructure
the same names from window.NexusTerminal using const, WebKit throws:
  SyntaxError: Can't create duplicate variable that shadows a global property

Fix: wrap every JS file in an IIFE so all declarations are function-scoped.
Also remove temporary diagnostic instrumentation.
2026-04-15 00:00:00 +01:00
andy f950be0e48 Fix JSDoc type annotations after module conversion
Update @param {import('./app.js').App} references to plain {App}
since ES module imports are no longer used.
2026-04-15 00:00:00 +01:00
andy fca177c384 Convert ES modules to plain scripts using window.NexusTerminal namespace
Replace ES module import/export with a global namespace pattern to avoid
silent failures in the Wails v2 WKWebView which does not reliably support
<script type="module"> tags.

- Remove all import/export statements from JS files
- Register each module's exports on window.NexusTerminal
- Destructure dependencies from window.NexusTerminal at file top
- Load all scripts in dependency order in index.html as plain <script> tags
2026-04-15 00:00:00 +01:00
andy 909657a4b1 Fix frontend: remove Wails script tags, fix API mismatches, fix status bar
- Remove explicit /wails/ipc.js and /wails/runtime.js script tags from
  index.html (Wails v2 auto-injects its runtime, explicit tags cause 404s
  that block window.runtime and window.go from loading)
- Fix SecretStoreStatus() → IsSecretStoreInitialised() + IsSecretStoreUnlocked()
- Fix Connect() → ConnectSession()
- Fix QuickConnect(proto, host, port) → ConnectQuick(profileObject)
- Fix ImportProfilesDialog()/ExportProfilesDialog() → SelectFile/ExportProfiles/SaveFile
- Fix CloseSession() → DisconnectSession()
- Fix TestConnection() → show notification (method doesn't exist in backend)
- Fix SaveCapture() → SaveSessionCapture()
- Fix updateStatusBar() to use existing #status-connection, #status-session-count,
  and #status-vault spans instead of replacing the entire status bar innerHTML
2026-04-15 00:00:00 +01:00
andy 9fda602b82 fix: resolve build — move main.go to root, fix Makefile wails path, update Wails to v2.12.0
- Moved main.go from cmd/app/ to project root (Wails convention)
- Makefile now resolves wails binary via GOPATH/bin fallback
- Updated wails/v2 dependency from v2.9.2 to v2.12.0
- Fixed preferences round-trip bug (store as single JSON blob)
- Fixed import strategy test (needs non-empty profile data)
2026-04-15 00:00:00 +01:00
andy 5bff1d9f3e feat: complete Nexus Terminal — premium SSH/Telnet/RAW TCP desktop client
Production-minded Wails v2 desktop application with:
- Full SSH client (password, key, keyboard-interactive, jump hosts, keepalive)
- Telnet client (RFC 854/855 negotiation, NAWS, TTYPE, encoding)
- RAW TCP client (binary-safe, text/hex/split views, payload presets)
- SQLite storage with migrations and repository abstraction
- Encrypted secret storage (AES-256-GCM + Argon2id) with keychain fallback
- Known hosts verification (strict/ask/accept-new/insecure)
- Session manager with multi-session lifecycle and Wails events
- Dark charcoal Material-inspired design system (CSS custom properties)
- Tabbed session management with rename, reorder, pin, context menu
- Profile editor with protocol-aware form sections
- Command palette, notifications, settings modal
- JSON import/export, audit logging, preferences
- 50+ tests across validation, secrets, storage, encoding, sessions
- Makefile, build.sh, .gitignore, comprehensive README
2026-04-15 00:00:00 +01:00
andy c767c1640e Add missing test coverage and storage methods for Nexus Terminal
- Add TestSecretStoreInitialise, TestEncryptDecrypt, TestEncryptDecryptWrongKey,
  TestEncryptProducesDifferentCiphertexts, TestSetSecretWhenLocked to secrets tests
- Add TestUpdateLastConnected, TestExportProfiles, TestImportProfiles,
  TestImportDuplicateHandling, TestImportInvalidStrategy, TestImportInvalidJSON,
  TestMigrateIdempotent, TestMigrateCreatesTablesForCRUD to storage tests
- Implement UpdateLastConnected, ExportProfiles, ImportProfiles on storage.Store
2026-04-15 00:00:00 +01:00
andy db3f063530 fix: wire up frontend build pipeline for Wails v2
- embed.go: embed index.html + all:src directly instead of all:dist,
  so `go build` works without a prior npm build step
- index.html: add missing xterm.css vendor stylesheet link
- build.js: add buildDist() to assemble dist/ with index.html and the
  full src/ tree; update required-file paths to match dist/ layout
- Add placeholder xterm lib stubs in src/js/lib/ and src/css/lib/ so
  the app can start before `npm install` is run
- .gitignore: stop ignoring the lib placeholder files so they are
  available on a fresh clone
2026-04-15 00:00:00 +01:00
andy bd7cf6cbf9 feat: add session manager and API layer
Add the session manager (internal/sessions/manager.go) that orchestrates
multiple simultaneous SSH, Telnet, and RAW TCP sessions with:
- Protocol-specific connection logic using existing client implementations
- Credential resolution via OS keychain → encrypted vault → user prompt
- Wails runtime event emission for frontend state synchronisation
- Full session lifecycle management (connect, disconnect, reconnect)
- RAW session history and capture support
- Telnet break signal forwarding

Add the Wails-bound API service (internal/api/api.go) exposing:
- Profile CRUD with search, filtering, favourites, and duplication
- Session management (connect, disconnect, resize, write)
- RAW-specific text/hex/escaped write methods
- Secret store initialisation, unlock/lock, and per-profile secrets
- Known host listing and deletion
- Preferences get/save
- Profile import/export with skip/overwrite/duplicate strategies
- Audit log retrieval
- Native file dialog wrappers and app info

Remove conflicting protocol client stubs (client.go) that duplicated
the comprehensive implementations in sshclient.go, telnetclient.go,
and rawclient.go.
2026-04-15 00:00:00 +01:00
andy 61e99e9fca feat(frontend): add complete CSS design system and HTML shell
Create the Nexus Terminal design system with dark charcoal palette,
teal accent, and premium desktop application styling:

- tokens.css: Design tokens (colours, spacing, typography, layout)
- base.css: Modern reset, scrollbar, focus, and utility styles
- components.css: Buttons, forms, badges, dropdowns, notifications,
  disclosure, search, empty state, tooltip, spinner
- layout.css: App grid shell (sidebar, tab bar, workspace, status bar)
- sidebar.css: Connection manager with sections, profile items, search
- tabs.css: Compact session tabs with status dots, protocol badges
- terminal.css: xterm.js container, RAW mode views, send bar, search
- forms.css: Profile editor sections, tag input, jump hosts, validation
- modals.css: Modal, drawer, confirmation, host key, settings dialogs
- index.html: Complete HTML shell with sidebar, tabs, workspace, status
2026-04-15 00:00:00 +01:00
andy 35bc9c75b1 Add Go project scaffold for Wails v2 SSH/Telnet/RAW TCP client
- go.mod with Wails v2.9.2, x/crypto, go-sqlite3, go-keyring, uuid
- cmd/app/main.go: Wails entry point (Nexus Terminal, 1400x900, #1a1a2e)
- internal/app/app.go: lifecycle (Startup/Shutdown/DomReady)
- internal/models/models.go: full model definitions (Profile, SSHConfig,
  TelnetConfig, RAWConfig, SessionInfo, KnownHost, AppPreferences, etc.)
- internal/models/defaults.go: default values and NewProfile factory
- internal/validation/validation.go: thorough field-level validation
- frontend/embed.go: embedded frontend assets
- Updated existing storage, secrets, config to match new model structure
2026-04-15 00:00:00 +01:00