- Switch navigation breakpoint from orientation to width (≥600dp):
NavigationRail shown on tablets in portrait and phones in landscape
- Chat bubble max-width capped at 480dp (prevents 640dp+ bubbles on tablets)
- Chat input maxLines reduced to 2 when width ≥600dp
- Task edit form centered and constrained to 600dp max-width on tablets
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Root cause: when SSE delivered any chunk, maxAttempts was set to 1 with
no delay. That single immediate poll hit the server before it finished
writing to the DB, received status='generating' with empty content, then
overwrote the SSE-streamed text with the stale empty row and exited.
isStreaming went false and the UI was stuck showing '...'.
Two fixes:
1. Always poll up to 20 times regardless of SSE success. SSE closing
does not mean the server has committed the final row to the DB.
2. When SSE delivered content, only replace state with polled data if
the polled assistant message is complete or has content — this
prevents clobbering streamed text with a stale empty DB row while
the server is still writing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Edit screens (note, task): cache _initFuture in initState instead of
calling _loadExisting() from FutureBuilder on every rebuild. Prevents
race condition where multiple concurrent loads could overwrite edits.
Also removes unnecessary _loaded flag and simplifies the pattern.
- Note editor: remove onChanged: (_) => setState((){}) on the body
TextField — triggered a full rebuild on every keystroke for no reason.
- SSE streaming: use utf8.decode(chunk, allowMalformed: true) so a
malformed byte sequence from the server skips rather than throwing an
unhandled FormatException that escaped all catch blocks.
- Chat provider: guard msgs.isEmpty before accessing msgs.last during
SSE chunk processing to prevent a potential index error on empty state.
- Offline queue drain: check mounted before and after each async gap in
_drainQueue so ref is never accessed on a disposed widget.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Notes: no AppBar at all; a floating search icon (top-right corner)
triggers an inline search field above the list rather than an AppBar.
Tasks: no AppBar; TabBar sits directly at the top of the body, flush
with the quick-capture bar. The search icon lives to the right of the
tabs and expands a search field above them when tapped.
Both changes eliminate the ~56dp toolbar gap that was visible between
the quick-capture bar and the list content.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Collapsible search in notes and tasks: magnifying glass in AppBar
expands to a text field inline; close button resets the filter
- Offline capture queue: failed quick-captures (NetworkException) are
persisted to SharedPreferences and retried automatically on next
successful submit or app start; badge shows pending count
- App icon: book-with-sparkle logo from FabledAssistant SVG rendered
at all Android densities with adaptive icon (indigo #6366f1 bg)
- Dark mode subtitle fix: use colorScheme.onSurfaceVariant for note
preview and conversation timestamp text
- Remove swipe-to-delete (accidental deletions); long-press remains
- Chat: SSE streaming reliability, polling fallback, title patching
- Settings: theme toggle (system/light/dark) persisted to prefs
- Notes: delete button in edit screen; body preview in list
- Tasks: fix delete dialog context; description search support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>