Skip to content

Let a Telegram connection mirror only the first and last text of a turn - #24

Merged
neotechnet merged 2 commits into
stack/installed-0.3.5from
feat/telegram-notify-dial
Nov 12, 2026
Merged

neotechnet merged 2 commits into
stack/installed-0.3.5from
feat/telegram-notify-dial

Conversation

@neotechnet

Copy link
Copy Markdown
Owner

Job DSB-IM-FILTER-20261112. Steve's answer (11-12, 1:47 PM ET): bookends plus a per-bot dial, for Telegram only. The app chat keeps showing everything.

What changes

  • The Telegram platform gets a notify field, "Messages", with three options: bookends (First and last, the default), all (Everything, today's behaviour) and cards (Cards only). An unset value resolves to bookends, so existing Telegram connections go quiet on install.
  • bookends: a mirrored turn sends its first and last text block when the turn ends. A turn with one block sends one message.
  • all: every text block goes out as it arrives, as before.
  • cards: no turn text.
  • Views, question cards, approvals and secret asks are never filtered under any setting. Room lines are untouched.
  • Platforms that do not declare notify keep sending everything.

The bookends hold lives in memory only and is cleared at turn/start, so a turn that never ended cannot carry its text into the next one. A restart clears it too. On this path displayItems is called without the session, so items carry no turn; the hold keys on the session's own turn/start and turn/end events instead.

Files

  • src/host/im/index.js: the outbound filter.
  • src/shared/im-platforms.js: the field.
  • client.js: rebuilt. The diff is only that platform entry.
  • test/im.test.js: tests.

Tests

  • 7 new IM tests: bookends sends first and last and drops the middle; a single-block turn sends once; a turn that never ended does not leak; all is unchanged; cards sends no turn text; a card opened mid-turn still goes out under bookends; the same under cards. 3 of them fail on the unpatched source.
  • 2 existing outbound tests now set notify: 'all', because they assert per-block sending.
  • IM tests: 95 of 95 pass.
  • Full suite: 2298 tests, 2270 pass, 6 fail, 22 skipped. All 6 are known: connectors-gateway, queued-deliveries, link.js, env sanitization, phone, and the idle-pause flake.
  • build-client --check: exit 0.
  • Lint: 0 errors.

Not covered

  • The dial shows only on the add-connection form. Existing connections have no field editor, so switching one needs im-update with fields.notify.
  • No live Telegram proof yet.
  • The new labels are English only.

Base: stack/installed-0.3.5.

Telegram got every text block of every mirrored turn, including narration Steve has no use for. A notify setting on the Telegram platform picks bookends (the default), all (the old behaviour) or cards (no turn text). Cards, questions, views and approvals are never filtered. client.js still needs a rebuild; not pushed.
The settings page draws the IM add form from src/shared/im-platforms.js, which client.js bundles.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T20:59:58.214564Z 155aab7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@neotechnet
neotechnet merged commit d44d2d9 into stack/installed-0.3.5 Nov 12, 2026
26 of 28 checks passed
@neotechnet
neotechnet deleted the feat/telegram-notify-dial branch November 12, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant