Skip to content

AppComposition: all 6 remaining ViewModelFactory entries also appear unused #34

Closed

Description

@wei18

After PR #33 (dropped HomeViewModelFactory), subagent flagged that the 6 OTHER ViewModelFactory entries are also unread by production code outside the AppComposition module:

  • dailyHubViewModelFactory
  • practiceHubViewModelFactory
  • gameViewModelFactory
  • completionViewModelFactory
  • leaderboardViewModelFactory
  • settingsViewModelFactory

Each is plumbed through Live.swift / Preview.swift / AppComposition.swift, but if no consumer reads them, they're dead.

Investigation needed

For each factory, grep for consumers:

rg -n 'dailyHubViewModelFactory\|practiceHubViewModelFactory\|...' Packages/SudokuKit/Sources/

If a factory is genuinely dead (only set, never read by anything outside AppComposition itself), delete it. If it has consumers, leave alone.

Don't bulk-delete — review each individually. Could be that some Views construct their VMs via the factory and others (like HomeView post-#15) bypass it. The pattern should be consistent OR the inconsistency should be intentional.

Risk

Some factories may be wired through View init params and just not exercised because Phase 8 ViewModel-construction patterns evolved mid-phase. Delete carefully.

Discovery

Via PR #33 subagent flag (impl-notes: meetings/2026-05-20_drop-dead-home-vm-factory.impl-notes.md).
EOF

Metadata

Metadata

Assignees

No one assigned

    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