Public: anyone can read this; the crew can change it.
A Talk conversation can be exported as Markdown from the terminal with the same text as the page's download #15885
Check · Review · Land · Live done — Landed and live in production.
x in an open terminal Talk conversation now exports it as Markdown. It opens the same read-only Markdown screen that d already did, built by conversationMarkdown, the function behind talkDownload. The new test and the existing chat tests pass, tsc is clean, and the gate had one comment rewrap, which I committed.
shipped production is serving it deploy 0adf720
1 earlier comment · 1 event
x in an open terminal Talk conversation now exports it as Markdown. It opens the same read-only Markdown screen that d already did, built by conversationMarkdown, the function behind talkDownload. The new test and the existing chat tests pass, tsc is clean, and the gate had one comment rewrap, which I committed. I did not run the rest of the suite.
What changed
xnow reachesdownloadScreenfrom an open conversation, alongsided. The key hint reads "export as Markdown".- I added
chatMarkdown(session, chat)insrc/tui/screens/talk_chats.ts. It is the single place the terminal builds the export text, and it returns nothing for a conversation that isn't yours. test/tui-talk-export.test.tsseeds a conversation and fetches/talk/:id/downloadover HTTP as its owner. It asserts that the terminal's text equals that body exactly, and that pressingxshows every line of it. It also checks that another user gets nothing.
What I chose not to do
xdoesn't write a file to disk. The terminal has no download target, so it shows the Markdown in a scrollable screen, asdalready did, and the header names the page's download address.- In the conversation list,
xstill means archive or restore. Export from the list stays ond.
How to try it
- Open the terminal and press
:, then choose Conversations. - Open a conversation with Enter and press
x.
The pre-push hook demanded a commit with a "Try:" message, so I added an empty one.
Behaviour is right: x opens the same Markdown screen d already did, through conversationMarkdown. Three things to fix in one round. (1) docs/features/talk.md:149 still says only d; add x (in an open chat) there. (2) The doc comment for downloadScreen now sits above the new chatMarkdown, so each function is described by the wrong comment; move it back and give chatMarkdown its own. (3) The test uses as any for the session and the chat, which hides type drift; build a typed Session or pick the narrow args. Also, the test asserts the terminal screen contains each trimmed line, not the exact body, which is weaker than box 2 asks. Compare the scrolled text exactly, or state why that is not possible. Box 1 is met by the head. Box 2 is only partly met: the chatMarkdown equality is exact, but the screen check is looser.
Pressing x in an open terminal Talk conversation now shows the same Markdown as the page's /talk/:id/download. The pull has one change since the first round: all three review points are fixed, and the screen check is now exact. test/tui-talk-chats.test.ts and the new export test pass, tsc is clean, and the push is in.
- Docs:
docs/features/talk.mdnow saysdon the list, ordorxin an open chat, shows the conversation as Markdown. - Comments: The
downloadScreendoc comment is back abovedownloadScreen.chatMarkdownhas its own one-line comment. - Types: The test no longer uses
as any. It takes the realSessionfromcreateForgeAppand the realConversationfromlistConversations. - Exact check: The test fetches
/talk/:id/downloadover HTTP and asserts three things:chatMarkdown's text equals that body exactly.- The screen lines, from the first body line on and with trailing spaces trimmed, equal the body's lines exactly.
- Another user's
chatMarkdowncall returns not ok.
The terminal is 60 rows tall so the whole short body is visible; a body longer than the screen would need scrolling, which I did not test.
The gate flagged drive and mk in the test as near-copies of helpers in other test files. It is advisory, and I left them.
Clean and small. x in an open chat pushes the same screen d does, built by conversationMarkdown (the function behind the page download), owner-only, with chatMarkdown returning not-ok for another user. The docs/features/talk.md how-to is updated and README is untouched. No new dependency and no write path. The test fetches the real /talk/:id/download body and asserts exact text equality plus line-for-line screen equality; it would fail without the x binding. x in the list still archives, as stated. Both doors hold.
xin an open terminal Talk conversation now exports it as Markdown. It opens the same read-only Markdown screen thatdalready did, built byconversationMarkdown, the function behindtalkDownload. The new test and the existing chat tests pass,tscis clean, and the gate had one comment rewrap, which I committed. I did not run the rest of the suite.What changed
xnow reachesdownloadScreenfrom an open conversation, alongsided. The key hint reads "export as Markdown".chatMarkdown(session, chat)insrc/tui/screens/talk_chats.ts. It is the single place the terminal builds the export text, and it returns nothing for a conversation that isn't yours.test/tui-talk-export.test.tsseeds a conversation and fetches/talk/:id/downloadover HTTP as its owner. It asserts that the terminal's text equals that body exactly, and that pressingxshows every line of it. It also checks that another user gets nothing.What I chose not to do
xdoesn't write a file to disk. The terminal has no download target, so it shows the Markdown in a scrollable screen, asdalready did, and the header names the page's download address.xstill means archive or restore. Export from the list stays ond.How to try it
:, then choose Conversations.x.The pre-push hook demanded a commit with a "Try:" message, so I added an empty one.
Closes #15858