feat: human error states, operator toasts and a queue/origin view in the omp UI
- classify transport and API failures into a short state with the next step - count undelivered messages and show them next to the sent counter - toast on owner paired, connection recovered and reply not delivered (throttled) - second status line previews the next queued turns - host spinner names the Telegram prompt while its turn runs - sanitize every Telegram-controlled string that reaches the widget
This commit is contained in:
1 parent
9435ff709b
commit
057281a3bb
19 files changed
+862
-22
No files matched your search
@@ -48,6 +48,7 @@ import {
|
||||
executeTelegramControlItemRuntime,
|
||||
executeTelegramQueueDispatchPlan,
|
||||
formatQueuedTelegramItemsStatus,
|
||||
formatQueuedTelegramItemsPreview,
|
||||
getNextTelegramToolExecutionCount,
|
||||
getTelegramQueueItemAdmissionMode,
|
||||
getTelegramQueueLaneContract,
|
||||
@@ -405,6 +406,42 @@ test("Control-lane items sort before priority and default prompt items", () => {
|
||||
);
|
||||
});
|
||||
|
||||
test("Queued item preview lists summaries in dispatch order and skips empty ones", () => {
|
||||
const defaultPrompt: TelegramQueueItem = createQueueTestPromptTurn({
|
||||
queueOrder: 10,
|
||||
queueLane: "default",
|
||||
laneOrder: 0,
|
||||
statusSummary: "default",
|
||||
});
|
||||
const emptyPrompt: TelegramQueueItem = createQueueTestPromptTurn({
|
||||
queueOrder: 13,
|
||||
queueLane: "default",
|
||||
laneOrder: 1,
|
||||
statusSummary: " ",
|
||||
});
|
||||
const priorityPrompt: TelegramQueueItem = createQueueTestPromptTurn({
|
||||
queueOrder: 11,
|
||||
queueLane: "priority",
|
||||
laneOrder: 0,
|
||||
statusSummary: "priority",
|
||||
});
|
||||
const controlItem: TelegramQueueItem = createQueueTestControlItem({
|
||||
queueOrder: 12,
|
||||
statusSummary: "control",
|
||||
});
|
||||
const stored = [defaultPrompt, emptyPrompt, controlItem, priorityPrompt];
|
||||
assert.deepEqual(formatQueuedTelegramItemsPreview(stored), [
|
||||
"control",
|
||||
"priority",
|
||||
"default",
|
||||
]);
|
||||
assert.deepEqual(
|
||||
stored.map((item) => item.statusSummary),
|
||||
["default", " ", "control", "priority"],
|
||||
);
|
||||
assert.deepEqual(formatQueuedTelegramItemsPreview([]), []);
|
||||
});
|
||||
|
||||
test("Queue mutation helpers remove prompt items by Telegram message id", () => {
|
||||
const promptItem: TelegramQueueItem = createQueueTestPromptTurn({
|
||||
replyToMessageId: 1,
|
||||
|
||||
Reference in new issue
Block a user