Skip to content

Sessions navigation fix + DM thread display + DM thread delivery regression #3367

@Lukavyi

Description

@Lukavyi

Problem 1: Navigation

Clicking a session link in the Sessions tab navigates to the Main session instead of the clicked session.

Steps to reproduce:

  1. Open Sessions tab in Control UI
  2. Click on any non-main session (e.g., a Telegram DM topic)
  3. Expected: opens that session's chat
  4. Actual: opens Main session

Root cause: syncTabWithLocation() is called before applySettingsFromUrl(), overwriting the URL ?session= param with the old localStorage value.

Problem 2: Display

Telegram DM topic sessions all appear with the same display name — impossible to distinguish between them.

Problem 3: DM Thread Delivery (regression)

After commit 9154971 (fix(telegram): ignore message_thread_id for non-forum group sessions), bot replies in DM threads go to General instead of the originating thread.

Steps to reproduce:

  1. Enable Topics in a DM with the bot (requires Telegram Premium)
  2. Send a message in a DM thread/topic
  3. Bot replies in General instead of the thread

Root cause: resolveTelegramForumThreadId() returns undefined when is_forum is false. Telegram Bot API never sets is_forum=true for private chats (only supergroups). The returned context.resolvedThreadId is used by bot-message-dispatch.ts for draft streaming, typing indicators, and reply delivery — all become undefined for DM threads.

Fix

PR #3368 addresses all three issues:

  1. Call applySettingsFromUrl() before syncTabWithLocation()
  2. Set ThreadLabel for DM topic sessions
  3. Introduce effectiveThreadId = isGroup ? resolvedThreadId : messageThreadId for correct outbound delivery

Metadata

Metadata

Assignees

No one assigned

    Labels

    app: web-uiApp: web-uibugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions