Commit Graph

14 Commits

Author SHA1 Message Date
swanadiva 38c2c6e671 fix: handle null hostOptions when no active hosts exist 2026-07-09 19:41:59 +07:00
swanadiva d5406eab6c fix: terminal WebSocket connection — manage xterm containers in JS
- Remove Alpine x-for template for xterm containers (async rendering bug)
- Add static #xterm-wrapper div, JS creates/removes container elements directly
- addTab() uses document.createElement + appendChild for instant DOM
- switchTab() toggles display:block/none, closeTab() removes from DOM
- Add console.log for WebSocket open/close/error debugging
- Terminal now connects on page load
2026-07-09 19:28:15 +07:00
swanadiva 71864336f6 fix: terminal WebSocket connection timing + better mock fallback
- Fix xterm.js container not found: use requestAnimationFrame retry loop
  instead of single $nextTick (Alpine x-for renders asynchronously)
- Better mock fallback: use host name+IP instead of raw UUID
- Add logging for WebSocket connection path (found/not-found/hostname)
2026-07-09 18:40:35 +07:00
swanadiva ef4e44984b feat: upgrade terminal to xterm.js + WebSocket
- Rewrite terminal.js: xterm.js Terminal per tab, WebSocket per connection
- Light theme terminal (Lumina: white bg, blue cursor, proper ANSI colors)
- Alpine.js keeps tab management, xterm.js handles rendering
- Each tab gets its own WebSocket to /terminal/ws/:hostID
- Mock handler iterates chars (fixes multi-char xterm.js messages)
- Sync mock commands with React template (help, ls, docker ps, etc.)
- Add xterm.css custom scrollbar styles
- terminal_content.html: xterm containers with Alpine show/hide per tab
2026-07-09 18:32:33 +07:00
swanadiva 7accb86203 feat: add transfer panel to dashboard + remove PERBAIKANUI.md
- Add Background Transfers section with mock download/upload rows
- Progress bars with green glow shadow, source/destination layout
- Empty state when no transfers active
- Delete PERBAIKANUI.md (all UI tasks complete)
2026-07-09 18:27:47 +07:00
swanadiva 301115b74d feat: Host CRUD complete — edit, full form fields, connect, toast
- Add UpdateHost handler + PUT /hosts/:id route
- CreateHost now accepts all fields (port, username, auth, notes)
- host_modal.html: full form with port, username, auth type toggle, edit mode
- host_list.html: edit button dispatches edit-host event with host data
- Connect button links to /terminal?host={id} for pre-selection
- Terminal page reads selected host from query param
- Toast notification system via Alpine.js events
- Add default template function for fallback values
2026-07-07 15:51:57 +07:00
swanadiva e70b133073 fix: add missing _content partial templates for HTMX nav (terminal, sftp, settings, brief)
- Create terminal_content.html, sftp_content.html, settings_content.html, brief_content.html
- Update full page templates to use partial templates via {{template}}
- Handlers already rendered these templates on HX-Request, but files were missing → 500
- All pages now return 200 for both full page and HTMX nav requests
2026-07-07 15:36:12 +07:00
swanadiva 8357d9d76e fix: UI overhaul — align all HTMX views with Lumina Design System (46 fixes)
- All 7 pages rewritten: Dashboard, Terminal, Snippets, Keychain, SFTP, Settings, Brief
- Apply consistent Lumina glassmorphic theme (rounded-2xl, shadows, borders, tracking)
- Fix SVG icons not rendering — return template.HTML instead of string
- Fix Alpine x-data scoping: terminal tabs, SFTP modals, snippet tag buttons
- Fix dashboard search sending literal ?q=...
- Rebuild CSS with all new Tailwind classes (62KB)
- Add .air.toml with hot-reload config, docs/PERBAIKANUI.md checklist
- Remove unused backup partials
2026-07-07 14:55:42 +07:00
swanadiva fd7361aa14 Sprint 6: JSON file persistence + real SSH terminal + V1 crypto/knownhosts integration
- go.mod replace directive for git.tukangketik.id/swanadiva/hostkeeper → ../../v1
- store/ package: JSON file persistence for hosts, snippets, keys, settings
  (~/Library/Application Support/hostkeeper/v2/)
- model SSH fields: Hostname, Port, Username, AuthType, Password, KeyID
- sshconn/ package: real SSH client via golang.org/x/crypto/ssh
- Terminal WS: real SSH connection with fallback to mock shell
- Dynamic host list in terminal (server-rendered JSON script tag)
- All mock data defaults removed from model packages
- Settings persist via store/settings.go
2026-07-07 13:53:50 +07:00
swanadiva 04d9cfb096 feat: Sprint 5 — xterm.js terminal with WebSocket mock shell, Alpine tab management 2026-07-07 13:39:35 +07:00
swanadiva c5ac07e27f feat: Sprint 3 — settings page with tabs/toggles/devices/danger-zone, brief page 2026-07-07 13:31:13 +07:00
swanadiva c4b0d7d8c0 feat: Sprint 2 — snippets + keychain CRUD, standalone templates, clipboard/utils JS 2026-07-07 13:26:56 +07:00
swanadiva 86620b034f feat: Sprint 1 final — delete host, Alpine modal events, grid/list toggle, transfers panel 2026-07-07 13:17:31 +07:00
swanadiva 43a19b723a feat: Sprint 0 — GoFiber + HTMX + TailwindCSS v4 scaffolding
- Go module: git.tukangketik.id/swanadiva/hostkeeper/v2
- GoFiber v2 server with static, template engine, middleware
- HTMX + Alpine.js (downloaded from CDN)
- TailwindCSS v4 with custom theme (Lumina System colors)
- Custom CSS: dot-grid, glassmorphism, animations, toggle, modal
- Layout template (sidebar nav + header + main)
- Dashboard page with host list, search, filter, view toggle
- Health endpoint: GET /api/health
2026-07-07 12:18:39 +07:00