Repository navigation
refactor: declare tg chats list output once (#179) - #188
Merged
Merged
Conversation
A trial of one output declaration on one command. The data that tg chats list prints is a zod schema with a description per field; its types are inferred from it, the field table in docs/cli-commands.md is generated from it, and an e2e test parses the real output strictly against it. zod is a devDependency: the command imports only the type, so nothing new ships. The output is unchanged. Refs #160 Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#179 (neoromantic#188). No conflict. Co-Authored-By: Claude Fable 5.2 <[email protected]>
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#179 (neoromantic#188). No conflict. Co-Authored-By: Claude Fable 5.2 <[email protected]>
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#179 (neoromantic#188). CHANGELOG: both Changed entries kept. Co-Authored-By: Claude Fable 5.2 <[email protected]>
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#179 (neoromantic#188). CHANGELOG: main's Changed section, then this PR's Removed. Co-Authored-By: Claude Fable 5.2 <[email protected]>
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#179 (neoromantic#188). No conflict. Co-Authored-By: Claude Fable 5.2 <[email protected]>
ertembiyik
added a commit
to ertembiyik/telegram-sync-cli
that referenced
this pull request
Nov 18, 2026
main now has neoromantic#178 (neoromantic#186) and neoromantic#179 (neoromantic#188). No conflict. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This was referenced Nov 18, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Lands #179 (one output declaration for
tg chats list, the trial asked for in #160) on the currentmain. This branch is its headaf70cb3, unchanged, plus a merge of it intomain. It is merged with a merge commit, so the original commit and its author stay in history and #179 closes as merged.The merge commit resolves one semantic conflict with #176:
nextChatsPageinsrc/commands/chats/list.tstyped its argument asPaginatedResult, whose import #179 removed. It now takesChatsListOutput.One docs commit adds
bun run docs:outputsto AGENTS.md, a note on wheretg chats listdeclares itsdata, and a### Changedentry in the changelog.Scope stays the trial: only
tg chats list; no other command moves to declarations.How I checked it
bun run check: clean.bun run test: 2347 pass, 0 fail.bun run test:e2e: 454 pass, 0 fail.bun run build:dist/tglists chats from a made-up cache without credentials.bun run docs:outputsleavesdocs/cli-commands.mdunchanged.Output unchanged: on a made-up cache,
mainand this branch print byte-identical stdout and stderr forchats listwith no flags,--limit 2(withnext),--limit 2 --type supergroup,--unread,--limit 0, and--format prettywith and without--limit 2.zod does not ship: the bundles of
mainand this branch contain the same modules; no zod and nolist-output.tsindist/tg. The CLI imports only types from the declaration.Drift is caught: spreading an extra
isPinnedinto each item passestsc, and the new e2e test fails withitems.0: Unrecognized key: "isPinned"(one line per item). Changing a field description withoutbun run docs:outputsfailssrc/__tests__/docs-outputs.test.tswith the table row diff.Tests pass locally and use made-up data only
README, docs and affected demos follow the product content standard
Title follows Conventional Commits
🤖 Generated with Claude Code