Skip to content

refactor(ios): remove Chau7Core code that no iOS target reaches - #277

Merged
schiste merged 1 commit into
mainfrom
agent/remove-chau7core-code-the-ios-app-no-lon
Oct 23, 2026
Merged

schiste merged 1 commit into
mainfrom
agent/remove-chau7core-code-the-ios-app-no-lon

Conversation

@schiste

@schiste schiste commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Removes the parts of Chau7Core that no iOS target reaches. They are leftovers from the deleted Swift macOS app, which the package README already acknowledged. This PR only deletes code.

Changes

  • Deletes 204 source files (about 24,000 lines): the Metal renderer policies, MCP, hang monitoring, skills, telemetry parsers, tab layout, restore and subprocess helpers. The package goes from 34k to 10k source lines.
  • Deletes the 193 test files that covered only those sources, plus the notification replay fixture and the test target's resources entry.
  • Rewrites the package README to describe what remains.

How reachability was decided: I started from every top-level declaration referenced by Chau7RemoteApp, Chau7RemoteWidget or Chau7RemoteAppTests, took the transitive closure over identifiers, and then checked it with the compiler. The compiler caught three files that the analysis missed because they only add Data extensions: DataLittleEndian, FrameParser and RemoteGridSnapshotCache. They are kept.

Risks

  • The diff is large (397 files) but is pure deletion apart from the README and one line in Package.swift.
  • Anyone using the deleted Swift as a reference while porting to chau7-next can still find it in git history at c6773aa4.

Test plan

  • swift test --package-path apps/chau7-ios/Chau7Core: 773 tests, 0 failures. Before: 2383 tests, about 2 minutes; most of the difference is the deleted suites.
  • swiftformat --lint and swiftlint --strict: clean.
  • xcodebuild build-for-testing plus test-without-building, Chau7RemoteApp scheme, iPhone 17 Pro simulator: 125 tests, 0 failures, the same as main.

🤖 Generated with Claude Code

Problem:
Chau7Core still carried the shared core of the removed Swift macOS app.
About 24,000 of its 34,000 source lines (204 files: Metal renderer
policies, MCP, hang monitoring, skills, telemetry parsers, tab layout,
session restore, subprocess helpers) were unreachable from the iOS app,
its widget and its tests. That code still had to be compiled, linted and
tested, and its 2383-test suite took about two minutes.

Decision:
Delete every source file that is not transitively reachable from
Chau7RemoteApp, Chau7RemoteWidget or Chau7RemoteAppTests, and every test
file that references a symbol only those files declared. Also drop the
notification replay fixture, whose only test went with them, and the
test target's resources entry. Rewrite the package README so it describes
what remains.

Rationale:
Reachability was computed from top-level declarations and identifier
references, then corrected with the compiler. DataLittleEndian,
FrameParser and RemoteGridSnapshotCache were restored because live code
calls their Data extensions. Shrinking the package makes core-only builds
and CI runs much faster, and stops reviewers from maintaining logic
nothing ships.

Validation:
swift test --package-path apps/chau7-ios/Chau7Core: 773 tests, 0
failures. swiftformat --lint and swiftlint --strict are clean. xcodebuild
build-for-testing plus test-without-building of the Chau7RemoteApp
scheme on the iPhone 17 Pro simulator: 125 tests, 0 failures, the same
as the baseline on origin/main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schiste
schiste marked this pull request as ready for review October 23, 2026 15:42
@schiste
schiste merged commit 6c0b345 into main Oct 23, 2026
1 check passed
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.

1 participant