Skip to content

FIX Persist Chat Markdown display preference - #2311

Open
romanlutz wants to merge 2 commits into
microsoft:mainfrom
romanlutz:romanlutz-persist-markdown-preference
Open

FIX Persist Chat Markdown display preference#2311
romanlutz wants to merge 2 commits into
microsoft:mainfrom
romanlutz:romanlutz-persist-markdown-preference

Conversation

@romanlutz

@romanlutz romanlutz commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Description

The Chat raw/Markdown switch previously used component-local state, so navigating to another view or reloading unexpectedly reset users to raw mode. This change persists explicit raw and markdown choices in localStorage, initializes the switch lazily on mount, and keeps raw mode as the default for first-time users.

Invalid or unavailable browser storage safely falls back to raw mode without changing the existing Markdown renderer, sanitization, conversation-switch behavior, or accessibility contract.

Tests and Documentation

  • Focused Jest coverage for default behavior, stored initialization, invalid/unavailable storage, and persistence across remounts
  • Combined ChatWindow and conversation-export suites: 130 tests passed
  • Frontend lint passed
  • Frontend type-check passed
  • Focused Playwright Chat -> History -> Chat navigation and reload check passed
  • Documentation: N/A; this preserves the existing switch behavior while making the preference durable
  • JupyText: N/A; no documentation notebooks changed

Before and after

The clip first shows the preference reset on origin/main, then the fixed navigation and reload behavior.

markdown-preference-before-after.webm

Copilot AI added 2 commits July 30, 2026 07:36
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ed596a44-ad26-42a6-ba46-fa6a808d1ff6
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ed596a44-ad26-42a6-ba46-fa6a808d1ff6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants