#4878: fix: string/type handling and API fixes (#4537, #4380, #4373, #4547, #4629)
channel: nostr
cli
agents
Cluster:
Session Management and Fixes
## 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
#13881: fix: Address Greptile feedback - test isolation and channel resolution
by trevorgordon981 · 2026-02-11
82.6%
#4749: fix: handle string thread IDs in queue drain for Slack
by nvonpentz · 2026-01-30
81.3%
#21271: fix(commands): pass channel/capabilities/shell/os to runtime in com...
by evansantos · 2026-02-19
80.9%
#4562: fix(nostr): use dispatchReplyFromConfig for inbound messages
by Abhijrathod · 2026-01-30
80.7%
#2917: Slack: fix thread context + prevent reply spillover
by SocialNerd42069 · 2026-01-27
79.9%
#11898: Fix for issue #11895
by rerickardjr · 2026-02-08
79.9%
#11194: fix(slack): queue drain drops string thread_ts — replies leak to ma...
by Lukavyi · 2026-02-07
79.4%
#21463: fix(discord): prevent WebSocket death spiral + fix numeric channel ID…
by akropp · 2026-02-20
79.3%
#23804: fix(slack): preserve string thread context in queue + DM route
by vincentkoc · 2026-02-22
78.9%
#8024: fix(slack): resolve channel names via directory for cross-account m...
by emma-digital-assistant · 2026-02-03
78.9%