← Back to PRs

#4878: fix: string/type handling and API fixes (#4537, #4380, #4373, #4547, #4629)

by lailoo open 2026-01-30 20:20 View on GitHub →
channel: nostr cli agents
## Summary This PR fixes 5 issues related to string/type handling and API usage: ### Fixes 1. **#4537 Signal Group ID case sensitivity** - File: `src/channels/plugins/normalize/signal.ts` - Preserve case for group ID since base64 is case-sensitive 2. **#4380 Slack thread_ts typeof check** - File: `src/auto-reply/reply/queue/drain.ts` - Use `!= null` instead of `typeof === 'number'` for thread_ts (Slack uses strings) 3. **#4373 cron list job.id crash** - File: `src/cli/cron-cli/shared.ts` - Handle `jobId/id` field name variation in cron list 4. **#4547 Nostr handleInboundMessage not a function** - File: `extensions/nostr/src/channel.ts` - Use `dispatchReplyFromConfig` instead of non-existent `handleInboundMessage` 5. **#4629 Include day of week in date/time injection** - File: `src/agents/system-prompt.ts` - Include full date with day of week in system prompt ### Testing - All existing tests pass - Build succeeds Fixes #4537, #4380, #4373, #4547, #4629 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR addresses several small but user-facing correctness issues across channels/CLI: - Signal target normalization now preserves the case of `group:` IDs so base64 identifiers aren’t corrupted. - Follow-up drain routing treats `originatingThreadId` as “present” when it’s non-null, accommodating Slack’s string `thread_ts`. - Cron list output tolerates gateways returning `jobId` instead of `id`. - The Nostr extension replaces a call to a non-existent inbound handler by wiring into the core routing/session/envelope pipeline and using `dispatchReplyFromConfig` for replies. - Agent system prompts now include the full date (with weekday) when a user timezone is available. Overall these changes fit existing patterns: normalize/route/dispatch logic is centralized in runtime helpers, while channel adapters translate provider events into a standard inbound context and delegate reply formatting/delivery to the core runtime. <h3>Confidence Score: 4/5</h3> - This PR is likely safe to merge; changes are localized and mostly straightforward correctness fixes. - Most edits are small type/format fixes. The main risk is behavioral drift in the Nostr inbound path due to config caching and in follow-up drain thread-id presence semantics; neither looks immediately breaking but both merit a quick sanity check in environments where hot reload or sentinel thread IDs are used. - extensions/nostr/src/channel.ts; src/auto-reply/reply/queue/drain.ts <!-- greptile_other_comments_section --> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs