---
phase: 08-discord-enrichment-and-external-jumps
plan: "03"
subsystem: ui
tags: [rust, slint, callbacks, discord, shopify, clipboard, seed-data, uat-fixes]

# Dependency graph
requires:
  - phase: 08-01
    provides: external.rs helpers (open_discord_dm, open_shopify_url, copy_to_clipboard, build_shopify_customer_url, build_shopify_order_url) re-exported from dashboard/mod.rs
  - phase: 08-02
    provides: 4 DashboardWindow callbacks (on_card_open_discord_dm, on_card_copy_email, on_card_open_shopify_customer, on_card_open_shopify_order) and CardData struct with enrichment fields

provides:
  - 4 Rust callback handlers wired in main.rs connecting Slint UI to external action helpers
  - Seed data with Alice real Discord ID (134592817623334912) and username (@celysus)
  - card_data_to_filter_model() populates enrichment fields
  - build_recipient_tiles() populates contact_secondary from card lookup
  - Copy email toast uses 1500ms (matches Esc toast brevity, not 5000ms archive toast)
  - View GitHub removed from ellipsis menu (scoped out of milestone 1.0)
  - Separator margins added (5px above/below each separator line)

affects: [future-phases-reading-real-config]

# Tech tracking
tech-stack:
  added: []
  patterns: [callback-wiring pattern mirrors existing archive callbacks (weak ref + show_toast Rc clone), inline toast for clipboard copy with short 1500ms timer, transparent separator wrapper for Slint padding]

key-files:
  created: []
  modified:
    - crates/app/src/main.rs
    - crates/app/ui/card.slint
    - crates/app/ui/dashboard.slint

key-decisions:
  - "View GitHub removed from ellipsis menu — scoped out of milestone 1.0 per user direction"
  - "github_profile_url retained in domain layer (DashboardCardViewModel, projection) for future GitHub Project integration"
  - "Copy Email toast uses 1500ms inline timer — does not reuse show_archive_toast (5000ms); urgency differs"
  - "shopify_shop_domain hardcoded as 'teststore' stub — will be read from config file in a future phase"
  - "Separator margin: transparent 11px wrapper with inner 1px Rectangle at y=5px (5+1+5 layout)"

patterns-established:
  - "External action callbacks: weak-ref upgrade + read field from Slint model + early-return on empty + call helper + show_toast on error"
  - "Short clipboard toast (1500ms) inlined directly rather than delegating to show_archive_toast Rc"

requirements-completed: [CARD-01, CARD-02, CARD-08, CARD-09, DSC-03, DSC-04]

# Metrics
duration: ~35 min (10 min Task 1 + 25 min UAT fix-up)
completed: 2026-03-13
---

# Phase 8 Plan 03: Callback Wiring, Seed Data, and UAT Fix-up Summary

**4 external action callbacks wired in main.rs (Discord DM, Copy Email, View Customer, View Order); View GitHub removed (scoped out); separator margins added; Alice seed data updated with real Discord stand-in ID**

## Performance

- **Duration:** ~35 min total (10 min Task 1 + 25 min UAT fix-up continuation)
- **Started:** 2026-03-12
- **Completed:** 2026-03-13
- **Tasks:** 2 of 2 complete
- **Files modified:** 3

## Accomplishments

- Wired 4 DashboardWindow callbacks (Discord DM, Copy Email, View Shopify Customer, View Shopify Order) to external.rs helpers using the weak-ref/show_toast pattern
- Updated seed_cards() so Alice has real Discord stand-in data (ID: 134592817623334912, username: @celysus) with Shopify customer + order URLs; Bob has email + Shopify customer; Carol has no contact data
- Updated card_data_to_filter_model() to map enrichment fields (discord_user_id, contact_secondary, recipient_initial, shopify_customer_url, shopify_order_url, email)
- Updated build_recipient_tiles() to populate contact_secondary from first matching card
- Copy Email uses 1500ms inline toast (not the 5000ms archive toast Rc)
- Removed View GitHub from ellipsis menu — feature was scoped out of milestone 1.0 requirements
- Added 5px margin above and below each menu separator via transparent wrapper Rectangle pattern

## Task Commits

| Task | Description | Commit |
|------|-------------|--------|
| Task 1 | Wire callbacks, construct URLs from config, update seed data | cdc3bda |
| UAT Fix 1 | Update Alice seed data to real Discord user ID and username | e5e1d2d |
| UAT Fix 2 | Remove View GitHub from ellipsis menu (scoped out in milestone 1.0) | e36565a |
| UAT Fix 3 | Add 5px margin above and below menu separators | ac6831a |

## Files Created/Modified

- `crates/app/src/main.rs` — callbacks wired, seed data updated, github_profile_url removed from mapping
- `crates/app/ui/card.slint` — View GitHub block removed, separator margin wrappers added
- `crates/app/ui/dashboard.slint` — github-profile-url field and card-open-github-profile callback removed

## Decisions Made

- View GitHub removed from UI entirely; `github_profile_url` retained in domain layer for future GitHub Project integration
- Separator margin: 11px transparent wrapper (5+1+5) using inner Rectangle at y=5px — keeps Slint layout explicit without VerticalLayout spacing workarounds
- Alice Discord seed data: ID 134592817623334912, username @celysus (real stand-ins for testing)
- Copy Email toast: 1500ms inline timer (same brevity as Esc toast), not delegating to show_archive_toast Rc (5000ms)

## Deviations from Plan

### UAT Feedback Fixes (post-checkpoint)

**Fix 1: Discord DM seed data**
- Seed used placeholder ID `"123456789"` — Discord DM button opened nothing recognizable
- Updated to real stand-in: ID `"134592817623334912"`, username `"@celysus"`
- Rule 1 (bug fix)

**Fix 2: Remove View GitHub**
- "View GitHub" was wired to open a user GitHub profile URL, but the feature intent was to link to a GitHub Project row — which was scoped out of milestone 1.0
- Removed from all layers: Slint struct, menu item, callback declaration, callback wiring
- Domain layer field retained for future use
- User-directed scope correction

**Fix 3: Separator margins**
- No visible spacing between separator line and adjacent menu buttons
- Added 5px padding above and below using transparent wrapper Rectangle containing inner 1px line
- Rule 2 (UI correctness)

## Self-Check

- [x] All 3 fix commits exist: e5e1d2d, e36565a, ac6831a
- [x] cargo check -p app passes
- [x] cargo test --workspace passes
- [x] SUMMARY.md created at correct path

## Self-Check: PASSED
