Public: anyone can read this; the crew can change it.

A Talk conversation downloads as one Markdown file through a plain link #13606

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A Talk conversation now downloads at /talk/ .md, and the page's Download link points there. Most of this issue was already on main from #13357: GET /talk/:id/download returns the conversation as Markdown with the attachment disposition, owner only.

Notes

shipped production is serving it deploy 59903fa

opened this

A Talk conversation now downloads at /talk/<id>.md, and the page's Download link points there.

Most of this issue was already on main from #13357: GET /talk/:id/download returns the conversation as Markdown with the attachment disposition, owner only. The terminal screen also already shows the same text (d), and tests cover the owner, another person (404) and fenced content. What was missing was the .md address the issue names.

What changed

  • talkView in src/web/pages/talk.ts sends /talk/<id>.md to the existing talkDownload, so it uses the same owner-only gate and the same file. /talk/<id>/download still works.
  • The conversation page's Download link now uses .md.
  • docs/features/talk.md names the new address.
  • test/conversation-download.test.ts has one new test: the owner gets text/markdown as an attachment, identical to /download; another person gets 404; an unknown id gets 404; signed out is sent to sign in.

Checks

  • tsc, scripts/gate.ts and scripts/design-lint.ts pass.
  • conversation-download, talk-page, tui-talk-chats and security-floor-routes tests pass. I ran four test files, not the whole suite.

Left out

  • No new terminal door and no new look, since the terminal already offers the text and nothing drawn changed. The commit lines say No look and No door.

Try it: open a conversation at /talk/<id>, press Download, or open /talk/<id>.md directly.

Closes #13589

commented

A Talk conversation now downloads at /talk/<id>.md, and the page's Download link points there.

Most of this issue was already on main from #13357: GET /talk/:id/download returns the conversation as Markdown with the attachment disposition, owner only. The terminal screen also already shows the same text (d), and tests cover the owner, another person (404) and fenced content. What was missing was the .md address the issue names.

What changed

  • talkView in src/web/pages/talk.ts sends /talk/<id>.md to the existing talkDownload, so it uses the same owner-only gate and the same file. /talk/<id>/download still works.
  • The conversation page's Download link now uses .md.
  • docs/features/talk.md names the new address.
  • test/conversation-download.test.ts has one new test: the owner gets text/markdown as an attachment, identical to /download; another person gets 404; an unknown id gets 404; signed out is sent to sign in.

Checks

  • tsc, scripts/gate.ts and scripts/design-lint.ts pass.
  • conversation-download, talk-page, tui-talk-chats and security-floor-routes tests pass. I ran four test files, not the whole suite.

Left out

  • No new terminal door and no new look, since the terminal already offers the text and nothing drawn changed. The commit lines say No look and No door.

Try it: open a conversation at /talk/<id>, press Download, or open /talk/<id>.md directly.

Approved

Small, single-purpose, behind the same owner gate as /download. The test covers owner, other person (404), unknown id (404) and signed-out (303). The preview sends /talk/x.md to sign-in with the security floor headers. The Download link is still a plain <a download>, so it works without JavaScript. The how-to is in docs/features/talk.md and README is untouched. The terminal already offers the same text, and no look changed. Two things I would do next: (1) have the router match the .md suffix (a route like /talk/:id.md) so talkView does not rewrite ctx.params by hand; (2) in the owner test, assert the filename in Content-Disposition is the same for both addresses.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs