feat(ui): add markdown preview to file viewer#352
feat(ui): add markdown preview to file viewer#352shantur merged 6 commits intoNeuralNomadsAI:devfrom
Conversation
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
Automation failed. remote: Internal Server Error -- |
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
Reviewed the latest PR state against Assumptions
Findings
Validation
Gatekeeper verdict
-- |
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
Reviewed the latest PR head again after the new fix commit ( Assumptions
Findings
Validation
Gatekeeper verdict
-- |
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
Reviewed the latest PR head again after the new fix commit ( Assumptions
Findings
What changed since the last review
Validation
Gatekeeper verdict
-- |
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
Reviewed the latest PR head again after the new fix commit ( Assumptions
Findings
What changed since the last review
Validation
Gatekeeper verdict
-- |
|
@pascalandr - would you be able to resolve the conflicts in the PR |
Add an optional Markdown preview toggle for markdown files and a word-wrap toggle for the source editor so the Files tab can switch between rendered and editable views without introducing a larger viewer registry.
Escape raw HTML in markdown previews, stop treating MDX as supported markdown preview input, and persist file-viewer word wrap outside the Files tab so the new controls survive tab switches.
Preserve Ctrl/Cmd+S for dirty markdown files while preview mode is active so switching from source to preview does not remove the keyboard save path.
Handle Ctrl/Cmd+S only while the preview pane itself is focused, and sanitize allowlisted inline HTML so markdown previews preserve common safe constructs like details, images, anchors, and kbd tags without falling back to raw HTML.
Remove file:// image support from the markdown sanitizer and allow common safe semantic tags like headings and hr so the preview stays safer while remaining closer to normal markdown rendering.
adfca8b to
6bc796a
Compare
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/24961897653 Artifacts expire in 7 days. |
|
@pascalandr - Build seems to be broken now |
|
fixed |
|
Thanks @pascalandr |
Fixes #331
Summary
Why
The Files tab only showed raw source, which makes Markdown files harder to read quickly.
This change adds a lightweight preview/source switch without introducing a larger viewer registry.
What Changed
packages/ui/src/components/instance/shell/right-panel/tabs/FilesTab.tsxPreview Markdown/Show sourcetoggle for markdown filespackages/ui/src/components/file-viewer/monaco-file-viewer.tsxpackages/ui/src/components/instance/shell/right-panel/RightPanel.tsxpackages/ui/src/components/instance/shell/storage.tspackages/ui/src/lib/i18n/messages/*/instance.tsValidation
npm run build --workspace @codenomad/ui