Skip to content

Commit 34db612

Browse files
authored
0.16.1: disconnected queue status hotfix
Merge dev hotfix release 0.16.1.
2 parents 29cc67c + 1136cdc commit 34db612

5 files changed

Lines changed: 39 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Unreleased
44

5+
No open changes.
6+
7+
## 0.16.1: Disconnected Queue Status Hotfix
8+
9+
- `[Status]` Keep showing the local Telegram queue count in the TUI status bar when polling ownership moves to another Pi instance and the bridge reads as disconnected. Impact: the singleton Telegram control lock can move without hiding pending session-local Telegram prompt work from the original agent.
10+
511
## 0.16.0: Telegram Extension Commands
612

713
- `[API]` Added `registerTelegramCommand()` on the public `/commands` subpath so companion extensions can explicitly provide Telegram-native slash commands without adding workflow-specific commands to core. Built-in bridge commands stay reserved, extension command names must be Bot API safe, duplicate extension names are rejected, commands stay hidden unless `showInMenu` is enabled, visible commands must provide an emoji used in `/start` help and Bot API descriptions, extension-command descriptions are shown in `/start`, visible extension commands are inserted after `/compact` before queue-control commands, prompt-template commands remain separated in `/start`, handler failures are isolated with runtime diagnostics, and routing precedence is built-ins → extension commands → prompt-template aliases. Impact: commands such as fresh-session controls can live in companion extensions while `pi-telegram` remains a lightweight Telegram shell.

lib/status.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -529,15 +529,15 @@ export function buildTelegramStatusBarText(
529529
if (state.error) {
530530
return `${label} ${theme.fg("error", "error")} ${theme.fg("muted", state.error)}`;
531531
}
532-
if (!state.hasBotToken)
533-
return `${label} ${theme.fg("muted", "not configured")}`;
534-
if (!state.pollingActive)
535-
return `${label} ${theme.fg("muted", "disconnected")}`;
536-
if (!state.paired)
537-
return `${label} ${theme.fg("warning", "awaiting pairing")}`;
538532
const queued = state.queuedStatus
539533
? theme.fg("success", state.queuedStatus)
540534
: "";
535+
if (!state.hasBotToken)
536+
return `${label} ${theme.fg("muted", "not configured")}${queued}`;
537+
if (!state.pollingActive)
538+
return `${label} ${theme.fg("muted", "disconnected")}${queued}`;
539+
if (!state.paired)
540+
return `${label} ${theme.fg("warning", "awaiting pairing")}${queued}`;
541541
if (state.compactionInProgress) {
542542
return `${label} ${theme.fg("warning", "compacting")}${queued}`;
543543
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@llblab/pi-telegram",
3-
"version": "0.16.0",
3+
"version": "0.16.1",
44
"private": false,
55
"publishConfig": {
66
"access": "public"

tests/status.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,30 @@ test("Status bar text renders bridge connection and queue states", () => {
8383
}),
8484
"<accent>telegram</accent> <warning>compacting</warning>",
8585
);
86+
assert.equal(
87+
buildTelegramStatusBarText(theme, {
88+
hasBotToken: true,
89+
pollingActive: false,
90+
paired: true,
91+
compactionInProgress: false,
92+
processing: true,
93+
processingStatus: "queued",
94+
queuedStatus: " +2",
95+
}),
96+
"<accent>telegram</accent> <muted>disconnected</muted><success> +2</success>",
97+
);
98+
assert.equal(
99+
buildTelegramStatusBarText(theme, {
100+
hasBotToken: true,
101+
pollingActive: true,
102+
paired: false,
103+
compactionInProgress: false,
104+
processing: true,
105+
processingStatus: "queued",
106+
queuedStatus: " +1",
107+
}),
108+
"<accent>telegram</accent> <warning>awaiting pairing</warning><success> +1</success>",
109+
);
86110
assert.equal(
87111
buildTelegramStatusBarText(theme, {
88112
hasBotToken: true,

0 commit comments

Comments
 (0)