openclaw - 💡(How to fix) Fix [Feature Request]: Show human-readable Telegram forum topic names in Control UI session selector [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#53701Fetched 2026-04-08 01:24:37
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Fix Action

Fix / Workaround

Current Workaround

Code Example

telegram: Nikki HQ / ⚙️Cron (topic:5)
telegram: Nikki HQ / 📱SNS (topic:3)
telegram: Nikki HQ / 💻Dev (topic:4)

---

{
  channels: {
    telegram: {
      groups: {
        "-1003874130048": {
          topics: {
            "5": { name: "⚙️Cron", requireMention: false },
            "3": { name: "📱SNS", requireMention: false }
          }
        }
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Problem

The Control UI session/channel dropdown shows raw session keys like telegram:group:-1003874130048:topic:5 — but users can't tell at a glance which topic that is (e.g. ⚙️Cron, 📱SNS, 💻Dev).

Telegram's Bot API already knows the topic names (they're set when creating forum topics). The Control UI has no way to surface them, making it hard to pick the right session when sending messages or switching context.

Expected Behavior

The session selector should show something like:

telegram: Nikki HQ / ⚙️Cron (topic:5)
telegram: Nikki HQ / 📱SNS (topic:3)
telegram: Nikki HQ / 💻Dev (topic:4)

Or at minimum allow a name field in the per-topic config:

{
  channels: {
    telegram: {
      groups: {
        "-1003874130048": {
          topics: {
            "5": { name: "⚙️Cron", requireMention: false },
            "3": { name: "📱SNS", requireMention: false }
          }
        }
      }
    }
  }
}

Suggested Approaches

  1. Fetch topic names from Telegram API at startup via getForumTopics and cache them in gateway state — fully automatic, no user config needed
  2. Allow a name field in per-topic config — simpler to implement, user-configurable fallback

Option 1 is the best UX; option 2 as a fallback when names can't be fetched.

Current Workaround

None — users have to memorize which topic number maps to which channel.

Environment

  • OpenClaw: 2026.3.23-2
  • Channel: Telegram (forum/supergroup with topics)
  • Surface: Control UI session selector / cron delivery dropdown

extent analysis

Fix Plan

To address the issue, we will implement a combination of the suggested approaches:

  1. Fetch topic names from the Telegram API at startup via getForumTopics and cache them in gateway state.
  2. Allow a name field in per-topic config as a fallback.

Step-by-Step Solution

  • Fetch topic names from Telegram API:
    • Use the getForumTopics method to retrieve topic names from the Telegram API.
    • Cache the topic names in the gateway state for future use.
  • Allow a name field in per-topic config:
    • Update the configuration schema to include a name field for each topic.
    • Use the name field as a fallback when topic names cannot be fetched from the Telegram API.
  • Update the Control UI:
    • Modify the session selector to display the topic names instead of raw session keys.
    • Use the cached topic names or the name field from the configuration as the display name.

Example Code

// Fetch topic names from Telegram API
const fetchTopicNames = async (groupId) => {
  const response = await telegramApi.getForumTopics(groupId);
  const topicNames = response.topics.reduce((acc, topic) => {
    acc[topic.id] = topic.name;
    return acc;
  }, {});
  return topicNames;
};

// Cache topic names in gateway state
const cacheTopicNames = (topicNames) => {
  // Implement caching logic here
};

// Update Control UI to display topic names
const getDisplayTopicName = (topicId, groupId) => {
  const cachedTopicNames = getCacheTopicNames(groupId);
  const topicName = cachedTopicNames[topicId];
  if (topicName) {
    return topicName;
  } else {
    // Fallback to name field in per-topic config
    const config = getConfig();
    const topicConfig = config.channels.telegram.groups[groupId].topics[topicId];
    return topicConfig.name;
  }
};

Verification

To verify that the fix worked, check the Control UI session selector and ensure that it displays the topic names instead of raw session keys. Test the following scenarios:

  • Topic names are fetched successfully from the Telegram API.
  • Topic names are cached correctly in the gateway state.
  • The name field in per-topic config is used as a fallback when topic names cannot be fetched.
  • The Control UI displays the correct topic names for each session.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING