---
phase: 20-offline-mode-hardening
plan: 02
subsystem: ui
tags: [slint, animation, offline, pending-edits]

# Dependency graph
requires:
  - phase: 20-offline-mode-hardening
    plan: 01
    provides: pending-edit-count Slint property driven from Rust

provides:
  - Breathing green dot animation when pending edits exist (D-05)
  - Text indicator removed per D-05 (breathing dot is sole indicator)
  - Search bar width simplified (unconditional formula)

affects:
  - None — terminal plan in phase 20

# Tech tracking
tech-stack:
  added: []
  patterns:
    - animation-tick() + Math.sin() for smooth opacity breathing (Slint idiomatic pattern)
    - Ternary gate on animation-tick() avoids continuous re-rendering at idle (zero CPU overhead)

key-files:
  modified:
    - crates/app/ui/dashboard.slint
  created: []
  deleted: []

metrics:
  lines-added: 7
  lines-removed: 10
  test-count: 0
  test-pass: 0
  task-count: 1
---

# Plan 20-02 Summary: Breathing Green Dot Animation

## What Changed

### Task 1: Breathing Animation and Text Removal

**dashboard.slint** received three targeted changes:

1. **Breathing animation** -- The connection status dot Rectangle gained an `opacity` property driven by `Math.sin(animation-tick() / 1500ms * 360deg)`, mapping to range 0.4-1.0 (1.5s period). The expression is ternary-gated: `animation-tick()` only evaluates when `connection-status == 2 && pending-edit-count > 0`, so Slint stops re-rendering when the queue is empty.

2. **Text indicator removed** -- The `if root.pending-edit-count > 0 : Text { "N edits pending" }` block was removed per D-05. The breathing dot is now the sole visual indicator for pending edits.

3. **Search bar width simplified** -- The conditional ternary (`pending-edit-count > 0 ? ... : ...`) was replaced with the unconditional `parent.width - 60px - 154px - 12px` since the text widget no longer exists.

## Commits

| Task | Commit | Description |
|------|--------|-------------|
| 1 | `5a1d83d` | feat(20-02): breathing dot animation and remove pending-edit text indicator |

## Deviations

None.

## Self-Check: PASSED

- [x] Build compiles (`cargo build --package app` exits 0)
- [x] Green dot opacity expression uses ternary gate (no CPU cost when idle)
- [x] No text indicator remains for pending edits
- [x] Search bar width is unconditional
