authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:15:32-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:15:32-07:00
log3e1333319aacff96856a3c161b8787ff6b0ddd6b
treee5ba71a5bbae6cd8799e293a3b1760ae196b1c23
parentaefef95ffc34eb76c8e2db9a219b86681f644576
signature Signed by PGP key B5690EEEBB952194

fix(web): reset markdown widgets when the previewed file changes (#9910)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

1 files changed, 4 insertions(+), 0 deletions(-)

apps/web/src/components/files/FilePreviewPanel.tsx+4
......@@ -1266,7 +1266,11 @@ export default function FilePreviewPanel({
12661266 </div>
12671267 ) : relativePath && file.data ? (
12681268 isMarkdown && renderMarkdown ? (
1269 // Markdown reconciles in place across text updates, so a file
1270 // switch needs a new key or the previous file's disclosure and
1271 // wrap state carries into the next document.
12691272 <RenderedMarkdownSurface
1273 key={relativePath}
12701274 environmentId={environmentId}
12711275 cwd={cwd}
12721276 relativePath={relativePath}