Skip to content

Modernize Home screen UI, enhance task features, and improve performance#81

Merged
ohmzi merged 98 commits into
masterfrom
develop
Jun 3, 2026
Merged

Modernize Home screen UI, enhance task features, and improve performance#81
ohmzi merged 98 commits into
masterfrom
develop

Conversation

@ohmzi
Copy link
Copy Markdown
Owner

@ohmzi ohmzi commented Jun 2, 2026

No description provided.

ohmzi and others added 30 commits May 24, 2026 15:41
- Redesign home category tiles with updated gradients, soft radial bloom, and surface lift effects across iOS and Android
- Add a "Today" task preview section to the Android home screen with swipe-to-action support (edit, delete)
- Implement `TodayTaskRow` with task completion toggles and swipe-to-reveal action buttons
- Update `HomeViewModel` to handle task mutations (complete, delete, update) and optimistic UI updates
- Remove category tile watermarks in iOS to match the new minimalist aesthetic
- Refactor `CategoryGrid` into `HomeCategoryPillRow` on Android for better layout control
- Integrate `CreateTaskBottomSheet` for task editing directly from the Home screen preview
- iOS: Conditionally update `HomeSearchBarFrameKey` only when search is expanded to prevent jitter during normal scrolling
- Android: Add a `snapThresholdPx` (88.dp) to the scroll-to-top logic to prevent unwanted snapping when scrolling deep within the home content
- Android: Refine scroll-snapping condition to target only partially visible search bar states
- Remove custom vertical translation and pointer tracking from `TdayPullRefresh` to rely on standard component behavior
- Replace basic scroll snapping with `NestedScrollConnection` in `HomeScreen` to provide elastic resistance when scrolling the title bar
- Implement spring-based snapping for the title bar zone (60% threshold) using `snapshotFlow`
- Reduce elevation levels for category pills and remove radial gradient "soft bloom" effect for a cleaner UI
- Improve snapping reliability by reading item height directly from `LazyListLayoutInfo`
ohmzi and others added 26 commits June 1, 2026 03:56
*   **Android**: Add an internal adaptive car-mode surface at `tday://car` using Jetpack Compose, featuring mode switching between Today and Floater tasks and voice-to-text task creation.
*   **iOS**: Implement CarPlay support using `CPTemplateApplicationScene` and `CPListTemplate`, including App Intents for Siri-integrated voice task creation.
*   **Core**: Introduce shared UI models and state builders for car-specific views, focusing on task visibility and completion while driving.
*   **Telemetry**: Add event tracking for car surface access, mode switching, and voice creation results across both platforms.
*   **Documentation**: Update architecture, product direction, and testing docs to include car surface constraints and verification strategies.
*   **Testing**: Add unit tests for state mapping, voice creation payloads, and empty state logic for both platforms.
Update the `EmptyTaskWatermark` to dynamically change its icon based on the time of day, switching between sun and moon icons to reflect daytime or nighttime.

- **Android (Compose)**:
    - Utilize `rememberIsDaytime()` to toggle the `EmptyTaskWatermark` icon between `Icons.Rounded.WbSunny` and `Icons.Rounded.NightsStay`.
- **iOS (SwiftUI)**:
    - Wrap the watermark in a `TimelineView` to periodically update the UI.
    - Implement logic to switch the system icon between `sun.max.fill` and `moon.stars.fill` based on the current time provided by the timeline context.
* Add an 8-second window to skip redundant network syncs when local state is up-to-date.
* Introduce `TodoDashboardCacheSnapshot` and `TodoListCacheSnapshot` to encapsulate data mapping from the offline cache.
* Refactor `HomeViewModel` and `TodoListViewModel` to hydrate UI state from repository snapshots.
* Improve `PullToRefresh` stability by managing refresh tasks and handling view disappearance.
* Implement `AppBottomSheet`, `TaskFormSheet`, and `ListFormSheet` to standardize mobile interactions.
* Add appearance settings to allow manual and system theme selection.
* Redesign the mobile home dashboard with updated tiles, colors, and layout.
* Optimize mobile inputs and viewport settings to improve usability and prevent auto-zoom.
* Update `Modal` and `Dialog` components with refined animations.
* Refactor task and list creation flows to utilize the new sheet-based components.
…ottom sheet, replacing the dedicated `/app/add-task` route. Update the floating action button to trigger the global sheet and implement list deletion functionality within the `ListFormSheet` component. Re-route home dashboard links to a new `/app/today` path.
@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented Jun 2, 2026

DeepSource Code Review

We reviewed changes in 7c5ea3b...05d85dd on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Jun 3, 2026 2:53a.m. Review ↗
Kotlin Jun 3, 2026 2:53a.m. Review ↗
Secrets Jun 3, 2026 2:53a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@@ -115,7 +122,13 @@ private const val SETTINGS_VERTICAL_FRACTION = 0.22f
fun TdayApp(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

`TdayApp` has a cyclomatic complexity of 48 with "Very High" risk


Cyclomatic complexity is a software metric that measures the number of
independent paths through a function. A function with high cyclomatic
complexity can be hard to understand and maintain. A higher cyclomatic
complexity indicates that the function has more decision points and is more complex.

arguments = listOf(
navArgument("target") {
type = NavType.StringType
defaultValue = "today"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple occurrences of the same string literal within a single file detected. Prefer extracting the string literal into a property or constant.


Avoiding repeated string literals in the same scope is considered good practice in Kotlin. By using shared constants/variables, one improves code maintainability, readability, consistency, and support for localization efforts. Repeated string literals can make code harder to understand, update, and translate. Using shared constants or variables promotes code consistency and potential performance optimizations.

}

internal fun extractApiErrorMessage(response: Response<*>, fallback: String): String {
return extractApiErrorDetails(response, fallback).message
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Functions with exact one statement, the return statement, can be rewritten with ExpressionBodySyntax.


Functions which only contain a return statement can be collapsed to an expression body. This shortens the code and makes it more readable.

): SystemCredential? {
val activity = context.findActivity() ?: return null
credentialBreadcrumb(
operation = "credential.request",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple occurrences of the same string literal within a single file detected. Prefer extracting the string literal into a property or constant.


Avoiding repeated string literals in the same scope is considered good practice in Kotlin. By using shared constants/variables, one improves code maintainability, readability, consistency, and support for localization efforts. Repeated string literals can make code harder to understand, update, and translate. Using shared constants or variables promotes code consistency and potential performance optimizations.

val activity = context.findActivity() ?: return null
credentialBreadcrumb(
operation = "credential.request",
kind = "login",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple occurrences of the same string literal within a single file detected. Prefer extracting the string literal into a property or constant.


Avoiding repeated string literals in the same scope is considered good practice in Kotlin. By using shared constants/variables, one improves code maintainability, readability, consistency, and support for localization efforts. Repeated string literals can make code harder to understand, update, and translate. Using shared constants or variables promotes code consistency and potential performance optimizations.


override suspend fun requestSavedServerUrl(context: Context): String? {
val activity = context.findActivity() ?: return null
credentialBreadcrumb("credential.request", "server_url", "start")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple occurrences of the same string literal within a single file detected. Prefer extracting the string literal into a property or constant.


Avoiding repeated string literals in the same scope is considered good practice in Kotlin. By using shared constants/variables, one improves code maintainability, readability, consistency, and support for localization efforts. Repeated string literals can make code harder to understand, update, and translate. Using shared constants or variables promotes code consistency and potential performance optimizations.


override suspend fun clearCredentialState() {
try {
credentialBreadcrumb("credential.clear", "session", "start")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple occurrences of the same string literal within a single file detected. Prefer extracting the string literal into a property or constant.


Avoiding repeated string literals in the same scope is considered good practice in Kotlin. By using shared constants/variables, one improves code maintainability, readability, consistency, and support for localization efforts. Repeated string literals can make code harder to understand, update, and translate. Using shared constants or variables promotes code consistency and potential performance optimizations.


override suspend fun clearCredentialState() {
try {
credentialBreadcrumb("credential.clear", "session", "start")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple occurrences of the same string literal within a single file detected. Prefer extracting the string literal into a property or constant.


Avoiding repeated string literals in the same scope is considered good practice in Kotlin. By using shared constants/variables, one improves code maintainability, readability, consistency, and support for localization efforts. Repeated string literals can make code harder to understand, update, and translate. Using shared constants or variables promotes code consistency and potential performance optimizations.

) return

Log.d(LOG_TAG, "Received $action — rescheduling task reminders")
TdayTelemetry.addBreadcrumb("reminder.reschedule", data = mapOf("source" to "boot_receiver"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple occurrences of the same string literal within a single file detected. Prefer extracting the string literal into a property or constant.


Avoiding repeated string literals in the same scope is considered good practice in Kotlin. By using shared constants/variables, one improves code maintainability, readability, consistency, and support for localization efforts. Repeated string literals can make code harder to understand, update, and translate. Using shared constants or variables promotes code consistency and potential performance optimizations.

) return

Log.d(LOG_TAG, "Received $action — rescheduling task reminders")
TdayTelemetry.addBreadcrumb("reminder.reschedule", data = mapOf("source" to "boot_receiver"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple occurrences of the same string literal within a single file detected. Prefer extracting the string literal into a property or constant.


Avoiding repeated string literals in the same scope is considered good practice in Kotlin. By using shared constants/variables, one improves code maintainability, readability, consistency, and support for localization efforts. Repeated string literals can make code harder to understand, update, and translate. Using shared constants or variables promotes code consistency and potential performance optimizations.

The "summary returns ai source when model responds" test hardcoded a task
due date of 2026-05-30 and asserted it under mode="today". The summary route
resolves "today" via LocalDate.now(zoneId), so the test only passed on that
calendar day and broke CI once the date passed. Use a task due today (UTC) so
the test is time-independent.

Also adds the patch-todo regression test guarding null-description reschedule.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ohmzi ohmzi merged commit e0c81b8 into master Jun 3, 2026
3 of 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.

1 participant