Repository navigation
feat: one Markdown parser (parseMarkdownSpans); no sync advice for store-history messengers (UX-59) - #1430
Merged
Conversation
leemour
force-pushed
the
fix/mcp-delete-markdown
branch
from
October 17, 2026 11:57
c72893b to
44e8f7f
Compare
…essenger tg-cli, max-cli and whatsapp-cli each carried a copy of the same parser. This one reads tg's dialect plus # headings and a one-line ``` block into FormattedText; each messenger keeps only its renderer and the nesting it refuses. Tests ported from tg, with headings, the one-line block and the nesting the parser leaves to the messenger. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… (UX-59) For history: store, the members audit, chat stats, conversation search, MCP chats_documents_list, store check and the search coverage stop naming messages sync; the caveat that the store does not hold the chat whole stays, without a step. With historyOnDemand they name messages sync <chat>, never --all. The services already know the messenger, so audit and stats gate their fetch there and the answer builders key the caveat on completeness. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leemour
force-pushed
the
fix/mcp-delete-markdown
branch
from
October 17, 2026 12:14
44e8f7f to
c474982
Compare
This was referenced Oct 17, 2026
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.
Task
Two cli-core gaps whatsapp-cli (
wa) hit: three copies of one Markdown parser, andmessages syncadvice that store-history messengers cannot follow (UX-59). (The MCP delete-for-everyone item was dropped: #1439 settled it, since agents never delete for everyone.)Why
#headings).--sync-firstand the search advice forhistory: "store". Five more answers still namedmessages sync, which such a messenger refuses.What
parseMarkdownSpans(text): FormattedText, exported from.. It reads tg's dialect plus#headings and a one-line```block, sorts the spans, and validates them. Telegram's nesting refusal, tg's trailing-space trim and max's nested-link refusal stay with each messenger's renderer. I checked tg's and wa's own test suites with this parser plus their post-processing: all 20 cases pass. max's dialect is different (*italic,__bold,++,^^), so max does not switch yet: that is the owner's call (NEED-1414).syncsOneChat(messenger)is true whenhistory !== "store" || historyOnDemand.<chat>advice needs it;--alladvice needshistory !== "store". The services already know the messenger, so the members audit and chat stats setfetchonly when a sync can run. Their answer builders keep the "store does not hold the chat whole" caveat (missingwith nostep) and dropnext. I did this instead of passing the messenger into those builders.search conversations/conversations related(CLI and MCP) do take the messenger now. MCPchats_documents_list,store check(withhistoryOnDemandit names the first chat that is behind) and the message-search coverage line are gated the same way.Testing
pnpm typecheck, biome on the changed files.markdown-spans.test.ts(tests ported from tg, plus headings, the one-line block and nesting left to the messenger), UX-59 tests inchat-stats.test.ts,store-mode.test.ts(store check),conversation-answers.test.tsandchat-answers.test.ts.vitest runlocally before the rebase (4939 passed); after rebasing on fix(mcp): one vocabulary for agent commands; agents never delete for everyone; --permission only tightens #1439, typecheck plus the touched suites (580 passed).Consumer impact
src/telegram/format-markdown.tsforparseMarkdownSpansfrom@wirecat/cli-core, keeping its nesting check and trailing-space trim. One change:# xbecomes aheadingspan, and a one-line```x```becomespre(that used to be an error). Its entity mapping has to handleheading.src/adapter/format-markdown.ts's parser forparseMarkdownSpansand keeptoWhatsApp. Same output.🤖 Generated with Claude Code