The full 3-part #37 spec (auto-link by code · repeating shift reminders · the Admin-vs-Shop notification taxonomy). Verified on lumiere-coffee.nixtech.app.
b4fc18d + 77fd451, backend migration applied to prod.
tnt-tg-XXXXXX / shop-tg-XXXXXX code (backfilled for every tenant + shop). Add @nix_cafe_bot to a group and type
/setadmin <code> (Main Admin group) or /setshop <code> (Shop group) — the bot links it, no chat ID needed. Plus /status, duplicate/invalid handling, and auto-deactivate when the bot is removed (my_chat_member).
| A1 ✓ | Notifications page shows the tenant /setadmin code + shop codes (copyable). |
| A2 ✓ | Webhook deployed + secret-gated (401 without the Telegram secret token). |
| C1 ✓ | Shop-aware routing: a register_opened event reaches both the Shop group AND the Main Admin group. |
| C2 ✓ | A different shop’s event does NOT leak to this Shop group (only the tenant-wide Admin matches). |
| B1 ✓ | Repeat-dedup upsert is atomic: first send → fires, too-soon → skips, past repeat_every → fires again. |
| B2 ✓ | Shift Management page renders + saves Remind after / Repeat every (DB-verified 3 / 9 min). |
| C3 ✓ | End-to-end: opening a real shift fired register_opened to both seeded groups (Shop + Admin), logged in telegram_send_log. |
| — ✓ | No 5xx across the run · 51/51 regression. |
/setadmin tnt-tg-… code and each shop’s /setshop shop-tg-… code with copy buttons — no manual chat-ID paste. Click to zoom.