feat: sectioned compact rows on installed apps screen (#463)#484
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughApps list split into two sections: an always-visible "Updates available" rendered with rich cards and a collapsible "Up to date" rendered with compact rows. New composables, state, action, VM handling, and string resources support section headers, compact rows with status dots, and accessibility semantics. ChangesInstalled Apps List Restructuring
Sequence DiagramsequenceDiagram
actor User
participant AppsScreen
participant AppsSectionHeader
participant AppsViewModel
participant AppsState
participant AppsRoot
User->>AppsSectionHeader: Tap "Up to date" header
AppsSectionHeader->>AppsScreen: onToggle()
AppsScreen->>AppsViewModel: onAction(OnToggleUpToDateSection)
AppsViewModel->>AppsState: toggle isUpToDateSectionExpanded
AppsState-->>AppsViewModel: new state emitted
AppsViewModel-->>AppsScreen: state update
AppsScreen->>AppsRoot: recompose with new state
AppsRoot->>AppsRoot: conditionally render CompactAppRow items
AppsRoot-->>User: section expanded/collapsed (animated)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 6/8 reviews remaining, refill in 13 minutes and 13 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/components/AppsSectionHeader.kt`:
- Around line 61-77: The current accessibility label in AppsSectionHeader (the
semantics block that sets contentDescription and stateDescription when
collapsible and clickable) composes English text inline ("$title, $count,
$rowSemantic" and "expanded"/"collapsed"); move these strings into localized
string resources and use formatted resource lookups instead of concatenation so
TalkBack uses localized, reorderable text. Replace the inline contentDescription
and stateDescription with calls that fetch two string resources (one for the
full header label with placeholders for title/count/rowSemantic, and one or two
for the state description or a single state formatted resource taking
isExpanded) and pass those localized strings into the semantics block (where
role = Role.Button and heading() is set) so onToggle/collapsible behavior
remains unchanged but accessibility text is localized.
In
`@feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/components/CompactAppRow.kt`:
- Around line 94-98: The isBusy computation incorrectly treats any
app.isPendingInstall as busy; change it to treat the row as busy only when
pendingInstallFilePath is null (i.e., a true background install), e.g. replace
uses of app.isPendingInstall with (app.isPendingInstall &&
pendingInstallFilePath == null) in the isBusy expression (which also checks
appItem.updateState against UpdateState.Downloading/Installing/CheckingUpdate);
apply the same change to the other isBusy calculations in this component file
(the other two occurrences) so the parked-download "ready to install" CTA and
menu remain enabled.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d349e626-06d3-4af5-9c45-f20701fb4328
📒 Files selected for processing (8)
core/presentation/src/commonMain/composeResources/values/strings.xmlfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsAction.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsState.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsViewModel.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/components/AppsSectionHeader.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/components/CompactAppRow.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/components/StatusDotCluster.kt
Summary
Closes #463. Splits the installed apps list into two sections to reduce vertical footprint without losing update-triage glanceability:
AppItemCardpreserved (icon, name, version delta, Update CTA, in-row controls).AdvancedAppSettingsBottomSheetandVariantPickerDialog.Density target: ~3 apps/viewport → ~9-10 apps/viewport on a Pixel 6-class device.
The "Up to date" section header is collapsible (default expanded, count visible). The "Updates available" header is static so the triage workflow always stays in view.
Accessibility
Modifier.semantics(mergeDescendants = true)with a merged accessible name that surfaces every "hidden" flag (filter active / variant pinned / variant stale / pre-release on / pending install / ready to install).StatusDotClusterencodes each flag with a unique shape AND color (circle / square / triangle / diamond / ring / chevron) — passes WCAG 1.4.1.Role.Button+heading()+stateDescription+ count in name.Adjacent perf fix
AppsViewModel.updateAppProgressno longer callsfilterApps()on every download-progress tick. Download progress doesn't affect sort order or search match, so it now mapsapps+filteredAppsin place. At 50+ installed apps with one downloading, this avoided a full re-sort + immutable-list rebuild on every tick.Out of scope
Test plan
Summary by CodeRabbit
New Features
Accessibility / Localization