Skip to content

feat(folders): add --resolve flag to show peer names - #24

Merged
dapi merged 8 commits into
mainfrom
feature/issue-19-folders-resolve-peers
Mar 13, 2026
Merged

feat(folders): add --resolve flag to show peer names#24
dapi merged 8 commits into
mainfrom
feature/issue-19-folders-resolve-peers

Conversation

@dapi

@dapi dapi commented Mar 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add _normalizePeer() to convert raw MTCute peer objects to { type, id } format
  • Add _resolvePeerName() for lightweight name resolution via getChat()/getFullUser()
  • Update showFolder() to normalize peers by default and optionally resolve names with resolve: true
  • Add --resolve CLI flag to folders show with two output modes: typed IDs (default) vs grouped resolved names
  • Document all folders subcommands in SKILL.md

Closes #19

Test plan

  • 13 new unit tests covering _normalizePeer, _resolvePeerName, and showFolder peer normalization/resolution
  • All 131 existing tests pass
  • Manual smoke test: tgcli folders show AI --resolve --timeout 30s

🤖 Generated with Claude Code

dapi and others added 8 commits March 13, 2026 07:24
Design for resolving peer IDs to readable names in `folders show` command.
Adds --resolve flag, normalizes peer output in both JSON and text formats.

Ref: #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6-task TDD plan: _normalizePeer, _resolvePeerName, showFolder update,
CLI --resolve flag, SKILL.md docs, test fixups.

Ref: #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extracts type and numeric id from raw MTCute peer objects.
Ref: #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolves peer ID to name via getChat/getFullUser without fetching full metadata.
Returns null on error (graceful degradation).
Ref: #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
showFolder now returns { type, id } for each peer instead of raw MTCute objects.
With resolve=true, additionally fetches channel titles and user names.
Unresolvable peers are marked as (unresolved).
Ref: #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without --resolve: shows typed peer ID list (channel:123, user:456).
With --resolve: groups peers by type and shows resolved names.
Ref: #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Documents all folders subcommands including new --resolve flag.
Ref: #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All peer lists (include/exclude/pinned) now group by type in --resolve mode.
Previously excluded/pinned peers lost type information.
Ref: #19
@dapi
dapi merged commit 3d1da26 into main Mar 13, 2026
1 check passed
@dapi
dapi deleted the feature/issue-19-folders-resolve-peers branch March 13, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: folders show должен резолвить peer ID в имена

1 participant