Skip to content

Conversation

@forketyfork
Copy link
Owner

Summary

  • split app runtime helpers into focused app modules (layout, input, grid nav, worktree, terminal actions)
  • make main.zig a thin entrypoint delegating to app/runtime.zig
  • update architecture docs to reflect new structure

Testing

  • zig build
  • zig build test

@forketyfork forketyfork requested a review from Copilot January 19, 2026 22:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the monolithic main.zig file (1920+ lines) into focused modules within the app/ directory, improving code organization and maintainability. The main runtime logic is preserved but now properly separated by responsibility.

Changes:

  • Split runtime helpers into focused modules: layout, input_text, input_keys, grid_nav, worktree, terminal_actions, and ui_host
  • Transform main.zig into a thin entrypoint that delegates to app/runtime.zig
  • Update architecture documentation to reflect new module structure

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main.zig Simplified to 5-line entrypoint calling app/runtime.zig
src/app/runtime.zig New 1227-line file containing main app lifecycle (extracted from main.zig)
src/app/layout.zig Layout calculations: sizing, scaling, hover detection, terminal resize
src/app/ui_host.zig UI host snapshot and mouse context helpers
src/app/grid_nav.zig Grid navigation logic and notification formatting
src/app/input_keys.zig Keyboard input encoding and modifier detection
src/app/input_text.zig IME and text input handling
src/app/terminal_actions.zig Terminal operations: clipboard, paste, clear
src/app/worktree.zig Git worktree command builders and path escaping
src/shell.zig Comment repositioning for chdir error handling
docs/architecture.md Updated to reflect new app module structure
CLAUDE.md Clarified std.mem.span vs std.mem.sliceTo usage
Files not reviewed (2)
  • .idea/.gitignore: Language not supported
  • .idea/zigbrains.xml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@forketyfork forketyfork merged commit a88b03d into main Jan 19, 2026
4 checks passed
@forketyfork forketyfork deleted the forketyfork/improvements branch January 19, 2026 22:17
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.

2 participants