fix: sessions navigation, DM thread display, and DM thread delivery regression#8170
fix: sessions navigation, DM thread display, and DM thread delivery regression#8170tanushbhootra576 wants to merge 4 commits intoopenclaw:mainfrom
Conversation
| let threadLabel = ctx.ThreadLabel?.trim(); | ||
| // If DM topic and no label, generate a human-readable label | ||
| if (!threadLabel && ctx.MessageThreadId && ctx.chatType === "direct") { | ||
| threadLabel = `DM Topic #${ctx.MessageThreadId}`; |
There was a problem hiding this comment.
MsgContext appears to use ChatType (capitalized) and this function already normalizes via normalizeChatType(ctx.ChatType) above, but the new fallback label checks ctx.chatType === "direct". If chatType isn’t a real field on ctx, this condition will never be true and the DM-topic sessions will still have no unique displayName.
Consider switching the guard to the already-computed normalizedChatType / sessionEntry.chatType (or ctx.ChatType).
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/auto-reply/reply/session.ts
Line: 305:308
Comment:
`MsgContext` appears to use `ChatType` (capitalized) and this function already normalizes via `normalizeChatType(ctx.ChatType)` above, but the new fallback label checks `ctx.chatType === "direct"`. If `chatType` isn’t a real field on `ctx`, this condition will never be true and the DM-topic sessions will still have no unique displayName.
Consider switching the guard to the already-computed `normalizedChatType` / `sessionEntry.chatType` (or `ctx.ChatType`).
How can I resolve this? If you propose a fix, please make it concise.|
👋 This appears to duplicate PR #3368, which implements the same fix. Consider consolidating or closing one to avoid duplicate effort. |
|
I saw that #8170 was flagged as a duplicate of #3368. I submitted this because I noticed #3368 has [mention any issue, like 'merge conflicts' or 'missing tests']. My PR is synced with the latest changes in the web-ui and handles [any specific edge case you fixed]. Would love to get feedback on which approach the team prefers! @Glucksberg |
|
Duplicate of #3368; closing in favor of that PR.\n\nCLAWDINATOR FIELD REPORT // PR Closure I am CLAWDINATOR — cybernetic crustacean, maintainer triage bot for OpenClaw. I was sent from the future to keep this repo shipping clean code. Your PR has been reviewed. The effort is noted and respected. But the jungle is thick. OpenClaw receives ~25 PRs every hour, and the maintainers need to GET TO THE CHOPPA before the queue swallows them whole. This PR is unlikely to merge right now, so I'm clearing the landing zone. Don't sweat the close. Every PR teaches us something — CLAWDINATOR aggregates bugs, patterns, and feature demands across all contributions. The maintainers get briefed on that intel to target what gets built and what gets fixed next. Your code didn't merge, but your work made the project smarter. Want to get your change on the chopper? Report to #pr-thunderdome-dangerzone on Discord. READ THE TOPIC or risk immediate termination. Give the maintainers a clean briefing — what, why, and who it helps. Other br00tal routes: publish a skill on ClawHub (clawhub.ai), ship a CLI or other open‑source tool, or maintain your own fork of openclaw. All of those help the community ship. I'll be back. Stay br00tal. 🤖 This is an automated message from CLAWDINATOR, the OpenClaw maintainer bot.\n\n |

Summary
Fixes multiple related regressions in Sessions navigation and Telegram DM topic handling.
Problems Addressed
Root Causes
is_forum=true, causingmessage_thread_idto be dropped.Fixes
effectiveThreadId.Testing
Related Issues
Closes #3367
Greptile Overview
Greptile Summary
This PR addresses regressions around session/thread routing and Telegram DM topic handling.
src/telegram/bot-message-context.tsnow preservesmessage_thread_idfor private chats even whenis_forumis false, and uses the resolved thread id when sending typing indicators so bot actions stay in the originating DM topic/thread.src/auto-reply/reply/session.tsadds a fallback display label for DM topic sessions when noThreadLabelis provided, improving session list readability and uniqueness.Main concern: the new DM topic label fallback appears to key off
ctx.chatType(lowercase) rather than the existingctx.ChatType/normalized chat type, which may prevent the label from ever being applied.Confidence Score: 4/5
ctx.chatTypeinstead of the existingctx.ChatType/normalized chat type, which likely breaks the intended behavior.message_thread_idbehavior in src/telegram/bot-message-context.ts(2/5) Greptile learns from your feedback when you react with thumbs up/down!