563716fa76
- Add $state-based entity cache layer with 30s TTL, request deduplication, and local mutation helpers (entity-cache.svelte.ts + caches.svelte.ts) - Wire all 10 page components to use shared caches for cross-page data - Add slide animation for nav tree expand/collapse with rotating chevron - Remove aggregate count badges from container nav nodes (keep on leaves) - Convert Targets from flat leaf to group with per-type children (Telegram, Webhook, Email, Discord, Slack, ntfy, Matrix) - Add URL-based type filtering on Targets page with per-type descriptions - Add Bots group children for Email and Matrix alongside Telegram - Tab-based routing for bots page (?tab=telegram/email/matrix) - Add per-type target counts and email/matrix bot counts to /status/counts - Split CLAUDE.md into focused context files under .claude/docs/ - Fix .gitignore: scope lib/ to root, allow .claude/docs/ tracking - Clear all caches on logout - Reset form state when switching target type tabs
1.4 KiB
1.4 KiB
Template System Sync Rules
IMPORTANT: When adding or changing template context variables, you MUST update ALL of these in sync:
packages/core/.../templates/context.py—build_template_context()where variables are computedpackages/server/.../api/template_configs.py—_SAMPLE_CONTEXTdict (for preview rendering)packages/server/.../api/template_configs.py—get_template_variables()endpoint (event_vars,asset_fields,album_fields,scheduled_vars, per-slot variable dicts)packages/core/.../templates/defaults/{en,ru}/*.jinja2— default template files using the new variablespackages/core/.../providers/immich/provider.py—IMMICH_VARIABLESlist (provider-specific variable definitions)packages/server/.../api/command_template_configs.py—get_command_variables()endpoint (for command response templates)
IMPORTANT: Variable reference endpoints MUST document child/nested properties, not only top-level variables. When a variable is a list of dicts (e.g. assets, albums, events, commands), the endpoint MUST include a corresponding *_fields dict describing the child properties (e.g. asset_fields: {"id": "...", "filename": "..."}) so the frontend can show them (e.g. {{ asset.id }}, {{ album.name }}). Never list only "assets": "List of asset dicts" — always specify what fields each dict contains.