feat: SG group CRUD, network/subnet CRUD, port listing, LB fix#18
Merged
feat: SG group CRUD, network/subnet CRUD, port listing, LB fix#18
Conversation
…pdate Security Group CRUD: - Create security group (ctrl+n on group level): name + description modal - Delete security group (ctrl+d on group level): confirmation modal - Context-sensitive keybindings: group level = group CRUD, rules = rule CRUD - Backend: CreateSecurityGroup(), DeleteSecurityGroup() Network/Subnet CRUD: - Create network (ctrl+n on network level): name + admin state modal - Delete network (ctrl+d on network level): confirmation modal - Create subnet (ctrl+n in subnet navigation): CIDR, IP version, gateway, DHCP - Delete subnet (ctrl+d in subnet navigation): confirmation modal - Re-added subnet navigation with cursor highlighting - Backend: CreateNetwork(), DeleteNetwork(), CreateSubnet(), DeleteSubnet() Port Listing: - Read-only port display in expanded network view - Shows port name, MAC address, IPs, device owner - Backend: ListPorts() with network ID filter LB name fix: - Name column now uses remaining terminal width instead of fixed 28 chars - Fixed truncate function to properly handle ellipsis PRD update: - Updated backlog as complete, added new features to Phase 3 docs - Updated keybindings tables and project structure
After deleting a security group, the next group at the same index would inherit the expanded state because expansions were tracked by array index. Changed to track by group ID so expansions survive list reordering. Also clamps cursor when the list shrinks.
All form/modal text inputs were intercepting j/k as vim-style up/down navigation because Keys.Up/Down include "k"/"j" bindings. When a text input field has focus, only intercept Tab/ShiftTab/Enter/Esc/ctrl+s for navigation — route all other keys to the text input. Fixed in all 7 form/modal components: - servercreate, volumecreate, keypaircreate (full-view forms) - sgcreate, sgrulecreate, networkcreate, subnetcreate (modal overlays)
Down arrow only entered subnet navigation from the last network because the condition checked cursor < len-1 first (always true except at the end). Reversed priority: check if current network is expanded with subnets first, then fall through to next network. Also switched expanded map from int index to network ID (matching the secgroupview fix) so expansions survive list reordering, and added cursor clamping on data refresh.
When a network is expanded but has no subnets, there was no way to enter subnet navigation to trigger ctrl+n for subnet create. Now ctrl+n creates a subnet when the network is expanded (regardless of whether you're in subnet navigation), and creates a network only when collapsed. Status bar hints update to reflect context.
27 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major feature batch: SG group CRUD, network/subnet CRUD, router tab with interface management, server stop/start/lock/unlock, port listing, LB fix, vim key fix in text inputs.
Server Actions
o): toggle between ACTIVE and SHUTOFF, with bulk supportctrl+l): prevent/allow modifications, with bulk supportRouter Tab (full CRUD)
ctrl+n): Name, external network picker, admin statectrl+d): Confirmation modal, works from list or detailctrl+afrom detail): Subnet picker modalctrl+tfrom detail): Confirmation on selected interfaceListRouters,GetRouter,CreateRouter,DeleteRouter,AddRouterInterface,RemoveRouterInterface,ListRouterInterfacesSecurity Group CRUD
ctrl+non group level): modal with name + description fieldsctrl+don group level): confirmation modalCreateSecurityGroup(),DeleteSecurityGroup()insecgroups.goNetwork/Subnet CRUD
ctrl+non network level): modal with name + admin state (Up/Down) cycle pickerctrl+don network level): confirmation modalctrl+nin subnet navigation): modal with name, CIDR, IP version (4/6), gateway IP, DHCP togglectrl+din subnet navigation): confirmation modalCreateNetwork(),DeleteNetwork(),CreateSubnet(),DeleteSubnet(),SubnetCreateOptsPort Listing (read-only)
ListPorts()with network ID filter in newports.goLB Name Fix
truncate()to properly handle ellipsis (was producing strings longer than intended)Vim j/k Fix
PRD Update
Verification checklist
Security Group Create (
ctrl+non group level)ctrl+nopens "Create Security Group" modalctrl+sor Submit creates the groupesccancels and closes the modalSecurity Group Delete (
ctrl+don group level)ctrl+dopens delete confirmationyconfirms and deletes,n/esccancelsContext-Sensitive Security Group Keybindings
ctrl+n= create group,ctrl+d= delete groupctrl+n= add rule,ctrl+d= delete ruleNetwork Create (
ctrl+non network level)ctrl+nopens "Create Network" modalctrl+sor Submit creates the networkNetwork Delete (
ctrl+don network level)ctrl+don a network opens delete confirmationyconfirms and deletes,n/esccancelsSubnet Navigation
escexits subnet navigation back to networksSubnet Create (
ctrl+nin subnet navigation)ctrl+nopens "Create Subnet in " modalctrl+sor Submit creates the subnetSubnet Delete (
ctrl+din subnet navigation)ctrl+don a subnet opens delete confirmationyconfirms and deletesPort Listing (read-only)
LB Name Column
Help Overlay (
?)General
go build ./...passesgo vet ./...passesgo test ./...passesServer Stop/Start (
okey)o→ confirm "stop" → server goes to SHUTOFFo→ confirm "start" → server goes to ACTIVEo→ stops/starts based on first server statuso stop/startin Server List and Server Detail sectionsServer Lock/Unlock (
ctrl+l)ctrl+l→ confirm "lock" → 🔒 icon appears on next refreshctrl+l→ confirm "unlock" → 🔒 icon disappearsctrl+l→ locks/unlocks based on first serverctrl+l lock/unlockin Server List and Server Detail sectionsRouter List (Routers tab)
Rforce-refreshes the listRouter Detail (
enterfrom router list)escreturns to router listRouter Create (
ctrl+nfrom router list)ctrl+nopens "Create Router" modalctrl+sor Submit creates the routerRouter Delete (
ctrl+d)ctrl+dfrom router list opens delete confirmationctrl+dfrom router detail opens delete confirmationRouter Add Interface (
ctrl+afrom router detail)ctrl+aopens subnet picker modalesccloses picker without addingRouter Remove Interface (
ctrl+tfrom router detail)ctrl+topens remove confirmationyconfirms and removes interfaceVim j/k Fix in Text Inputs
Help Overlay Updates
o stop/startandctrl+l lock/unlock