Before submitting
Area
apps/web
Steps to reproduce
- Open a thread and open a
.md file in the right-hand file preview panel.
- Click the eye toggle ("Show rendered markdown"). The panel switches to the
rendered view.
- Switch to a different thread.
- Switch back to the original thread and open the same
.md file.
Expected behavior
The panel is still showing rendered markdown. The view mode should be sticky —
once I've said I want to read markdown rendered, that's my preference until I
toggle it back.
Actual behavior
The panel is back to raw markdown source, and I have to click the toggle again
every time I return to the thread.
Impact
Minor bug or occasional failure
Version or commit
main @ 5719e8a
Environment
macOS 26.5.2, desktop app
Logs or stack traces
The toggle is backed by component-local state in `FilePreviewPanel`:
apps/web/src/components/files/FilePreviewPanel.tsx:675
const [markdownView, setMarkdownView] = useState<{
path: string | null;
revealRequestId: number | null;
}>({ path: null, revealRequestId: null });
Nothing persists it, and it's invalidated two ways:
- `renderMarkdown` requires `markdownView.path === relativePath`
(FilePreviewPanel.tsx:681), so any change of the open file drops back to
source.
- The panel is mounted with `key={environmentId:workspaceRoot}`
(ChatView.tsx:5588), so switching to a thread in another project remounts it
and resets the state entirely.
The adjacent explorer-open toggle in the same component already persists via
`FILE_EXPLORER_STORAGE_KEY` in localStorage (FilePreviewPanel.tsx:701-711),
which looks like the precedent to follow here.
Screenshots, recordings, or supporting files
No response
Workaround
Click the toggle again each time.
Before submitting
Area
apps/web
Steps to reproduce
.mdfile in the right-hand file preview panel.rendered view.
.mdfile.Expected behavior
The panel is still showing rendered markdown. The view mode should be sticky —
once I've said I want to read markdown rendered, that's my preference until I
toggle it back.
Actual behavior
The panel is back to raw markdown source, and I have to click the toggle again
every time I return to the thread.
Impact
Minor bug or occasional failure
Version or commit
main @ 5719e8a
Environment
macOS 26.5.2, desktop app
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
Click the toggle again each time.