Phase 10: Telegram bot commands + Phase 11: Snackbar notifications
All checks were successful
Validate / Hassfest (push) Successful in 3s

Phase 10 — Telegram Bot Commands:
- Add commands_config JSON field to TelegramBot model (enabled cmds,
  default count, response mode, rate limits, locale)
- Create command handler with 14 commands: /status, /albums, /events,
  /summary, /latest, /memory, /random, /search, /find, /person,
  /place, /favorites, /people, /help
- Add search_smart, search_metadata, search_by_person, get_random,
  download_asset, get_asset_thumbnail to ImmichClient
- Auto-register commands with Telegram setMyCommands API (EN+RU)
- Rate limiting per chat per command category
- Media mode: download thumbnails and send as photos to Telegram
- Webhook handler routes /commands before falling through to AI chat
- Frontend: expandable Commands section per bot with checkboxes,
  count/mode/locale settings, rate limit inputs, sync button

Phase 11 — Snackbar Notifications:
- Create snackbar store (snackbar.svelte.ts) with $state rune
- Create Snackbar component with fly/fade transitions, typed colors
- Mount globally in +layout.svelte
- Replace all alert() calls with typed snackbar notifications
- Add success snacks to all CRUD operations across all pages
- 4 types: success (3s), error (5s), info (3s), warning (4s)
- Max 3 visible, auto-dismiss, manual dismiss via X button

Both: Add ~30 i18n keys (EN+RU) for commands UI and snack messages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 21:39:05 +03:00
parent ffce3ee337
commit e6ff0a423a
20 changed files with 1384 additions and 70 deletions

View File

@@ -182,7 +182,19 @@
"group": "Group",
"supergroup": "Supergroup",
"channel": "Channel",
"confirmDelete": "Delete this bot?"
"confirmDelete": "Delete this bot?",
"commands": "Commands",
"enabledCommands": "Enabled Commands",
"defaultCount": "Default result count",
"responseMode": "Response mode",
"modeMedia": "Media (send photos)",
"modeText": "Text (send links)",
"botLocale": "Bot language",
"rateLimits": "Rate Limits",
"rateSearch": "Search cooldown",
"rateFind": "Find cooldown",
"rateDefault": "Default cooldown",
"syncCommands": "Sync to Telegram"
},
"trackingConfig": {
"title": "Tracking Configs",
@@ -344,7 +356,36 @@
"maxAssetSize": "Skip assets larger than this size in MB. Telegram limits files to 50 MB.",
"trackingConfig": "Controls which events trigger notifications and how assets are filtered.",
"templateConfig": "Controls the message format. Uses default templates if not set.",
"scanInterval": "How often to poll the Immich server for changes, in seconds. Lower = faster detection but more API calls."
"scanInterval": "How often to poll the Immich server for changes, in seconds. Lower = faster detection but more API calls.",
"defaultCount": "How many results to return when the user doesn't specify a count (1-20).",
"responseMode": "Media: send actual photos. Text: send filenames/links only. Media mode uses more bandwidth.",
"botLocale": "Language for command descriptions in Telegram's menu and bot response messages.",
"rateLimits": "Cooldown in seconds between uses of each command category per chat. 0 = no limit."
},
"snack": {
"serverSaved": "Server saved",
"serverDeleted": "Server deleted",
"trackerCreated": "Tracker created",
"trackerUpdated": "Tracker updated",
"trackerDeleted": "Tracker deleted",
"trackerPaused": "Tracker paused",
"trackerResumed": "Tracker resumed",
"targetSaved": "Target saved",
"targetDeleted": "Target deleted",
"targetTestSent": "Test notification sent",
"templateSaved": "Template config saved",
"templateDeleted": "Template config deleted",
"trackingConfigSaved": "Tracking config saved",
"trackingConfigDeleted": "Tracking config deleted",
"botRegistered": "Bot registered",
"botDeleted": "Bot deleted",
"userCreated": "User created",
"userDeleted": "User deleted",
"passwordChanged": "Password changed",
"copied": "Copied to clipboard",
"genericError": "Something went wrong",
"commandsSaved": "Commands config saved",
"commandsSynced": "Commands synced to Telegram"
},
"common": {
"loading": "Loading...",