~ knotless Search/
↑↓ move↵ open⇧↵ all results

geesawra.industries/old-fella

Old people's social media app

0
1

refactor: split and simplify the application code

Closed
Closed geesawra.industries opened this issue 1 comment
priority/high

Sources/Oldsky/OldskyApp.swift contains more than 3,600 lines. It combines app setup, navigation, notifications, settings, the feed, post views, media, threads, and composition. This makes the code difficult to read and change.

Split the application into smaller files around responsibilities that already exist. Start with OldskyApp.swift. Review BlueskyService.swift and AppModel.swift as well, and split or simplify them where that makes their responsibilities easier to understand.

Keep related code together and give files names that describe their contents. Remove duplication where a shared implementation makes the code easier to follow. Keep SwiftUI presentation separate from Bluesky network and session work. Do not add frameworks or layers without a demonstrated need.

Preserve existing behavior, accessibility, media and link handling, and the current product scope. Make changes in small steps that can be reviewed and tested. Preserve unrelated work in the working tree.

Run the existing build, unit tests, and UI tests from the terminal. Add focused tests where a change exposes a gap. Record any checks that cannot run and the reason.

Implemented in commit ecb68d5 (refactor: organize app sources by feature and responsibility).