Repository navigation
refactor(telegram): share HTML text escaping - #146936
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 6:42 AM ET / 10:42 UTC. ClawSweeper reviewWhat this changesConsolidates Telegram HTML text escaping into the existing encoder while preserving separate attribute quote escaping and plain-text fallback output. Merge readiness✅ Ready for maintainer review No actionable defect found. This is a coherent, behavior-preserving cleanup that remains absent from current main; the member-authored, protected PR should remain open for normal landing. Priority: P3 Review scores
Verification
How this fits togetherThe Telegram formatter converts outgoing Markdown and HTML into Telegram-compatible messages. Its escaping also preserves literal text when formatted messages need a plain-text fallback. flowchart TD
A[Outgoing Markdown or HTML] --> B[Telegram formatter]
B --> C[Shared text escaping]
C --> D[Attribute quote escaping]
C --> E[Formatted message]
D --> E
E --> F[Plain-text fallback]
E --> G[Telegram delivery]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -21. Total -21 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one Telegram text encoder, retain attribute-specific quote escaping, and preserve the existing formatter and fallback contracts. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR claims no behavior defect or visible change; source inspection supports equivalent string transformations. Is this the best way to solve the issue? Yes. Reusing the existing encoder removes duplication without introducing another owner or changing the attribute and fallback contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f3bdcc10d628. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* temp/pr-137049: (110 commits) improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021) fix(test): avoid settings lock writer startup timeouts (#147029) fix(update): correct backup guidance and cover incident regressions (#147023) refactor(gateway): share connection lifecycle across transports (#145950) refactor(telegram): share HTML text escaping (#146936) perf(build): reduce disk use in UI performance checks (#146687) refactor(memory-wiki): share freshness result construction (#146935) improve(gateway): use metadata projection for presence (#146817) test(agents): reuse complete Responses model fixtures (#147015) fix(sessions): align the reclamation-memory test with the archive session owner (#147028) refactor(terminal): simplify copy-sensitive token checks (#146934) refactor(media): remove duplicate spaced path fallback (#146933) refactor(cli): reuse command-group names (#146893) improve(plugins): reduce JavaScript generation capture work (#146993) test: align plugin fixtures with current runtime contracts (#147000) refactor(browser): separate session tab tracking from cleanup (#146973) fix(tests): make systemd clock fixtures private (#146990) fix(linux): retire sleep guards when logind disconnects (#146046) refactor(matrix): share draft fallback delivery (#144840) fix(sessions): preserve cross-agent replies after reload (#146799) ...
* commit '0ac8a700e43efceef73d92fe8e50b185819e38ad': (27 commits) test(acpx): prove targeted turn cancellation (#137049) fix(ci): honor realtime meeting live-test opt-in (#147044) improve: reduce heartbeat enrollment work for large fleets (#147055) fix(gateway): install despite stale Linux session bus addresses (#146569) chore(i18n): refresh native locales (#147025) fix: avoid Gateway reinstalls when macOS service inspection is inconclusive (#146880) fix(pairing): QR setup rejects trusted-proxy gateways without a shared secret (#147036) fix(update): bound activation and accept slow Windows identity reads (#147019) perf(accounts): avoid materializing avatars for owner checks (#147032) improve(status): report external and ArrayBuffer memory (#141902) fix(update): preserve linked plugins during post-core sync (#147009) fix(channels): keep replies working after hot config reloads (#147001) refactor(gateway): defer worker transcript runtime loading (#143495) improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021) fix(test): avoid settings lock writer startup timeouts (#147029) fix(update): correct backup guidance and cover incident regressions (#147023) refactor(gateway): share connection lifecycle across transports (#145950) refactor(telegram): share HTML text escaping (#146936) perf(build): reduce disk use in UI performance checks (#146687) refactor(memory-wiki): share freshness result construction (#146935) ... # Conflicts: # src/config/sessions/session-accessor.sqlite-reclamation-memory.test.ts
What Problem This Solves
Telegram formatting has two private escape functions that duplicate the existing HTML text encoder.
User Impact
No user-visible behavior changes.
Why This Change Was Made
Route their callers to the existing encoder and keep attribute quote escaping separate. Production changes: −21 lines; tests unchanged.
Evidence
03a93ad0ddfc0cfa8a61e6cc2930bee27402cdb6. The covering job passed all 65 format tests and all 44 Markdown-wrapping tests. Type/lint checks and pinned formatting also passed.