Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
docs(frontend): R2-M2 correct GFS renderer exception rationale
M4cef0a7b1a80
diff --git a/docs/agents/frontend-style-rules.md b/docs/agents/frontend-style-rules.mdindex 28df7cbd8..2f7b8d0f7 100644--- a/docs/agents/frontend-style-rules.md+++ b/docs/agents/frontend-style-rules.md@@ -57,20 +57,22 @@ application guidance that must be combined with this shared document.cancel/save, and validation for editing; plus unsafe HTML/URL/image behaviorwhere content can be untrusted.- A different renderer/parser is an exception, not a parallel default. Keep an- existing specialized pipeline only when the required behavior (such as- transformed chat annotations or streaming semantics) cannot be preserved by- the standard library without regression. Record the concrete limitation and+ existing specialized pipeline only for a documented application reason, such+ as required streaming semantics or a stable preview integration whose+ replacement needs a separate migration. Record the reason and thesecurity/accessibility guarantees in the relevant app guidance or designcontext, and cover that behavior with tests. Do not extend an exception to- ordinary document preview or editing surfaces.+ other preview or editing surfaces without a separate documented reason.Recorded exception — GFS file previews. `GfsMarkdownPreview` in Control UI(`control-ui/components/GfsMarkdownPreview`) and the Desktop renderer(`desktop-app/ui/src/components/GfsMarkdownPreview/Body.tsx`) renders read-onlyGFS Markdown/text file previews with ReactMarkdown + remark-gfm instead of-`@uiw/react-md-editor`. The concrete limitation: the previews must render GFM-tables inside a labelled, keyboard-focusable scrollable table region, which-`MDEditor.Markdown` cannot preserve without regressing that behavior.+`@uiw/react-md-editor`. This retains the established, tested read-only preview+pipeline in both applications, including GFM tables inside a labelled,+keyboard-focusable scrollable region. `MDEditor.Markdown` supports custom table+components; replacing this pipeline would require a separate migration that+revalidates rendering, keyboard operation, and untrusted-content handling.Guarantees: no rehype-raw, so raw HTML stays inert; `urlTransform` restrictsimage `src` to inline `data:image` URIs and link hrefs to`http(s):`/`mailto:`/`#` fragments; code blocks render as plain `pre` > `code`.