- Updated formatting for better readability, including consistent use of line breaks and indentation.
- Enhanced the clarity of event listener functions in profiles.js.
- Refactored tab management logic in tabs.js for improved maintainability.
- Ensured consistent use of single quotes and double quotes across the files.
- Added aria-label and type attributes to the edit button in the sidebar.
- Implemented a mechanism to prevent multiple edit triggers using requestAnimationFrame.
- Updated mousedown event handling to allow real controls while preventing text selection in WKWebView.
feat: add reconnectSession method to TabManager
- Introduced reconnectSession method to facilitate session reconnections by ID.
feat: implement disconnected overlay in terminal
- Added setDisconnectedOverlay method to show/hide a disconnected overlay for terminal sessions.
- Created _ensureDisconnectOverlay method to manage the overlay's existence and content.
feat: extend Service API with file-related functions
- Added FileExists and FileIsPrivateKey functions to check file existence and identify private keys.
- Introduced ListSSHKeys function to retrieve SSH private key paths from the user's .ssh directory.
- Implemented SFTPStat and SFTPUploadData functions for enhanced SFTP operations.
refactor: clean up code formatting and improve readability
- Adjusted code formatting for better readability across various files, including consistent use of line breaks and indentation.
- Added 📁 folder icon button on SSH tabs to toggle the SFTP file browser
- Button appears on hover/active, styled consistently with the close button
- Removed conflicting Cmd+Shift+F shortcut (clashes with macOS find)
- Added platform-specific window options (Mac, Windows, Linux)
- Added F11 fullscreen toggle and Escape to exit fullscreen
- Cleaned up SFTP panel on session close
New protocol type 'github' for browsing repositories via the GitHub REST API.
Creates a non-terminal panel showing repos grouped by owner/org, sorted by
last commit date (newest first), with search filtering and auto-refresh.
Backend:
- ProtocolGitHub constant and GitHubConfig/GitHubRepo model structs
- New internal/githubclient package (REST API, pagination, token validation)
- Session manager connectGitHub() with periodic refresh goroutine
- API surface: RefreshGitHubRepos() for on-demand refresh
- Token stored via existing credential infrastructure (keychain/vault)
Frontend:
- GitHub tab in profile editor with API URL and token storage fields
- New github.js viewer component (grouped repos, badges, language dots)
- github.css with charcoal-themed repo cards and org headers
- Protocol colour tokens, tab badge, sidebar indicator for GitHub
- Event wiring for session:github:repos and session:github:error
- Cleanup on tab close
Supports GitHub Enterprise via configurable API base URL.
Root cause: The PTY is allocated at 80x24 during the SSH handshake.
The frontend xterm.js fits correctly to the container (e.g. 120x35),
but term.onResize fires before the backend connection is ready, so the
ResizeSession call is silently rejected. When the connection completes,
fitAddon.fit() sees the terminal already has the right cols/rows and
does NOT fire another onResize event. The PTY stays at 80x24.
Fix: On 'session:state → connected', explicitly read the current
terminal cols/rows and send them to the backend via ResizeSession,
bypassing the onResize event dependency.
Also fix empty-state ordering in addTab() — hide the empty-state
BEFORE activating the panel so the panel-container gets the full
workspace height immediately (empty-state has flex:1 and was stealing
half the height during initial layout).
Simplify createTerminal() fit logic — force a synchronous reflow
via offsetHeight access, then fit immediately.
Tab close confirmation:
- Add is-visible to both backdrop AND modal element — the modal CSS
starts with visibility:hidden/opacity:0, so the modal was invisible
despite the backdrop blur appearing
Section headers (sidebar + profile editor):
- Add mousedown preventDefault() on all clickable section headers —
WKWebView initiates a text selection gesture on mousedown for divs,
swallowing the first click and requiring a double-click
- Fix sidebar delete profile to use custom modal instead of blocked
window.confirm()
Credential storage:
- buildSecretCallback now respects profile's secretMode field:
- 'saved': checks keychain/vault first, prompts if missing, then
persists to keychain (preferred) or encrypted vault
- 'session-only': caches in memory per-session, prompts once
- 'ask-every-time': always prompts
- Previously the callback always prompted and never saved
- Change default secretMode from 'ask-every-time' to 'saved' in both
Go defaults and JS frontend defaults
Layout:
- Add panel-container and session-panel CSS so workspace content
doesn't overlap sidebar
- Session panels use position: absolute to fill workspace area
- Workspace is now flex column for proper empty-state/panel stacking
Terminal:
- xterm.js overrides now target .session-panel in addition to
.terminal-container so terminal fills available space
- Added debounced window resize handler for terminal re-fit
Notifications:
- Rewrote Notifications class to emit .notification-* classes matching
the existing polished CSS (was emitting .toast-* with no CSS)
- Icon is now a small coloured circle badge instead of oversized SVG
Sidebar:
- Fixed class mismatches: sidebar-dot → protocol-indicator,
sidebar-item-sub → sidebar-item-host, sidebar-star → sidebar-item-star
- protocolColour() now returns proto-ssh etc. matching CSS selectors
Other:
- Replaced prompt() in tab rename with custom _inputPrompt modal
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.
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