Files
MichilisandClaude Opus 5.5 3c153af97f Phase 8: widgets and polish
- Live job card widget (progress bar, in-widget cancel via widget_query)
  and live invoice widget (QR drawn from a bitmap, countdown, paid state),
  Bot API 10.4 sendWidget, private chats only
- Automatic fallback to the ordinary message when sendWidget fails, with
  a breaker that pauses widgets after repeated failures or on servers
  without the method; TELEGRAM_WIDGETS
- Prometheus metrics on the core (/metrics) and on every worker: queue
  depth and wait, slots, heartbeats, job outcomes, errors per site,
  deliveries, cache, invoices, Lightning, ledger check, widgets
- Example Prometheus config and alert rules, Caddyfile, dashboard notes
- Load test: cmd/loadtest and deploy/loadtest (make loadtest)
- Browser check of the widgets' HTML, including decoding a drawn QR
- docs/DEPLOY.md (production in under an hour) and docs/MONITORING.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:24:36 +00:00

17 lines
617 B
SQL

-- +goose Up
-- Messages that are HTML widgets (sendWidget) rather than plain messages.
-- A status message or an invoice message is a widget when it has a row
-- here; its state is then changed with editMessageWidgetData.
CREATE TABLE widget_messages (
chat_id BIGINT NOT NULL,
message_id BIGINT NOT NULL,
kind TEXT NOT NULL, -- job or invoice
ref_id TEXT NOT NULL, -- the delivery or the purchase
created_at BIGINT NOT NULL,
PRIMARY KEY (chat_id, message_id)
);
CREATE INDEX widget_messages_ref ON widget_messages (kind, ref_id);
-- +goose Down
DROP TABLE widget_messages;