Skip to content

feat: routers tab, server stop/start, lock/unlock, PRD gaps#19

Merged
larkly merged 4 commits intomainfrom
feat/routers-stop-lock
Mar 26, 2026
Merged

feat: routers tab, server stop/start, lock/unlock, PRD gaps#19
larkly merged 4 commits intomainfrom
feat/routers-stop-lock

Conversation

@larkly
Copy link
Copy Markdown
Owner

@larkly larkly commented Mar 26, 2026

Summary

Commits that were pushed after PR #18 was merged. Cherry-picked onto current main.

Server Stop/Start (o key)

  • ACTIVE → stop (SHUTOFF), SHUTOFF → start (ACTIVE)
  • Toggle pattern, bulk support via space-select

Server Lock/Unlock (ctrl+l)

  • Lock prevents modifications, unlock removes protection
  • Auto-detects lock status, bulk support

Router Tab (full CRUD)

  • List: Name, Status, External Gateway, Routes count with sorting and auto-refresh
  • Detail: Properties + navigable interfaces list + static routes
  • Create (ctrl+n): Name, external network picker, admin state
  • Delete (ctrl+d): Confirmation modal
  • Add Interface (ctrl+a from detail): Subnet picker modal
  • Remove Interface (ctrl+t from detail): Confirmation on selected interface
  • Backend: routers.go with full CRUD + interface management

PRD Update

  • Server action gaps roadmap (rename, rebuild, snapshot, rescue, admin actions)

Fix

  • Remove microversion mutation in keypair import (was wiping compute client's 2.100)

Verification

Server Stop/Start

  • ACTIVE server: o → confirm stop → SHUTOFF
  • SHUTOFF server: o → confirm start → ACTIVE
  • Bulk support works
  • Help shows o stop/start

Server Lock/Unlock

  • Unlocked: ctrl+l → confirm lock → 🔒 appears
  • Locked: ctrl+l → confirm unlock → 🔒 gone
  • Bulk support works
  • Help shows ctrl+l lock/unlock

Router List

  • Routers tab appears in tab bar
  • Shows Name, Status, External Gateway, Routes
  • Sorting with s/S
  • Auto-refresh works

Router Detail

  • Enter opens detail with properties
  • Interfaces listed with subnet + IP
  • Static routes shown if any
  • esc returns to list

Router Create

  • ctrl+n opens create modal
  • Name field, external network picker, admin state cycle
  • Submit creates router

Router Delete

  • ctrl+d from list or detail, confirmation modal
  • Delete from detail navigates back to list

Router Interfaces

  • ctrl+a from detail opens subnet picker
  • Selecting subnet adds interface
  • ctrl+t on selected interface removes it (confirmation)

General

  • go build ./... passes
  • go vet ./... passes
  • go test ./... passes

larkly added 4 commits March 26, 2026 03:26
Stop/Start (o key):
  - ACTIVE server → stop (SHUTOFF), SHUTOFF server → start (ACTIVE)
  - Toggle pattern matching pause/unpause and suspend/resume
  - Bulk support via space-select

Lock/Unlock (ctrl+l):
  - Lock prevents modifications, unlock removes protection
  - Auto-detects lock status from server object
  - Locked servers already show 🔒 icon in server list
  - Bulk support via space-select

Both actions work from server list and detail views with
confirmation modals. Help overlay updated.
Router list view:
  - Columns: Name (flex), Status, External Gateway, Routes count
  - Auto-refresh, sorting with s/S
  - Enter opens detail, ctrl+n creates, ctrl+d deletes

Router detail view:
  - Properties: Name, ID, Status, Admin State, External Gateway
  - Interfaces section with navigable list (subnet + IP + port)
  - Static routes section
  - ctrl+a opens subnet picker to add interface
  - ctrl+t removes selected interface (confirmation)
  - ctrl+d deletes router (confirmation)

Router create modal:
  - Name (text), External Network (inline picker from external networks),
    Admin State (cycle Up/Down)
  - Text input guard for vim j/k keys

Subnet picker modal:
  - Lists all subnets with name + CIDR
  - On select, adds as router interface

Backend (network/routers.go):
  - ListRouters, GetRouter, CreateRouter, DeleteRouter
  - AddRouterInterface, RemoveRouterInterface, ListRouterInterfaces
Document missing Nova server actions prioritized by usefulness:
- High-value: rename, rebuild, create snapshot
- Medium: rescue/unrescue, get password
- Admin-only: migrate, evacuate, force delete, reset state, metadata

Cross-referenced from Phase 5 and Phase 6 sections.
ImportKeyPair was setting client.Microversion to "2.2" then resetting
to "" after the call. This wiped the "2.100" microversion set at
connection time, causing subsequent server list requests to fail with
503 because the cloud requires the microversion header.

Since we removed the Type field from CreateOpts (keys are generated
locally now), the microversion override is no longer needed.
@larkly larkly merged commit 6ff0d9a into main Mar 26, 2026
@larkly larkly deleted the feat/routers-stop-lock branch March 26, 2026 02:48
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