Interleave casks and formulae in Installed and Upgrades lists - #108
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the Installed and Upgrades package lists by removing the separate Formulae/Casks sections and rendering a single, name-ordered list interleaving both kinds, relying on the per-row kind badge for distinction.
Changes:
- Collapse Installed/Upgrades list rendering from two sections into a single
ForEachover an interleaved package array. - Update Installed/Upgrades view models to treat the rendered row order as the single
packageslist (including search filtering and default selection behavior). - Update tests to reflect the new single-list/selection behavior and remove section-visibility assertions.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/BrewFeatureInstalledTests/UpgradesViewModelTests.swift | Updates default-selection expectations to follow interleaved row order. |
| Tests/BrewFeatureInstalledTests/InstalledViewModelTests.swift | Renames/adjusts test wording to reflect a single interleaved list. |
| Tests/BrewFeatureInstalledTests/InstalledViewModelPresentationTests.swift | Removes section-visibility tests and adds a single-list assertion for loaded content. |
| Sources/BrewFeatureInstalled/Views/UpgradesPackagesView.swift | Replaces Formulae/Casks sections with a single ForEach over content.packages. |
| Sources/BrewFeatureInstalled/Views/InstalledPackagesView.swift | Replaces Formulae/Casks sections with a single ForEach over content.packages. |
| Sources/BrewFeatureInstalled/ViewModels/UpgradesViewModel.swift | Updates row-order/selection + search filtering to operate on the single ordered package list. |
| Sources/BrewFeatureInstalled/ViewModels/InstalledViewModel.swift | Removes section-visibility helpers and updates ordered IDs + search filtering for the single list. |
| Sources/BrewFeatureInstalled/ViewModels/InstalledPackagesContent+Placeholdable.swift | Updates placeholder documentation to reflect the new single-list presentation. |
馃挕 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
approved these changes
Aug 2, 2026
Render each package list as a single list ordered by name across both kinds, instead of splitting formulae and casks into separate sections. The per-row FORMULA/CASK badge keeps the two distinguishable. Drops shouldShowFormulaeSection/shouldShowCasksSection from InstalledPackagesContent, collapses the two-section List and the formulae-then-casks search filter in both view models to a single ordered pass, and removes the now-unused InstalledSectionHeader. Default and keyboard selection now follow the interleaved order, so the first row wins regardless of kind. Tests updated accordingly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
graeme
force-pushed
the
interleave-casks-and-formulae
branch
from
August 2, 2026 23:10
c5db659 to
6a06e90
Compare
graeme
marked this pull request as ready for review
August 3, 2026 08:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Interleave casks and formulae in Installed and Upgrades lists
Summary
The Installed and Upgrades package lists previously split formulae and casks into two separate sections. This PR renders each as a single list ordered by name across both kinds. The per-row FORMULA/CASK badge already tells the two apart, so the section split was redundant, and removing it deletes noticeably more code than it adds.
Changes
Why this split
Discover was originally part of this work but has been intentionally left out. Its Trending list is fed by two independent analytics calls (top formulae and top casks) whose rankings are not comparable, so interleaving there is misleading. This PR is scoped to the two lists where a single name-ordered list is clearly correct.
Testing
PR checklist