Skip to content

Refactor: split app.go into per-screen files #44

@nathanhuh

Description

@nathanhuh

Problem

internal/app/app.go is 2,127 lines with 80+ fields on Model. Every screen's state, update logic, view rendering, and data loading lives in one file.

Plan

Split by screen/resource into separate files in internal/app/:

New file Contents
screen_ec2.go updateInstanceList, viewInstanceList, loadInstances, startSSMSession, applyFilter, EC2 msgs
screen_vpc.go VPC + Subnet update/view/load methods, applyIPFilter
screen_rds.go RDS update/view/load/poll methods, applyRDSFilter, confirm screen, RDS msgs
screen_route53.go Route53 zone/record update/view/load/filter methods, Route53 msgs
screen_context.go Context picker/add update/view/load/switch methods
messages.go All *Msg structs
styles.go Style vars + renderStatusBar, fitToHeight
app.go (remains) Model struct, New, Init, top-level Update/View dispatch

Pure file split — no interface or logic changes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions