---
phase: 20.1.1-change-the-i-button-on-cards-to-show-a-scrollable-history-of
plan: 06
subsystem: ui
tags: [slint, card-ui, layout, cleanup, rust]

requires:
  - phase: 20.1.1
    plan: 04
    provides: notes-popup PopupWindow and composer-expanded/note-draft on RecipientCard; notes field on CardData

provides:
  - Row 5 note block removed from card.slint (note-preview display + inline editor gone)
  - Row 4 item squares grown to 80px row height / 44x44 inner square (D-15)
  - note-preview, editing-note removed from RecipientCard properties
  - save-note and summary-clicked callbacks removed from RecipientCard
  - note-preview removed from CardData struct in dashboard.slint
  - card-save-note and card-summary callbacks removed from DashboardWindow
  - note_preview field removed from DashboardCardViewModel and with_defaults constructor
  - single_line_note_preview removed from view_model.rs
  - apply_optimistic_note_update helper removed from main.rs
  - on_card_save_note wiring block removed from main.rs
  - note_preview removed from bugsweeper CardDataJson
  - Zero legacy name references across workspace (D-14 gate passed)

affects: [20.1.1-07, 20.1.1-08]

tech-stack:
  added: []
  patterns:
    - "When removing a field from DashboardCardViewModel.with_defaults(), search all call sites with varying indentation levels — replace_all misses sites with different leading whitespace"
    - "Row 5 removal also requires cleaning bugsweeper card_json.rs (CardDataJson mirrors Slint CardData) and all bugsweeper invoke dispatch entries"
    - "note-draft property was shared between legacy Row 5 and Plan 04 composer — only the Row 5 block references are removed; the single property declaration survives for the composer"

key-files:
  created: []
  modified:
    - crates/app/ui/card.slint
    - crates/app/ui/dashboard.slint
    - crates/app/src/main.rs
    - crates/app/src/dashboard/view_model.rs
    - crates/app/src/dashboard/projection.rs
    - crates/app/src/dashboard/discovery.rs
    - crates/app/src/dashboard/archive.rs
    - crates/app/tests/dashboard_projection_tests.rs
    - crates/app/tests/dashboard_layout_tests.rs
    - crates/bugsweeper/src/card_json.rs

key-decisions:
  - "note-draft property kept (not deleted) — Plan 04 reused the single existing declaration for the composer; removing the Row 5 block leaves the declaration intact and correctly serving the composer"
  - "single_line_note_preview removed entirely — its only callers were projection.rs (now cleaned) and layout tests that were testing the removed preview feature"
  - "apply_optimistic_note_update removed — it updated note_preview on CardData which no longer exists; the on_card_post_note handler still calls apply_filters for popover refresh"
  - "add button grown to 44x44 with y:18px to stay visually centered in the new 80px row"

requirements-completed: []

duration: 25min
completed: 2026-04-15
---

# Phase 20.1.1 Plan 06: Card Face Reclamation Summary

**Row 5 note block deleted and Row 4 product squares grown to 80px/44x44 across card.slint, dashboard.slint, view_model.rs, projection.rs, and main.rs with zero legacy name references remaining (D-14 gate passed).**

## Performance

- **Duration:** ~25 min
- **Started:** 2026-04-15T10:00:00Z
- **Completed:** 2026-04-15T10:21:33Z
- **Tasks:** 3 (committed together — required for workspace compilation)
- **Files modified:** 10

## Accomplishments

- `note-preview`, `editing-note`, `save-note`, `summary-clicked` removed from `card.slint`; Row 5 block (inline note editor) deleted; Row 6 stale comment deleted
- Row 4 item squares grown: row height 56px→80px, inner square 36x36→44x44, label y-offset 37px→46px, add button centered at y:18px with 44x44 size and 22px border-radius
- `note-preview` removed from `CardData` struct in `dashboard.slint`; `card-save-note` and `card-summary` callbacks and all forwarding removed
- `note_preview` field removed from `DashboardCardViewModel`, `with_defaults` constructor, and every struct literal in `projection.rs`, `discovery.rs`, `archive.rs`, `main.rs`
- `single_line_note_preview` function removed; `apply_optimistic_note_update` helper removed; all `on_card_save_note`/`on_card_summary` wiring blocks removed from `main.rs`
- `note_preview` removed from bugsweeper `CardDataJson`; stale `card-save-note` and `card-summary` bugsweeper dispatch entries removed
- Tests updated: `note_preview` assertions removed from `dashboard_projection_tests.rs`; `single_line_note_preview` tests removed from `dashboard_layout_tests.rs`
- `cargo check --workspace` exits 0; all D-14 greps return 0

## Task Commits

1. **Tasks 1 + 2 + 3 combined: full legacy note-preview removal + Row 4 growth** — `3fe30c1` (feat)

## Files Created/Modified

- `crates/app/ui/card.slint` — Row 5 deleted; Row 4 grown; note-preview/editing-note/save-note/summary-clicked removed
- `crates/app/ui/dashboard.slint` — note-preview from CardData removed; card-save-note/card-summary callbacks and forwarding removed
- `crates/app/src/dashboard/view_model.rs` — note_preview field and with_defaults param removed; single_line_note_preview removed; NoteEntry import cleaned
- `crates/app/src/dashboard/projection.rs` — single_line_note_preview call and note_preview struct field removed
- `crates/app/src/dashboard/discovery.rs` — note_preview: "".to_string() fields removed from three VM literals
- `crates/app/src/dashboard/archive.rs` — note_preview field removed from test VM literal
- `crates/app/src/main.rs` — apply_optimistic_note_update removed; on_card_save_note block removed; on_card_summary no-op removed; card-save-note and card-summary bugsweeper dispatch entries removed; all with_defaults call sites updated (varying indentation levels)
- `crates/app/tests/dashboard_projection_tests.rs` — note_preview assertions removed; missing_note_state test updated to expect Ready (matching actual projection logic)
- `crates/app/tests/dashboard_layout_tests.rs` — single_line_note_preview tests removed; DashboardCardViewModel import removed
- `crates/bugsweeper/src/card_json.rs` — note_preview field removed from CardDataJson

## Decisions Made

- **note-draft kept, not deleted** — Plan 04 reused the single existing `note-draft` declaration for the composer rather than adding a second one (compile error). The declaration stays; only the Row 5 references to it are gone. The Plan's pre-deletion check expected 2 matches but there was only 1 (correctly anticipated in Plan 04 SUMMARY). The single surviving `note-draft` is correctly used by the Plan 04 composer.
- **summary-clicked call in name-area click handler also removed** — The `root.summary-clicked()` call existed in the `name-area` TouchArea (which also calls `summary-popup.show()`). Since the callback declaration was removed, the call site had to go too. The `summary-popup.show()` call was preserved (summary popup still opens on name-area click).
- **single_line_note_preview removed** — Function had no callers after projection.rs cleanup, and the tests using it were specifically testing the removed preview feature.

## Deviations from Plan

### Auto-fixed Issues

**1. [Rule 1 - Bug] summary-clicked call in name-area touch handler also needed removal**
- **Found during:** Task 3 (first cargo check after card.slint edits)
- **Issue:** `root.summary-clicked()` at card.slint line ~171 remained in the `name-area` TouchArea's clicked handler. Slint reported "Element 'Rectangle' does not have a property 'summary-clicked'" because the callback declaration was already removed.
- **Fix:** Removed the `root.summary-clicked()` call; kept `summary-popup.show()` intact so the summary popup still opens.
- **Files modified:** `crates/app/ui/card.slint`
- **Committed in:** `3fe30c1`

**2. [Rule 1 - Bug] apply_optimistic_note_update call in on_card_post_note handler**
- **Found during:** Task 1 (cargo check after removing the function)
- **Issue:** `on_card_post_note` still called `apply_optimistic_note_update` which updated `note_preview` — both the function and the field were gone. The tuple destructure extracting `recipient_name` became unused too.
- **Fix:** Removed the optimistic update block and simplified the tuple destructure to extract only `cid`. The `apply_filters` call for popover refresh was preserved (correct D-09 behavior).
- **Files modified:** `crates/app/src/main.rs`
- **Committed in:** `3fe30c1`

**3. [Rule 1 - Bug] bugsweeper CardDataJson and dispatch entries**
- **Found during:** Task 1 search (grep for note_preview across all crates)
- **Issue:** `bugsweeper/src/card_json.rs` had `note_preview: String` field; `main.rs` had `card-save-note` and `card-summary` bugsweeper dispatch entries that invoked now-deleted callbacks
- **Fix:** Removed `note_preview` from `CardDataJson`; removed both stale dispatch arms from the bugsweeper invoke match block
- **Files modified:** `crates/bugsweeper/src/card_json.rs`, `crates/app/src/main.rs`
- **Committed in:** `3fe30c1`

**4. [Rule 1 - Bug] with_defaults call sites with varying indentation not caught by replace_all**
- **Found during:** Task 1 (multiple cargo check rounds)
- **Issue:** `with_defaults` was called with 6 args at 7 distinct call sites with three different indentation depths. Each `replace_all` pass only matched one indentation level.
- **Fix:** Three separate `replace_all` passes for 4-space, 8-space, and 12-space indentation patterns.
- **Files modified:** `crates/app/src/main.rs`
- **Committed in:** `3fe30c1`

---

**Total deviations:** 4 auto-fixed (all Rule 1 — bugs/missing consumers discovered during cleanup sweep)
**Impact on plan:** All fixes required for correct compilation. No scope change.

## Issues Encountered

- `cargo build` reports "Access is denied" when replacing running `app.exe` on Windows — not a compile error. `cargo check --workspace` confirms clean compilation.
- Plan's precondition check expected 2 `note-draft` matches but only 1 exists — expected per Plan 04 SUMMARY which documented the reuse decision explicitly.

## Known Stubs

None — Row 5 removed entirely; Row 4 product squares fully grown; no placeholder text or empty bindings introduced.

## Threat Flags

No new network endpoints, auth paths, or trust boundaries introduced. This plan is removal-only with layout adjustment.

## Self-Check

- `crates/app/ui/card.slint` — exists, Row 5 gone, Row 4 at 80px, 44px squares, note-preview/editing-note/save-note/summary-clicked absent
- `crates/app/ui/dashboard.slint` — exists, note-preview gone from CardData, card-save-note/card-summary gone
- `crates/app/src/dashboard/view_model.rs` — exists, note_preview field absent, single_line_note_preview absent
- `crates/app/src/main.rs` — exists, apply_optimistic_note_update absent, on_card_save_note absent
- Commit `3fe30c1` in git log
- `cargo check --workspace` exits 0

## Self-Check: PASSED

---
*Phase: 20.1.1-change-the-i-button-on-cards-to-show-a-scrollable-history-of*
*Completed: 2026-04-15*
