Files
notify-bridge/plans/ux-notification-improvements/phase-1-entity-icons.md
T
alexei.dolgolyov 03c5c66eed feat: UX & notification improvements — icons, events, chat names, link validation, templates
- Show entity icons on all cards with fallback defaults (providers, trackers, targets, bots)
- Enrich EventLog with provider_name, tracker_name, assets_count; add DB migration
- Dashboard events: filtering (type, provider, search), sorting, pagination, dynamic page size
- Friendly chat names on telegram target cards (resolve from TelegramChat table)
- Test message button on bot chat items with locale-aware messages
- Album public link validation on tracker save with auto-create dialog
- Support albums without public links: conditional <a href> in templates
- Fetch shared links during poll, enrich events with public_url/protected_url
- Per-asset public_url in template context ({share_url}/photos/{asset_id})
- Common date/location detection: common_date + common_location context vars
- Dual date formats: date_format (datetime) + date_only_format (date only)
- Template clone button, HTML link rendering in template preview
- Fix Telegram asset download 401: pass x-api-key headers through client
- Fix provider external_url matching for API key scoping
- Fix event timestamp timezone (append Z suffix for UTC)
- Localize event filter controls, test messages (EN/RU)
- Template variable UI helpers updated with all new fields
- CLAUDE.md: template system sync rules documentation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:18:03 +03:00

2.1 KiB

Phase 1: Show Entity Icons on Cards

Status: Not Started Parent plan: PLAN.md Domain: frontend

Objective

Display the user-selected icon on every entity card (Providers, Trackers, Targets, Telegram Bots). Currently the IconPicker saves the icon but cards use hardcoded default icons.

Tasks

  • Task 1: Update provider cards in frontend/src/routes/providers/+page.svelte to show provider.icon (fallback to default server/cloud icon)
  • Task 2: Update tracker cards in frontend/src/routes/trackers/+page.svelte to show tracker.icon (fallback to default radar icon)
  • Task 3: Update target cards in frontend/src/routes/targets/+page.svelte to show target.icon (fallback to type-based default)
  • Task 4: Update bot cards in frontend/src/routes/telegram-bots/+page.svelte to show bot.icon (fallback to robot icon)
  • Task 5: Ensure icon rendering uses MdiIcon component with proper sizing consistent with existing card headers

Files to Modify/Create

  • frontend/src/routes/providers/+page.svelte — card header icon
  • frontend/src/routes/trackers/+page.svelte — card header icon
  • frontend/src/routes/targets/+page.svelte — card header icon
  • frontend/src/routes/telegram-bots/+page.svelte — card header icon

Acceptance Criteria

  • Each entity card displays the saved icon if set
  • Falls back to a sensible default icon per entity type when no icon is saved
  • Icon styling is consistent across all card types
  • No regressions in existing card layout or functionality

Notes

  • Icons are stored as MDI path constant names (e.g., the string key from @mdi/js)
  • The MdiIcon component already exists in frontend/src/lib/components/MdiIcon.svelte
  • IconPicker component already handles icon selection and stores the value
  • Need to check exactly how icon values are stored (full path data vs key name) to render correctly

Review Checklist

  • All tasks completed
  • Code follows project conventions
  • No unintended side effects
  • Build passes
  • Tests pass (new + existing)

Handoff to Next Phase