# 🚀 DOING: Custom Backend Sync & Icon Update

## 📌 Context
- **Idea:** `plan/ideas/09_custom_backend_sync_logic.md`
- **Report:** `plan/possible/01_custom_backend_sync_logic_report.md`
- **Status:** 🚧 In Progress
  <!-- 🚧 In Progress | 🔴 Blocked — [reason] | ✅ Done -->

## 🎯 Goal
Sync saved notes to the custom backend (`http://172.16.2.210:5230/`) using the active Clerk token, and update the extension icon using `public/image.png`.

## ⚠️ Active Trade-offs
- None. (POSSIBLE with no trade-offs)

## 🛠 Impact & Files Touched
| File | Symbol | Change | Blast Radius |
|------|--------|--------|--------------|
| `src/shared/api-client.ts` | `createMemo`, `syncToSecondaryBackend` | ADD/MODIFY | 2 callers |
| `src/background/service-worker.ts` | `SAVE_NOTE` listener | MODIFY | 1 caller |
| `icons/` & `public/` | `resize-icons.js` | MODIFY | 0 callers |

**Risk:** Low

## 🔙 Rollback Plan
N/A

## 📋 Execution Checklist

### Phase 1: Icon Replacement (~15m)
- [ ] Task 1.1: Use `public/image.png` to generate new icons (16, 48, 128) using `resize-icons.js`.

### Phase 2: API Configuration & Dual Write (~30m)
- [ ] Task 2.1: Add `syncToSecondaryBackend` function in `api-client.ts`.
- [ ] Task 2.2: Update `SAVE_NOTE` handler in `service-worker.ts` to trigger `syncToSecondaryBackend`.

### Phase 3: Testing (~15m)
- [ ] Task 3.1: Verify the build passes and extension works.

## 🔄 Sub-Doings
_None yet_

## ✅ Completion Gate
- [ ] All tasks [x] | [ ] Sub-Doings resolved | [ ] Smoke test passed | [ ] Trade-offs confirmed

---
_Started: 2026-04-28 | Updated: 2026-04-28_
