Repository navigation
fix(app): restore Home and Tasks empty states after loading - #20047
Git-on-my-level merged 6 commits into
Conversation
|
@codex review |
|
@cubic-dev-ai review |
@Itaxh1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
4 issues found across 109 files
Confidence score: 4/5
- In
app/lib/pages/action_items/action_items_page.dart, removingApiViewPhase.emptyfromshowTypedStatusmakesActionItemsApiStatus’s empty branch unreachable, so empty tasks use the list fallback instead; keep the empty phase routed through the intended status handling or confirm the fallback is equivalent. - In
app/test/widgets/tasks_empty_state_test.dart, the test does not verify that only the active tab’s text is announced, so an accessibility regression could go undetected; assert the expected semantics for each tab. - In the 15 translated ARBs, including
app/lib/l10n/app_be.arb,@tasksEmptyStateMessagestill describes the old empty-state instruction, which could mislead translators; update the metadata to match the current message. - In
app/changelog/unreleased/20260930-home-empty-conversations.json, the fragment emphasizes implementation and test details rather than the user-visible benefit; describe the icons and guidance shown on empty Home and Tasks.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/changelog/unreleased/20260930-home-empty-conversations.json">
<violation number="1" location="app/changelog/unreleased/20260930-home-empty-conversations.json:2">
P3: Rewrite this fragment around the user-visible benefit instead of implementation and test-detail wording: say that empty Home and Tasks now show their icons and guidance, and that Tasks explains how to create tasks from conversations.</violation>
</file>
<file name="app/test/widgets/tasks_empty_state_test.dart">
<violation number="1" location="app/test/widgets/tasks_empty_state_test.dart:48">
P3: This test never verifies the PR's stated "only the active tab's text is announced" behavior. Because OmiEmptyState renders the layout references (`noConversationsYet`, `noConversationsHeroMessage`) as sibling Texts inside an `IndexedStack` (all children are built and laid out), `find.text`/`getRect`/`findsOneWidget` see the hidden reference texts too, so these assertions cannot detect a regression where the inactive tab's guidance is painted or announced. Enable semantics and assert the tasks empty node exposes only the active labels.</violation>
</file>
<file name="app/lib/pages/action_items/action_items_page.dart">
<violation number="1" location="app/lib/pages/action_items/action_items_page.dart:441">
P3: Removing `ApiViewPhase.empty` from `showTypedStatus` makes `ActionItemsApiStatus`'s empty branch unreachable from the page: every non-error phase now falls to `_buildEmptyTasksList`, which owns the `ValueKey('omi.action_items.empty')` key via its `KeyedSubtree`. `ActionItemsApiStatus` (app/lib/backend/http/action_items_api_contract.dart) still renders a stale empty phase — white "No Tasks Yet" text and the same `'omi.action_items.empty'` key — now exercised only by the isolated spine test `test/spine/c3_action_items_test.dart`. This splits ownership of the empty-state key and pins contract behavior the shipped page no longer uses. Mirror what this PR did to `conversation_api_contract.dart` (which dropped its empty rendering branch while retaining the key): retire the empty branch from `ActionItemsApiStatus` and update the spine test, or keep a single empty-state source.</violation>
</file>
<file name="app/lib/l10n/app_be.arb">
<violation number="1" location="app/lib/l10n/app_be.arb:5933">
P3: `@tasksEmptyStateMessage` in 15 translated ARBs (be, bn, bs, fa, he, hr, kn, mk, mr, sl, sr, ta, te, tl, ur) still says "Empty state message shown when there are no tasks, with instruction to tap + button", which no longer matches the new message. The template `app_en.arb` now uses "Guidance on the empty Tasks tab: start a conversation to create a task." Since these files were edited in this PR anyway, propagate the updated description so translator-facing metadata stays consistent.</violation>
</file>
Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.
Re-trigger cubic
| @@ -0,0 +1,3 @@ | |||
| { | |||
| "change": "Home and Tasks keep their empty-state icons and guidance visible after loading, in light and dark mode. Empty Tasks matches Home's layout and explains how conversations create tasks." | |||
There was a problem hiding this comment.
P3: Rewrite this fragment around the user-visible benefit instead of implementation and test-detail wording: say that empty Home and Tasks now show their icons and guidance, and that Tasks explains how to create tasks from conversations.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/changelog/unreleased/20260930-home-empty-conversations.json, line 2:
<comment>Rewrite this fragment around the user-visible benefit instead of implementation and test-detail wording: say that empty Home and Tasks now show their icons and guidance, and that Tasks explains how to create tasks from conversations.</comment>
<file context>
@@ -0,0 +1,3 @@
+{
+ "change": "Home and Tasks keep their empty-state icons and guidance visible after loading, in light and dark mode. Empty Tasks matches Home's layout and explains how conversations create tasks."
+}
</file context>
| "change": "Home and Tasks keep their empty-state icons and guidance visible after loading, in light and dark mode. Empty Tasks matches Home's layout and explains how conversations create tasks." | |
| "change": "Home and Tasks now show helpful empty-state icons and guidance, including how to create tasks from conversations." |
| final create = find.text(l10n.createActionItem); | ||
| expect(provider.apiViewState.phase, ApiViewPhase.empty); | ||
| expect(find.byKey(const ValueKey('omi.action_items.empty')), findsOneWidget); | ||
| expect(title, findsOneWidget); |
There was a problem hiding this comment.
P3: This test never verifies the PR's stated "only the active tab's text is announced" behavior. Because OmiEmptyState renders the layout references (noConversationsYet, noConversationsHeroMessage) as sibling Texts inside an IndexedStack (all children are built and laid out), find.text/getRect/findsOneWidget see the hidden reference texts too, so these assertions cannot detect a regression where the inactive tab's guidance is painted or announced. Enable semantics and assert the tasks empty node exposes only the active labels.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/test/widgets/tasks_empty_state_test.dart, line 48:
<comment>This test never verifies the PR's stated "only the active tab's text is announced" behavior. Because OmiEmptyState renders the layout references (`noConversationsYet`, `noConversationsHeroMessage`) as sibling Texts inside an `IndexedStack` (all children are built and laid out), `find.text`/`getRect`/`findsOneWidget` see the hidden reference texts too, so these assertions cannot detect a regression where the inactive tab's guidance is painted or announced. Enable semantics and assert the tasks empty node exposes only the active labels.</comment>
<file context>
@@ -0,0 +1,117 @@
+ final create = find.text(l10n.createActionItem);
+ expect(provider.apiViewState.phase, ApiViewPhase.empty);
+ expect(find.byKey(const ValueKey('omi.action_items.empty')), findsOneWidget);
+ expect(title, findsOneWidget);
+ expect(hint, findsOneWidget);
+ expect(icon, findsOneWidget);
</file context>
| final showCompleted = provider.showCompletedView; | ||
| final categorizedItems = _categorizeItems(provider.actionItems, showCompleted); | ||
| final apiPhase = provider.apiViewState.phase; | ||
| // Successful empty results use the existing icon and conversation guidance. |
There was a problem hiding this comment.
P3: Removing ApiViewPhase.empty from showTypedStatus makes ActionItemsApiStatus's empty branch unreachable from the page: every non-error phase now falls to _buildEmptyTasksList, which owns the ValueKey('omi.action_items.empty') key via its KeyedSubtree. ActionItemsApiStatus (app/lib/backend/http/action_items_api_contract.dart) still renders a stale empty phase — white "No Tasks Yet" text and the same 'omi.action_items.empty' key — now exercised only by the isolated spine test test/spine/c3_action_items_test.dart. This splits ownership of the empty-state key and pins contract behavior the shipped page no longer uses. Mirror what this PR did to conversation_api_contract.dart (which dropped its empty rendering branch while retaining the key): retire the empty branch from ActionItemsApiStatus and update the spine test, or keep a single empty-state source.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/pages/action_items/action_items_page.dart, line 441:
<comment>Removing `ApiViewPhase.empty` from `showTypedStatus` makes `ActionItemsApiStatus`'s empty branch unreachable from the page: every non-error phase now falls to `_buildEmptyTasksList`, which owns the `ValueKey('omi.action_items.empty')` key via its `KeyedSubtree`. `ActionItemsApiStatus` (app/lib/backend/http/action_items_api_contract.dart) still renders a stale empty phase — white "No Tasks Yet" text and the same `'omi.action_items.empty'` key — now exercised only by the isolated spine test `test/spine/c3_action_items_test.dart`. This splits ownership of the empty-state key and pins contract behavior the shipped page no longer uses. Mirror what this PR did to `conversation_api_contract.dart` (which dropped its empty rendering branch while retaining the key): retire the empty branch from `ActionItemsApiStatus` and update the spine test, or keep a single empty-state source.</comment>
<file context>
@@ -438,11 +438,11 @@ class _ActionItemsPageState extends State<ActionItemsPage> with AutomaticKeepAli
final showCompleted = provider.showCompletedView;
final categorizedItems = _categorizeItems(provider.actionItems, showCompleted);
final apiPhase = provider.apiViewState.phase;
+ // Successful empty results use the existing icon and conversation guidance.
final showTypedStatus = apiPhase == ApiViewPhase.error ||
apiPhase == ApiViewPhase.locked ||
</file context>
| "description": "Consent message explaining how user data will be stored and used" | ||
| }, | ||
| "tasksEmptyStateMessage": "Задачы з вашых разговораў пояўляцца тут.\nТапніце + каб стварыць адну ручнічна.", | ||
| "tasksEmptyStateMessage": "Пачніце размову, каб стварыць задачу.", |
There was a problem hiding this comment.
P3: @tasksEmptyStateMessage in 15 translated ARBs (be, bn, bs, fa, he, hr, kn, mk, mr, sl, sr, ta, te, tl, ur) still says "Empty state message shown when there are no tasks, with instruction to tap + button", which no longer matches the new message. The template app_en.arb now uses "Guidance on the empty Tasks tab: start a conversation to create a task." Since these files were edited in this PR anyway, propagate the updated description so translator-facing metadata stays consistent.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/l10n/app_be.arb, line 5933:
<comment>`@tasksEmptyStateMessage` in 15 translated ARBs (be, bn, bs, fa, he, hr, kn, mk, mr, sl, sr, ta, te, tl, ur) still says "Empty state message shown when there are no tasks, with instruction to tap + button", which no longer matches the new message. The template `app_en.arb` now uses "Guidance on the empty Tasks tab: start a conversation to create a task." Since these files were edited in this PR anyway, propagate the updated description so translator-facing metadata stays consistent.</comment>
<file context>
@@ -5930,7 +5930,7 @@
"description": "Consent message explaining how user data will be stored and used"
},
- "tasksEmptyStateMessage": "Задачы з вашых разговораў пояўляцца тут.\nТапніце + каб стварыць адну ручнічна.",
+ "tasksEmptyStateMessage": "Пачніце размову, каб стварыць задачу.",
"@tasksEmptyStateMessage": {
"description": "Empty state message shown when there are no tasks, with instruction to tap + button"
</file context>
|
Verified the fix against the base commit — it's a clean, well-scoped restoration of the two empty states:
Two non-blocking notes: Leaving for human maintainer review to sign off on the Tasks empty-state direction (no Create Task button, conversation-capture guidance) and the Home icon+title-only simplification. — AI-generated feedback on behalf of the maintainers by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
…mode (#20419) Offline Sync’s Manage Storage sheet mixed fixed dark card backgrounds with palette-dependent text, making category labels unreadable in light appearance and secondary labels too faint in dark appearance. Resolve card, badge, title and secondary text colors together for both themes. The extracted production `OfflineSyncStorageSheet` retains the page’s existing counts, confirmation dialogs and deletion handlers. Category Clear actions use `OmiButton.secondary` for readable primary text and a 48pt tap target. Titles truncate beside the count; actions move below the details on narrow sheets or enlarged text. ## Screenshots Captured on the connected iPhone 16 and Android LAVA LZG411 using separate debug app identities. The isolated target renders the production storage sheet and existing Home empty-state widget, with zero counts or inert sample counts (2 synced / 3 pending). Before uses the original storage row; after runs the fix. The surrounding fixture is not the complete Offline Sync or Home page, and no auth, sync or recording operation is exercised. | Platform | Light before | Light after | Dark after | | --- | --- | --- | --- | | iOS · iPhone 16 | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/ios-before.png" width="240" alt="iOS · iPhone 16 before"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/ios-after.png" width="240" alt="iOS · iPhone 16 after"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/ios-dark-after.png" width="240" alt="iOS · iPhone 16 dark-after"> | | Android · LAVA LZG411 | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/android-before.png" width="240" alt="Android · LAVA LZG411 before"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/android-after.png" width="240" alt="Android · LAVA LZG411 after"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/android-dark-after.png" width="240" alt="Android · LAVA LZG411 dark-after"> | Nonzero counts show the reviewed Clear actions: | Platform | Light after | Dark after | | --- | --- | --- | | iOS · iPhone 16 | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/ios-actions-after.png" width="240" alt="iOS · iPhone 16 actions-after"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/ios-actions-dark-after.png" width="240" alt="iOS · iPhone 16 actions-dark-after"> | | Android · LAVA LZG411 | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/android-actions-after.png" width="240" alt="Android · LAVA LZG411 actions-after"> | <img src="https://raw.githubusercontent.com/apoorvdarshan/omi/3ba4d7d7a5c1673366941da95fa377e8b4e20f3d/android-actions-dark-after.png" width="240" alt="Android · LAVA LZG411 actions-dark-after"> | The Home empty-state defect already has a merged fix in #20047. Its existing production widget was checked in both themes; this PR does not change Home behavior. ## Validation - Seven focused widget tests passed: category/title/subtitle/count contrast in both themes, zero-count eligibility, nonzero callbacks, and a 320px French sheet at 2× text scaling with contrast, minimum target size and reachability checks. The original row fails the contrast guard (light title 1.47:1, dark subtitle 3.10:1). - Physical iOS and Android debug captures visually verified in both themes. Native iOS button bounds confirm 48pt category targets. Only the isolated development apps were installed, then removed; production apps and data were retained and reopened. - The local iOS fixture artifact omitted the unused unsigned Watch payload after the native app compiled; no native project or signing configuration change is included in this PR. - Pinned Flutter 3.44.5 / Dart 3.12.2 analyzer ratchet passed with no baseline changes. - Full `TZ=UTC bash app/test.sh --concurrency=4 --reporter expanded`: **3,929 tests passed**, exit code 0, plus the 138-test protected spine. - `make preflight`: all 24 selected checks passed. Draft-body preflight: 23 checks passed. Bounded pre-push gate passed; `df970edef3` is pushed. - All three review findings were fixed, replied to and resolved. ## Failure class Failure-Class: new FC-offline-storage-mixed-palette records the mixed palette/card-background failure introduced by #19378 and the executable production-sheet contrast guard. ## Product invariants affected none
Promote Android 1.0.554 (build 1371, tag `v1.0.554+1371-android-cm`, SHA e9c45bd (the 1370 tag commit had no first-attempt Android Emulator Acceptance run, which the release lane requires)) from the Play alpha track to production via the `mobile-store-promote` workflow. Why now: prod Android (1.0.553 / 1320) still shows the invisible white-on-white conversations empty state; the fixes (d393e44 light palette from first frame, #20047 empty states) are in 1.0.554. iOS 1.0.554 (1334) was submitted to App Review today. ## Product invariants affected none
TL;DR: Fixes the almost invisible empty screens on Home and Tasks. Both keep their icons and readable titles after loading. Home shows only its icon and “No conversations yet”. Empty Tasks says “Start a conversation to create a task.”, has no Create Task button, and uses the same layout as Home.
Fixes #20036. Related to #19233.
Before and after
Light mode. Home after is the approved iPhone 17 Pro Max simulator capture of the current code. The other screenshots were supplied by the reporter.
What changed and why
A successful empty response bypassed the designed empty states and showed bare white labels. Home now reuses its empty-state component after loading; Tasks routes empty results to its existing checkmark design. The shared component reserves room for the localized titles and Tasks hint so wrapping does not shift their headings. Home displays only its icon and title; reserved hint space is neither displayed nor announced.
The task hint is translated across all locales with the repository localization tool. Error/retry behavior is preserved, and Home’s error text uses the theme’s typography.
Product invariants affected
INV-UI-1 and INV-UI-3: shared neutral colors, typography and page-state components.
How it was verified
agent-flutterin light and dark mode.simctlon iPhone 17 Pro Max / iOS 27.0, using the production conversation page and shared controls in the repository visual-audit frame with empty fixture data. The reporter reviewed and approved this image.d2796305ef(prod/mobile_beta). The Tasks after screenshot above was supplied by the reporter.Final copy-refinement test command, from
app/:TZ=UTC flutter test --no-pub test/widgets/tasks_empty_state_test.dart test/widgets/home_empty_conversations_test.dart test/widgets/ui/omi_components_test.dart --reporter expandedTests
home_empty_conversations_test.dartchecks the icon and readable title after an empty response, and verifies that Home exposes no supporting guidance visually or to accessibility.tasks_empty_state_test.dartcovers the matching Tasks state, absence of creation buttons, placement against Home, accessibility text sizing and retry recovery. The original rendering paths fail the regression checks.Failure class (fixes)
Failure-Class: none
The typed empty-result presentation bypassed the existing page-state component; no existing failure class covers this mismatch.
Scoped cleanups
Removed an existing unused import from the recording analytics test helper to pass the required analyzer ratchet. Both existing consumers’ tests passed.