Skip to content

fix(api): show all channel sessions in web UI, not just web/pico#2002

Open
Huangting-xy wants to merge 3 commits intosipeed:mainfrom
Huangting-xy:fix/web-ui-show-all-sessions
Open

fix(api): show all channel sessions in web UI, not just web/pico#2002
Huangting-xy wants to merge 3 commits intosipeed:mainfrom
Huangting-xy:fix/web-ui-show-all-sessions

Conversation

@Huangting-xy
Copy link

Summary

  • Parse session key format to extract channel from all session types
  • Add 'channel' field to sessionListItem for filtering/grouping
  • Support sessions from telegram, discord, and other channels

Changes

  • Modified handleListSessions in web/backend/api/session.go to parse all session key formats (agent:main::...)
  • Added extractChannelFromSessionKey(), extractSessionIDFromSanitizedKey(), isSessionJSONLFile() helper functions
  • Added Channel field to sessionListItem struct
  • Sessions from all channels (web, telegram, discord, etc.) are now visible

Related Issue

Fixes #1996

🤖 AI Code Generation

🛠️ Mostly AI-generated

Test Environment

  • Hardware: x86_64
  • OS: Linux 4.19
  • Tested channels: Web, Telegram (simulated via file creation)

Evidence

  • All existing tests pass: go test ./web/backend/api/... -run TestHandle.*Session
  • Modified session parsing correctly handles both JSONL and legacy JSON session formats
  • Channel field properly extracted from session keys in format agent:main:<channel>:direct:<peer>

Checklist

  • Run make fmt and go vet locally
  • All tests pass
  • Followed existing code style and conventions
  • Single focused change, no unrelated modifications

- Parse session key format to extract channel from all session types
- Add 'channel' field to sessionListItem for filtering/grouping
- Support sessions from telegram, discord, and other channels

Fixes sipeed#1996
@CLAassistant
Copy link

CLAassistant commented Mar 25, 2026

CLA assistant check
All committers have signed the CLA.

@sipeed-bot sipeed-bot bot added type: bug Something isn't working domain: channel go Pull requests that update go code labels Mar 25, 2026
Huangting-xy and others added 2 commits March 25, 2026 21:06
Fix copy-paste error in SaveConfig where Weixin.secDirty was
checked but Discord.secDirty was incorrectly cleared instead.
This caused Weixin channel token changes to be saved but the
dirty flag never cleared, leading to config persistence issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a prominent reference to security_configuration.md at the beginning
of the configuration guide. This helps new users quickly find
information about storing API keys in .security.yml.

Fixes sipeed#1986

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: channel go Pull requests that update go code type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI: Chat history only shows pico (web) sessions, hides all other channels

2 participants