Skip to content

refactor: split app.go into per-screen files#45

Merged
nathanhuh merged 1 commit intomainfrom
feat/refactor-app-split-screens
Mar 26, 2026
Merged

refactor: split app.go into per-screen files#45
nathanhuh merged 1 commit intomainfrom
feat/refactor-app-split-screens

Conversation

@nathanhuh
Copy link
Copy Markdown
Contributor

Summary

Split internal/app/app.go (2,127 lines) into 7 focused files by screen/resource. Pure file split with no logic or interface changes.

File Lines Contents
app.go 563 Model struct, New, Init, Update/View dispatch, service/feature screens
messages.go 76 All Bubbletea message types
styles.go 90 Lipgloss styles, status bar, fitToHeight, loading/error views
screen_ec2.go 183 EC2 instance list, SSM session, filter
screen_vpc.go 302 VPC list, subnet list, subnet detail, IP filter
screen_rds.go 409 RDS list, detail, confirm, actions, polling
screen_route53.go 385 Route53 zone list, record list, record detail
screen_context.go 189 Context picker, switch, SSO login

Related Issues

Closes #44

Validation

  • make build passes
  • make test passes — all existing tests in internal/app pass unchanged
  • No logic changes — code was moved between files in the same package

Checklist

  • Scope is focused
  • Docs updated (if needed)
  • Tests/validation included
  • Breaking changes documented

- Extract message types to messages.go
- Extract styles, status bar, fitToHeight, viewLoading, viewError to styles.go
- Extract EC2/SSM screen logic to screen_ec2.go
- Extract VPC/Subnet screen logic to screen_vpc.go
- Extract RDS screen logic to screen_rds.go
- Extract Route53 screen logic to screen_route53.go
- Extract context picker logic to screen_context.go
- Reduce app.go from 2,127 to 563 lines (core Model, Update, View dispatch)

Pure file split — no logic or interface changes.
@nathanhuh nathanhuh merged commit 66e0181 into main Mar 26, 2026
1 check passed
@nathanhuh nathanhuh deleted the feat/refactor-app-split-screens branch March 26, 2026 08:21
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.

Refactor: split app.go into per-screen files

2 participants