Title: id(web): saving a .txt file silently deletes every list, quote, code block and table · Issue #1306 · developing-today/code · GitHub
Open Graph Title: id(web): saving a .txt file silently deletes every list, quote, code block and table · Issue #1306 · developing-today/code
X Title: id(web): saving a .txt file silently deletes every list, quote, code block and table · Issue #1306 · developing-today/code
Description: id(web): saving a .txt file silently deletes every list, quote, code block and table Summary A .txt document is edited in the full rich editor, but the save path extracts only paragraph and heading text. Every other block the editor allo...
Open Graph Description: id(web): saving a .txt file silently deletes every list, quote, code block and table Summary A .txt document is edited in the full rich editor, but the save path extracts only paragraph and heading...
X Description: id(web): saving a .txt file silently deletes every list, quote, code block and table Summary A .txt document is edited in the full rich editor, but the save path extracts only paragraph and heading...
Opengraph URL: https://github.com/developing-today/code/issues/1306
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(web): saving a .txt file silently deletes every list, quote, code block and table","articleBody":"# id(web): saving a .txt file silently deletes every list, quote, code block and table\n\n## Summary\n\nA `.txt` document is edited in the full rich editor, but the save path\nextracts only paragraph and heading text. Every other block the editor\nallows — bullet/ordered/task lists, blockquotes, code blocks, tables,\nhorizontal rules — is **silently deleted** on save, with a success\nresponse. This is unrecoverable data loss for any `.txt` file whose\nauthor used the toolbar, markdown shortcuts, paste, or a collab peer's\nedit to create a non-paragraph block.\n\n## Evidence\n\n- Editor side: `pkgs/id/web/src/editor.ts:288-289` — `getSchema(mode)`\n returns `richSchema` for every mode except `raw`, and `:295`\n `hasToolbar` includes `plain`. The file comment at `:42` says the\n full schema (lists, GFM task lists, tables) applies to\n \"rich/markdown/plain modes\". So a `.txt` doc legitimately contains\n any block type.\n- Save side: `pkgs/id/src/web/routes.rs:1976` `convert_doc_to_bytes`\n routes `.txt` (ContentMode::Plain) to `extract_plain_text`\n (`routes.rs:2009`). That function handles only `paragraph` and\n `heading` at the top level; the catch-all arm at `routes.rs:2049`\n is `_ => {}` — every other node is dropped without a log, error, or\n placeholder. (Inline non-text nodes are likewise dropped at `:2032`.)\n- Verified this run on origin/main 90f7ea00 with a probe crate holding\n the verbatim `extract_plain_text` body (log:\n `hidden_files/probe-2026-10-26-2352/out4.log`): a doc containing\n paragraph \"intro\", a 2-item bullet list, a blockquote, a code block,\n a table cell and a paragraph \"outro\" extracted to exactly\n `\"intro\\noutro\"` — the list items, quote, code and cell text all\n vanished.\n\n## Why it matters\n\nSilent, success-reported deletion is the worst failure class for a\ndocuments app: the user only discovers the loss on the next open, and\nby then the saved bytes are the only copy. The heading arm shows the\nauthors already knew non-paragraph blocks reach this function; the\nremaining block types were simply never handled.\n\n## Acceptance criteria\n\n- Saving a `.txt` doc containing lists, blockquote, code block, table\n or horizontal rule no longer silently discards their text: either\n the text is extracted in a documented plain-text rendering (e.g.\n list item text per line, cell text per line), or the save fails\n loudly for docs it cannot represent — pick one policy, document it\n on `convert_doc_to_bytes`, and pin it with tests.\n- A regression test in the web routes/markdown test suite covers at\n least: bullet list, blockquote, code block, table — asserting the\n saved `.txt` bytes contain their text (or the save errors, per the\n chosen policy).\n- Paragraph/heading-only `.txt` docs save byte-identically to today.\n- The markdown (`.md`) and raw save paths are unchanged.\n\n## Suggested direction\n\nRecursive text extraction over block children (list_item → its\nparagraphs, blockquote → its blocks, table rows/cells → their\nparagraphs, code_block → its text) is the smallest change that makes\n`.txt` save loss-free for text content; formatting marks/structure\nare inherently lost in plain text, text must not be.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-27T05:31:10Z","url":"https://github.com/developing-today/code/issues/1306"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c6bda0cb-e49d-638d-9fa0-8979c734413b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBEE:2A9AB5:9F9C30:CE0DBB:6B06334D |
| html-safe-nonce | 870abf59108e24bd3001f9918d85b5dbf640afdf5c706dc6a99568b88f4efadc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkVFOjJBOUFCNTo5RjlDMzA6Q0UwREJCOjZCMDYzMzREIiwidmlzaXRvcl9pZCI6IjgwMDAxNTczMDM5ODA4MzE1NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 526f88092202529757f6a8da9b180f83126b0427aecc041b50fb97eacc1f5f3b |
| hovercard-subject-tag | issue:6053505965 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/1306/issue_layout |
| twitter:image | https://opengraph.githubassets.com/65e10cb9f26588eea66bab672045da52eacc7ac5173890c753b18957026738cc/developing-today/code/issues/1306 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/65e10cb9f26588eea66bab672045da52eacc7ac5173890c753b18957026738cc/developing-today/code/issues/1306 |
| og:image:alt | id(web): saving a .txt file silently deletes every list, quote, code block and table Summary A .txt document is edited in the full rich editor, but the save path extracts only paragraph and heading... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width