Skip to content

🐙 Implement new CategoryDetails screen#1231

Open
igorescodro wants to merge 30 commits into
mainfrom
feature-category-details
Open

🐙 Implement new CategoryDetails screen#1231
igorescodro wants to merge 30 commits into
mainfrom
feature-category-details

Conversation

@igorescodro
Copy link
Copy Markdown
Owner

@igorescodro igorescodro commented Mar 28, 2026

Summary

  • Adds a new full-screen CategoryDetails view replacing the existing bottom sheet, showing the category header, task progress, and tasks grouped by state (Overdue, Due Today, Upcoming, No Due Date, Completed)
  • Introduces TaskGroup domain model and LoadCategoryTasks use case with local-timezone-aware task classification
  • Implements KuvioCategoryHeader Kuvio design system component and promotes DateTimePicker to designsystem for cross-feature reuse
  • Wires everything end-to-end: Navigation3 destination, Koin DI, ViewModel with cold Flow<CategoryDetailsState>, stateless composables, localization (en/es/fr/pt-rBR), and feature-flagged routing via DesignSystemConfig.isNewDesignEnabled

Changes

Area What changed
domain TaskGroup sealed class, LoadCategoryTasks use case + implementation + unit tests
designsystem KuvioCategoryHeader component, DateTimePicker promoted from features/task
navigation-api CategoryDetails destination, OnCategoryDetailsClick routing event
features/category CategoryDetailsViewModel, CategoryDetailsScreen (Section/Screen/Content), state, mapper, DI wiring
resources 9 localization strings across 4 locales
Tests CategoryDetailsViewModelTest (7 unit), CategoryDetailsScreenTest (3 UI), CategoryFlowTest (3 E2E)

🤖 Generated with Claude Code

@igorescodro igorescodro changed the title feat: add CategoryDetails screen 🐙 Implement new CategoryDetails screen Mar 28, 2026
igorescodro and others added 28 commits March 29, 2026 09:49
Document the CategoryDetails screen specification including UI components,
task grouping behavior, navigation flow, and design assets for the new
full-screen category view replacing the existing bottom sheet.
Document the full UI specification for the CategoryDetails screen, including
layout, component hierarchy, task grouping sections, and interaction patterns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduce a sealed class TaskGroup with five subclasses — Overdue, DueToday,
Upcoming, NoDueDate, and Completed — each holding a List<Task>, to represent
the grouped task sections shown in CategoryDetails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a Flow-based use case that loads tasks for a given category and groups
them into TaskGroup sections (Overdue, DueToday, Upcoming, NoDueDate,
Completed) using the device's local date for classification.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace UTC-based date comparison with the device's local date obtained
directly from dateTimeProvider, ensuring task grouping reflects the user's
local time rather than UTC.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add CategoryDetails serializable destination, OnCategoryDetailsClick routing
event in CategoryEvent, and wire the feature flag check in CategoryNavGraph
so the new screen is reachable only when isNewDesignEnabled is true.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move DateTimePicker from features/task into libraries/designsystem/components
so it can be shared across features without creating inter-feature dependencies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 9 strings for the CategoryDetails screen — progress header, empty state,
options content description, and five section headers — across all four
supported locales: en, es, fr, and pt-rBR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement KuvioCategoryHeader in the Kuvio design system to display a
category name, color, optional emoji, and task progress (total vs completed),
with light and dark preview support.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add CategoryDetailsState sealed class (Loading/Error/Success), CategoryDetailsMapper
for domain-to-view conversion, and fakes for LoadCategoryFake, LoadCategoryTasksFake,
AddTaskFake, and UpdateTaskStatusFake to support ViewModel unit tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement CategoryDetailsViewModel exposing loadContent(categoryId) as a cold
Flow<CategoryDetailsState> via combine(), with addTask and updateTaskStatus
launching fire-and-forget on AppCoroutineScope.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement the three-layer composable structure: CategoryDetailsSection (public,
koinInject), CategoryDetailsScreen (internal, state-driven), and CategoryDetailsContent
(stateless), with extracted CategoryDetailsEmptyState and CategoryDetailsTaskList.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix CategoryDetailsScreen error branch to use KuvioBodyMediumText instead of
the raw Compose Text composable, keeping the screen consistent with Kuvio
design system conventions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add CategoryDetails entry to CategoryNavGraph using Navigation3's entry<> DSL,
branching on DesignSystemConfig.isNewDesignEnabled to keep the legacy flow
intact while the new screen rolls out.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add three Compose UI tests verifying the empty state, task group display, and
section header rendering in CategoryDetailsContent using AlkaaTest and
runComposeUiTest.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add three end-to-end tests in the shared module covering navigation to
CategoryDetails, task display, and task completion flow using full Koin+Compose
setup with DAO-based data seeding.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Auto-format all CategoryDetails source files to comply with project ktlint
rules after the feature implementation was complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix detekt findings across CategoryDetails files: UnnamedParameterUse in tests,
deprecated LocalDate constructor, ElseCaseInsteadOfExhaustiveWhen, LongMethod,
and BooleanPropertyNaming for isNewDesignEnabled.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added `2026-03-27-category-details.md` to outline the step-by-step
implementation for the new full-screen Category Details screen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Split Section into Section+Loader (koinInject isolated), wrap content in
Scaffold with AlkaaToolbar, remove onBackClick from CategoryDetailsContent,
add uiToolingPreview dependency, and add light/dark Compose previews.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract Success state fields into a dedicated @immutable data class.
CategoryDetailsState sealed class remains first in the file.
Wrap the five success fields into CategoryDetailsData inside toViewState.
Remove AppCoroutineScope constructor param; use viewModelScope.launch
for addTask and updateTaskStatus fire-and-forget operations.
…hape

Remove appScope; access task counts via state.data; drop AppCoroutineScope import.
Update CategoryDetailsScreen to access state fields via state.data.
Hardcode isSinglePane = true in AlkaaToolbar call since the screen is always single-pane.
Add TODO for unimplemented options menu. Update composables to use CategoryDetailsData.
CategoryDetailsSection no longer accepts isSinglePane; remove the now-invalid argument.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace inline fully-qualified kotlinx.datetime.LocalDate with a proper import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove private CategoryIconBox wrapper and call KuvioEmojiIcon directly.
Extract repeated composable setup into a private ComposeUiTest extension function.
Add one test for each TaskGroup variant: Overdue, DueToday, Upcoming, NoDueDate, Completed.
@igorescodro igorescodro force-pushed the feature-category-details branch from 969dfa4 to 84718bb Compare March 29, 2026 14:33
Updated `KuvioCategoryHeader` to replace the standard Material `Icon`
with the custom `KuvioMoreIcon` component.
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