summaryrefslogtreecommitdiff
path: root/codex-fix-refs-type-conflict.md
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-02 23:21:53 -0500
committerChristian Cleberg <[email protected]>2026-04-02 23:21:53 -0500
commit18a9f62c9acadced60657addb61c2d4d8c1aab17 (patch)
treeb7807d3ecd4ed8481a9fc8de4c36b2e4a168a329 /codex-fix-refs-type-conflict.md
parent7b4a9fd51cfaf22114daa0170675102d04625791 (diff)
downloadhutch-2.9.1.tar.gz
hutch-2.9.1.tar.bz2
hutch-2.9.1.zip
fix: remove stray filesv2.9.1
Diffstat (limited to 'codex-fix-refs-type-conflict.md')
-rw-r--r--codex-fix-refs-type-conflict.md89
1 files changed, 0 insertions, 89 deletions
diff --git a/codex-fix-refs-type-conflict.md b/codex-fix-refs-type-conflict.md
deleted file mode 100644
index 4ff2eec..0000000
--- a/codex-fix-refs-type-conflict.md
+++ /dev/null
@@ -1,89 +0,0 @@
-# Fix: Conflicting `[Reference]` vs `[ReferenceDetail]` in RepositorySettingsView
-
-## Background
-
-`RepositoryDetailViewModel.branches` was recently changed from `[Reference]` to
-`[ReferenceDetail]` to support displaying commit dates in the Refs tab.
-`ReferenceDetail` has the same `name: String` and `target: String?` fields as
-`Reference`, plus an additional `date: Date?`.
-
-`RepositorySettingsView` and `RepositorySettingsViewModel` still declare their
-`branches` parameter as `[Reference]`, causing this compiler error:
-
-```
-RepositoryDetailView.swift:56:51
-Conflicting arguments to generic parameter 'T' ('[ReferenceDetail]' vs. '[Reference]')
-```
-
-The settings view model only uses `branches` for the HEAD branch picker
-(`selectedHeadReferenceForSave()` accesses `$0.name`). No mapping back to
-`Reference` is needed — just update the type throughout the settings layer.
-
----
-
-## Changes Required
-
-### 1. `Hutch/Views/Repositories/RepositorySettingsViewModel.swift`
-
-**Change the stored property type:**
-
-Find:
-```swift
-var branches: [Reference]
-```
-
-Replace with:
-```swift
-var branches: [ReferenceDetail]
-```
-
-**Change the `init` parameter type:**
-
-Find:
-```swift
-init(
- repository: RepositorySummary,
- branches: [Reference],
- client: SRHTClient
-) {
-```
-
-Replace with:
-```swift
-init(
- repository: RepositorySummary,
- branches: [ReferenceDetail],
- client: SRHTClient
-) {
-```
-
-### 2. `Hutch/Views/Repositories/RepositorySettingsView.swift`
-
-**Change the stored property type:**
-
-Find:
-```swift
-let branches: [Reference]
-```
-
-Replace with:
-```swift
-let branches: [ReferenceDetail]
-```
-
----
-
-## No Other Changes
-
-- Do not modify `Reference` or `ReferenceDetail` in `Git.swift`.
-- Do not modify `RepositoryDetailView.swift` — the call site is already correct.
-- Do not modify `ReferencesListView.swift` or `RepositoryDetailViewModel.swift`.
-- `selectedHeadReferenceForSave()` in the settings view model accesses only
- `$0.name` on each branch, which exists on `ReferenceDetail` — no logic
- changes are needed.
-
-## Verification
-
-Build the project. The compiler error at `RepositoryDetailView.swift:56` should
-be gone. Confirm the repository settings sheet still opens and the HEAD branch
-picker populates correctly.