CAS-2664 — Astrid Upgrade: Project Awareness + Screenshot Vision + Custom Image Upload
CAS-2664 — Astrid Upgrade: Project Awareness + Screenshot Vision + Custom Image Upload
Delivered: 2026-05-13
PRs: #697, #698, #699
Engineers: Weaver (Finn), Artificer (Runa), Assayer (Sindri)
What shipped
Three independent sub-features that together make Astrid a more capable bug-report assistant:
1. Project awareness (PR #697 — CAS-2674)
Astrid now knows the Casaconomy codebase vocabulary.
- Added
docs/astrid-project-context.md— human-editable reference covering pages, components, Zustand stores, IPC command prefixes, and iOS-specific quirks - Inlined a compact
PROJECT CONTEXTblock intoASTRID_SYSTEM_PREFIXinai_chat.rs(daemon-side; applies to all clients including older iOS builds)
Before: “the UI doesn’t look right at the bottom of the screen”
After: “This looks like a layout regression in MobileNavbar — the safe-area inset offset is missing”
2. Screenshot vision / multimodal plumbing (PR #699 — CAS-2675)
Astrid can now see attached images.
chat_streamaccepts optionalimageBase64at the Tauri command layer- CloudBridge encrypted
ai_chatenvelope extended withimageBase64 - Daemon
ai_chatpayload parser appends attached image data into the Astrid prompt context - LocalCli fallback is backward-safe: warns and ignores image payload (Claude CLI has no dedicated image flag)
3. Custom image upload (PR #698 — CAS-2676)
Users can attach a photo to the Astrid conversation.
- Attach image button (photo icon) added to the bug-report chat composer in
ReportSheet.tsx - Hidden
<input type="file" accept="image/*">— triggers native Photos picker on iOS WKWebView; standard macOS file dialog on desktop. No additional Tauri plugin required. - Inline thumbnail preview with dismiss button above the composer
useReportIssueStoregainsattachedImageBytes,attachedImageDataUrl,attachImage(file),removeAttachedImage()startStreamwired to passimageBase64through tochat_stream
Architecture
User attaches image ↓ReportSheet.tsx (useReportIssueStore.attachImage) ↓ imageBase64ai_commands::chat_stream (Tauri command) ↓ imageBase64AIManager::chat_stream_bug_report ↓ CloudBridge (imageBase64 in envelope)daemon ai_chat handler ↓ appended to Astrid prompt contextClaude (sees the image inline)LocalCli path skips the image payload silently (no CLI flag available).
Files changed
| File | Change |
|---|---|
docs/astrid-project-context.md | New — project vocabulary source of truth |
src-tauri/src/bin/handlers/ai_chat.rs | Project context injected into system prefix; imageBase64 in payload |
src-tauri/src/commands/ai_commands.rs | image_base64: Option<String> param added to chat_stream |
src-tauri/src/services/ai/claude_subprocess.rs | imageBase64 payload forwarding |
src-tauri/src/services/ai/cloudbridge.rs | imageBase64 in encrypted envelope |
src-tauri/src/services/ai/local_cli.rs | Graceful ignore of imageBase64 with warn log |
src-tauri/src/services/ai/manager.rs | Thread imageBase64 through chat_stream_bug_report |
src-tauri/src/services/ai/prompts.rs | Project context prompt block |
src/components/ReportSheet.tsx | Attach image button + preview |
src/store/useReportIssueStore.ts | attachedImage* state + actions |
Merge order
CAS-2674 and CAS-2675 shipped in parallel (no dependency).
CAS-2676 shipped after CAS-2675 (depends on imageBase64 plumbing being in place).