Repository navigation
Closed
Milestone
Description
Goal: Share tasks via link → recipient sees web preview → must install Omi to save → sender gets notified on completion. Viral loop.
Architecture
Reuse the existing conversation sharing pattern (visibility + Redis + public endpoint + Next.js page). No new Firestore collections.
Flow
Sender selects tasks → POST /share → gets URL
→ share_plus sends URL via iMessage/WhatsApp/etc
→ Recipient taps link → h.omi.me/tasks/{token}
→ Web page: "Alex shared 3 tasks with you" + task preview + CTA
→ Not installed? → App Store (viral gate)
→ Installed? → deep link → POST /accept → tasks copied to list
→ Recipient completes task → sender gets push notification
Data Changes
Existing action_items — add fields:
On recipient's copy (when saved):
{
"shared_from": {
"token": "abc123",
"sender_uid": "uid_alice",
"sender_name": "Alice",
"original_task_id": "task_001"
}
}Redis (one key per share, 30-day TTL):
task_share:{token} → { "uid": "...", "display_name": "Alice", "task_ids": ["id1", "id2"] }
API Endpoints (3 total)
1. Create share
POST /v1/action-items/share
Auth: required
Body: { "task_ids": ["id1", "id2", "id3"] }
Response: { "url": "https://h.omi.me/tasks/{token}", "token": "abc123" }
- Validate all task_ids belong to user
- Generate url-safe token (uuid4)
- Store in Redis with 30-day TTL
- Return URL
2. Public read (no auth)
GET /v1/action-items/shared/{token}
Response: {
"sender_name": "Alice",
"tasks": [
{ "description": "Ship mentor to prod", "due_at": "2026-02-15" },
{ "description": "Review PR #4711", "due_at": null }
],
"count": 2
}
- Read Redis → get uid + task_ids
- Fetch from Firestore (description + due_at only)
- Never expose conversation_id or internal fields
3. Save to my tasks (auth required)
POST /v1/action-items/accept
Auth: required
Body: { "token": "abc123" }
Response: { "created": ["new_id_1", "new_id_2"], "count": 2 }
- Read Redis → get sender info + task_ids
- For each: create copy via existing create_action_item()
- Add shared_from field on each copy
Completion Notification (1 hook)
In the action item completion handler:
if action_item.get("shared_from"):
sender_uid = action_item["shared_from"]["sender_uid"]
send_notification(sender_uid, "Task completed",
f"{recipient_name} completed: {description[:60]}")Web Page: h.omi.me/tasks/[token]
Copy the /memories/[id]/page.tsx pattern. One new Next.js dynamic route page showing:
- Sender identity ("Alex shared 3 tasks with you")
- Task list preview (description + due date)
- Big CTA: "Save to My Tasks"
- If not installed: app store link
App Changes
- Share button: Add to action items page header (multi-select) + task tile context menu (single)
- Deep link: Add
/tasks/{token}route toapp_shell.dart - Accept screen: Simple preview + "Save" button calling
POST /accept
Files to Touch
| Component | File | Lines |
|---|---|---|
| Backend: 3 endpoints | backend/routers/action_items.py |
~200 |
| Backend: completion hook | backend/routers/action_items.py |
~10 |
| Redis: token storage | backend/database/redis_db.py |
~20 |
| Web: share page | web/frontend/src/app/tasks/[token]/page.tsx |
~100 |
| App: share button | action_items_page.dart + action_item_tile_widget.dart |
~50 |
| App: deep link | app/lib/core/app_shell.dart |
~15 |
| App: accept screen | New widget | ~80 |
Privacy
Only task text + due date are shared. Conversation contents are never exposed.
Spec by AI for @beastoin
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat: Task sharing via link (#4727) (#4737)
beastoin commentedon Feb 12, 2026
Hey @kodjima33 — task sharing is live on prod!
You can now share tasks via link: tap the share icon on any task → generates an
h.omi.me/tasks/{token}link → recipient opens it → sees a web preview → taps "Open in Omi" → accepts tasks into their list. When the recipient completes a shared task, you get a push notification.Lead PR: #4737 — full stack: backend (3 endpoints + Redis), web share page, Flutter deep link + accept sheet
Follow-up fixes already merged:
The deep link works on both warm start (app running) and cold start (app launched by the link). Android intent filter + iOS Universal Links both set up.
Would love to hear how the sharing flow feels — especially the web preview page and the accept experience on the receiving end.
@Chen (RepoOps)
feat: Task sharing via link (BasedHardware#4727) (BasedHardware#4737)
feat: Task sharing via link (BasedHardware#4727) (BasedHardware#4737)