Offline writes now queue + apply optimistically instead of throwing.
On reconnect, the queue drains automatically; conflicts and rejections
surface as one-time SnackBars so the user knows their edit didn't land.
- Drift schema v3: `pending_writes` table (verb + payload + baseline +
tries + last_error). Negative ids serve as cache placeholders for
offline-created rows until replay assigns the server id.
- Each write repository (notes, tasks, projects, milestones, events)
now catches NetworkException, applies the change to cache (with a
fresh `nextTempId()` for creates), and enqueues the API call.
- Edits to a still-queued offline-created row coalesce into the
original create payload — only one server call per row, in order.
- Deletes of still-queued offline-created rows drop the queue entry
and the cache row; no server call ever happens.
- New WriteQueue service drains the queue oldest-first.
Server-wins on `updated_at` baseline check (notes/tasks/projects);
last-writer-wins for milestones/events (no getOne available).
4xx → drop + surface as `rejected`; conflict → drop + `overwritten`;
404 on update → drop + `missing`; 5xx/network → keep + retry next
online cycle.
- Replay fires on AuthStatus → authenticated transitions
(cold-start, came-back-online, login).
- OfflineBanner shows "Retry (N)" with the pending-writes count.
- Distinct ServerException added so 4xx no longer masquerade as
NetworkException — the queue can drop them instead of looping.
flutter analyze clean; 21 tests pass (3 new for QueueFailure messaging).
Phase 4 (read-only UI indicators on cached/temp rows) still ahead.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Per-screen application of the design system to the Flutter app.
Mirrors the web's surface phase landed in FabledScribe v26.04.28.1.
Foundation port shipped in 0f05f47; this is the surface work.
Lucide icon migration
- Added lucide_icons ^0.257.0 dependency
- 107 Material Icons references → LucideIcons across 21 files. Drop-in
IconData swap (Icon(LucideIcons.X) instead of Icon(Icons.x)).
- Lucide import added to each touched file.
Input border radius
- theme.dart inputDecorationTheme borderRadius 24 → 8 in both light
and dark themes. Doc says radius-md (8px) for inputs; previous pill
shape was Material default that the doc deviates from.
Illuminated Transcript pattern (ChatMessageBubble)
- User bubble: accent-tinted border → neutral Pewter (scheme.outline).
Asymmetric corner already correct (bottomRight 4px).
- Assistant bubble: topLeft corner 4 → 16; only bottomLeft stays 4
(the "tail" effect, mirroring web's `border-bottom-left-radius: 4px`).
Background switched from surfaceContainerHighest (Slate) to surface
(Iron) per the doc spec "card surface".
- Assistant bubble glow shadow added — accent-tinted blur (28px alpha
0.14) + depth shadow (8px alpha 0.4 black). Mirrors web's
--color-bubble-asst-shadow.
ActionColors wiring (Hybrid rule)
- 5 'Delete' confirm buttons across notes / tasks / chat conversations
/ calendar event sheet → Oxblood action-destructive via the
ActionColors ThemeExtension defined in the foundation port. Foreground
for ghost/text variants, backgroundColor for filled.
- Calendar event Save button → Moss action-primary. The first call
site to wire ActionColors.primary; serves as the pattern for future
Save reclassifications.
- Other Save buttons (note edit, task edit, project edit, etc.) still
flow through colorScheme.primary (dusty violet) and read as
brand-moment. Reclassifying those is deferred — the wiring pattern
is established and can be applied incrementally as files are touched.
Indigo cleanup
- 4 hardcoded #7C3AED / #5B21B6 literals → dusty-violet equivalents
(#5B4A8A / #3F3560). Spots: project_tasks_screen color fallback
(×2), journal_screen gradient.
Verification
- flutter analyze: No issues found
What's deferred
- Per-screen Save / Cancel reclassification beyond the calendar event
Save button. Wiring pattern established; rollout opportunistic.
- Long-form 1.7 line-height on assistant Markdown content (would
require MarkdownStyleSheet work; minor).
- Surface walk on Knowledge / Projects / Settings screens for any
hardcoded styling that needs touch.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Mirrors the web frontend's design-system foundation pass (shipped on web
2026-04-27 in 7a9a8b7) for the Flutter app. Single-file change to
lib/core/theme.dart — most widgets read colorScheme.primary so the
palette flip alone covers a large surface.
Palette swap
- dark: cool grey #0F0F14 / #16161F → Obsidian #14171A / Iron #1E2228
with Slate #2C313A and Pewter #3F4651 borders; Parchment #E8E4D8
primary text, Vellum #C2BFB4 secondary
- light: white-and-cool-blue → warm parchment #F5F1E8 page / #FBF8F0
cards / #EFEAE0 inset; deep ink #14171A text; warm pewter #D9D6CE
borders
- primary (both modes): indigo #7C3AED → dusty violet #5B4A8A
- error: indigo-red pair → terracotta #C04A1F (semantic Error per the
doc; distinct from destructive Oxblood used for delete buttons)
Action token ThemeExtension
- New ActionColors extension exposes Moss / Bronze / Oxblood / Pewter
outside the ColorScheme so widgets can read them via
Theme.of(context).extension<ActionColors>()!.primary etc.
- Hybrid rule: ColorScheme.primary stays the dusty-violet brand accent
(Send buttons, empty-state CTAs); action buttons (Save / Cancel /
Delete / ghost) use the ActionColors palette. No widget refactors in
this commit — extension is defined for surface-phase work to consume.
Typography
- Inter loaded for body / labels / titleMedium-and-below (was system
default)
- Fraunces still loaded for display / headline / titleLarge — only at
≥18px per the doc rule
- JetBrains Mono available for code at call sites via
GoogleFonts.jetBrainsMono() (Flutter has no mono TextTheme slot)
GradientButton
- Brand-moment CTA equivalent of the web's --gradient-cta. Colors
swapped from indigo gradient to dusty-violet (#5B4A8A → #3F3560);
glow shadow rgba updated to match.
Out of scope (deferred to later surface-phase work)
- Per-screen button reclassification (Save → Moss FilledButton, Delete
→ Oxblood, etc.) — the ActionColors extension exists, no widgets
reach for it yet
- Lucide icon migration — separate task, requires picking a
flutter_lucide / lucide_icons package
- Input border radius (currently 24 / pill, doc says 8) — leave for
surface phase
- Voice/tone copy touchups
- Chat bubble Illuminated Transcript pattern (assistant left-edge
accent + glow) — not yet ported to ChatMessageBubble
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- ProjectLibraryCard.onTap navigates to /projects/:id/tasks
- New ProjectTasksScreen: milestone sections with coloured dot,
done/total counter and thin progress bar; unassigned tasks at bottom
- Status cycle icon updates optimistically (pendingStatus map) so
the list doesn't flash on every tap; syncs global tasksProvider
- New route /projects/:id/tasks registered in app.dart
- TasksApi.getByProject + TasksRepository + projectTasksProvider (family)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add WikilinkSyntax (InlineSyntax) that parses [[Note Title]] into
anchor elements with a wikilink:// href
- wikilinkExtensionSet extends GFM with this syntax; shared by detail
view and edit preview so rendering is consistent
- NoteDetailScreen handles onTapLink: wikilink:// hrefs look up the
target note by title (case-insensitive) and push its detail route;
unresolved links show a "Note not found" snackbar
- Add markdown as an explicit dependency (was previously transitive)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>