Skip to content

Fix recently installed card heights - #161

Merged
anod merged 1 commit into
masterfrom
fix/recently-installed-card-height
Aug 24, 2026
Merged

Fix recently installed card heights#161
anod merged 1 commit into
masterfrom
fix/recently-installed-card-height

Conversation

@anod

@anod anod commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • size the recently installed row from its tallest card
  • stretch every card to the shared height without clipping wrapped titles
  • add regression coverage for one-line and two-line app names

Testing

  • .\gradlew.bat :app:testDebugUnitTest --tests "com.anod.appwatcher.watchlist.RecentlyInstalledCardsTest"
  • .\gradlew.bat :app:ktlintCheck

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 80617b50-b658-4957-b490-63650c0a4d47
Copilot AI lite review requested due to automatic review settings August 24, 2026 17:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new regression test is brittle (forced newline and zero-delta float equality) and should be made more robust to avoid missing real wrap regressions and causing flaky failures.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adjusts the “Recently installed” horizontal card row so the row height is driven by the tallest card and all cards stretch to the same height, and it adds a regression test to validate equal-height cards when titles occupy different line counts.

Changes:

  • Update the recently installed row layout to measure height from the tallest card and stretch each card to match (IntrinsicSize.Max + fillMaxHeight()).
  • Pass appIconLoader explicitly into the recently installed item path.
  • Add a Robolectric Compose regression test covering mixed one-line vs two-line titles.
File summaries
File Description
app/src/main/java/com/anod/appwatcher/watchlist/WatchListPage.kt Makes recently installed cards share a common (tallest) height by sizing the row intrinsically and stretching cards to fill it.
app/src/test/java/com/anod/appwatcher/watchlist/RecentlyInstalledCardsTest.kt Adds a Compose UI regression test asserting equal card heights when title heights differ.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +34 to +37
val apps = persistentListOf(
createApp(rowId = 1, packageName = "eden", title = "Eden"),
createApp(rowId = 2, packageName = "adaptive", title = "Simply\nAdaptive App")
)
Comment on lines +66 to +69
assertEquals(2, cardHeights.size)
assertTrue(titleHeights.last() > titleHeights.first())
assertEquals(cardHeights.first(), cardHeights.last(), 0f)
}
@anod
anod merged commit 32f0fa6 into master Aug 24, 2026
5 checks 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.

3 participants