Skip to content

Multi-device grid and paging (Phase 2) - #2

Merged
RileyBeenders merged 5 commits into
mainfrom
phase-2-grid
Oct 18, 2026
Merged

RileyBeenders merged 5 commits into
mainfrom
phase-2-grid

Conversation

@RileyBeenders

Copy link
Copy Markdown
Owner

Stacked PR 2 of 5. Based on phase-0-scaffold (#1). Merge #1 first; this PR's base then moves to main.

What

Phase 2 of the project plan: many devices at once.

  • Grid of live terminal tiles for open devices, ordered by device number. A tile stays after its device disconnects until you close it.
  • Paging: a "devices per page" setting (1–36, default 6). The pager has numbered pages, and Ctrl+PageUp/PageDown work even from inside a terminal without reaching the device. Clicking a device row jumps to its tile.
  • Connect all / Disconnect all. Password prompts are queued, and one password can be reused for the other waiting devices.
  • Settings dialog with settings.json persistence.
  • Host-key dialogs are queued in the main process, so a bulk connect never stacks them.

For reviewers

  • The grid shape comes from min(pageSize, open devices), so every page has the same tile size and switching pages never resizes terminals.
  • xterm instances live outside React (terminals.ts); tiles only attach and detach their DOM nodes. That's why switching pages keeps scrollback.

Testing

  • npm test: 48 tests, adding grid shape, page clamping and settings validation.
  • In the built app with 10 dev SSH servers at 4 per page (3 pages): one password connected all 10 in under 1 s. Each tile answered hostname with its own device's name. Page switches took 8–38 ms. Ctrl+PageUp/Down didn't reach the device, and closing a tile reflowed the grid.

🤖 Generated with Claude Code

- Electron + React + TypeScript app built with electron-vite
- Secure window: context isolation, sandbox, no Node in renderer, CSP
- Preload bridge exposed as window.bulkssh (app version over IPC)
- Placeholder layout: device list, grid area, broadcast bar
- Shared paging helpers (default 6 devices per page) with Vitest tests
- electron-builder config for Windows NSIS installer and portable exe
- .gitignore keeps device lists, settings and SSH keys out of git
- Project plan in .projectPlan/PLAN.md, CLAUDE.md, project skills
- .claude/launch.json: single "dev" config running npm run dev on port 5173
- Pin the electron-vite renderer dev server to 5173 with strictPort
- Make window.bulkssh optional so the renderer loads in a plain browser
- Document the preview setup in CLAUDE.md
- Transport interface with an ssh2-based SshTransport (password,
  keyboard-interactive and private key auth, encrypted key passphrases)
- Session manager: one session per device, readable connection errors,
  re-prompts on wrong password or passphrase
- Host key trust-on-first-use: native dialog for unknown and changed keys,
  trusted keys stored in known_hosts.json
- Device store (devices.json in userData) with shared validation; secrets
  are never written to disk
- IPC handlers validate every argument and reject unknown senders
- Renderer: device list, add/edit form, password prompt, xterm.js terminal
  with fit-to-size and resize forwarding
- npm run dev:ssh: local SSH server with a fake shell for manual testing
- Tests: device validation, stores, and session manager against an
  in-process ssh2 server (34 tests)
- Update CLAUDE.md and the project plan
Runs npm ci --ignore-scripts, typecheck and Vitest on windows-latest (Node 24) for pull requests and pushes to main.
- Paged grid of live terminal tiles for open devices, ordered by device
  number; tiles stay after a disconnect until closed
- Grid shape from min(page size, open devices) so every page has the same
  tile size and page switches never resize terminals
- Pager with numbered pages, Ctrl+PageUp/PageDown (kept from reaching the
  device), and clicking a device row jumps to its tile
- Connect all / Disconnect all; password prompts are queued, with an
  option to reuse one password for the other waiting devices
- Settings dialog and settings.json for devices per page (1-36, default 6)
- Host-key dialogs queued in the main process so bulk connects never
  stack them
- Tests for grid shape, page clamping and settings (48 total)
- Update CLAUDE.md and the project plan
@RileyBeenders
RileyBeenders changed the base branch from phase-0-scaffold to main October 18, 2026 01:55
@RileyBeenders
RileyBeenders merged commit 3f87f9d into main Oct 18, 2026
1 check passed
@RileyBeenders
RileyBeenders deleted the phase-2-grid branch October 18, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant