Skip to content

Show an empty state when the AI finds no tasks, instead of an error - #505

Open
Guotai812 wants to merge 8 commits into
mainfrom
ai-empty-extraction-empty-state
Open

Show an empty state when the AI finds no tasks, instead of an error#505
Guotai812 wants to merge 8 commits into
mainfrom
ai-empty-extraction-empty-state

Conversation

@Guotai812

Copy link
Copy Markdown
Collaborator

Summary

The backend expressed "the user said nothing task-shaped" by throwing (AiErrorCode.NoTasksExtracted), so a valid empty outcome arrived on the error channel: red toast, transcript wiped, blank screen. Users could not tell a mis-hearing from a genuinely task-free sentence, or keep what they said.

  • Backend: an empty extraction now returns a normal AiGenerateMessage with isEmptyResult. Genuine faults (cancel, 429, content filter, unhandled) still throw.
  • Why a flag, not empty lists: the extracted* lists are cumulative for the whole session, so a barren turn can still return a non-empty snapshot. ToolCallCount is the only per-turn signal.
  • Mobile: the sheet shows what was heard plus a "Save as note" action; drafts from earlier turns stay put.
  • Empty results stop counting toward ai_task_generation_failed, which they were 59% of.

Backend and app must ship together: older app versions get no empty-state feedback.

Release note

When the AI doesn't find any to-dos in what you said, you now see what it heard and can save it as a note, instead of a red error message.

Status:

  • User-facing — announce it
  • Beta / partial — announce, but tagged as beta
  • Hidden in production (feature-flagged / not enabled for users) — don't announce
  • Internal only (refactor / infra / tests / CI / deps) — don't announce

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

Test Results

98 tests   98 ✅  9s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 5743d10.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Package Line Rate Branch Rate Complexity Health
BlotzTask 4% 32% 2593
BlotzTask 4% 32% 2593
Summary 4% (4136 / 104766) 32% (850 / 2660) 5186

Comment thread blotztask-mobile/src/feature/ai-task-generate/screens/ai-task-sheet-screen.tsx Outdated
Comment thread blotztask-mobile/src/feature/ai-task-generate/hooks/useAiTaskGenerator.ts Outdated
Comment thread blotztask-mobile/src/feature/ai-task-generate/models/ai-result-message-dto.ts Outdated
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.

2 participants