Skip to content

chore(homeview): encapsulate bimodal path via private localPath + computed - #35

Merged
wei18 merged 1 commit into
mainfrom
chore/home-vm-path-bimodal-cleanup
May 20, 2026
Merged

wei18 merged 1 commit into
mainfrom
chore/home-vm-path-bimodal-cleanup

Conversation

@wei18

@wei18 wei18 commented May 20, 2026

Copy link
Copy Markdown
Owner

Cleanup flagged in PR #16: HomeViewModel.path was bimodal. Option Clarify chosen — encapsulate as private localPath + private externalPath: Binding + single public computed path. Zero call-site changes, 363/363 tests.

🤖 Claude Code

…puted (#34 wave)

After PR #16, HomeViewModel.path was bimodal — externalPath via Binding
for prod, local for tests/previews. Option Clarify chosen: private
`localPath` (fallback) + private `externalPath: Binding` (prod) +
single public computed `var path` that routes between them.

Result: API surface unchanged (callers still read/write `path`), but
the bimodality is now encapsulated as private impl detail with clear
names. `select(_:)` collapsed from branching if/else to single
`path.append(mode.appRoute)` (computed setter owns routing).

Files: only HomeViewModel.swift modified. HomeView / RootView / tests /
previews untouched.

Tests 363/363. 0 warnings.

impl-notes: meetings/2026-05-20_home-vm-path-bimodal-cleanup.impl-notes.md
@wei18
wei18 merged commit 9a3b301 into main May 20, 2026
@wei18
wei18 deleted the chore/home-vm-path-bimodal-cleanup branch May 20, 2026 09:03
@github-actions github-actions Bot mentioned this pull request Jul 14, 2026
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