GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Bug]: Rendered-markdown view for a file in the right sidebar resets to source when you switch threads · Issue #4645 · pingdotgg/t3code

[Bug]: Rendered-markdown view for a file in the right sidebar resets to source when you switch threads #4645

New issue
Copy link
New issue
Copy link
Closed
#4853
Closed
[Bug]: Rendered-markdown view for a file in the right sidebar resets to source when you switch threads#4645
#4853
Copy link
Labels
bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

Description

@kristjaningi
kristjaningi
opened on Jul 27, 2026
Issue body actions

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open a thread and open a .md file in the right-hand file preview panel.
  2. Click the eye toggle ("Show rendered markdown"). The panel switches to the
    rendered view.
  3. Switch to a different thread.
  4. 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.

Activity

  1. kristjaningi
    added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Jul 27, 2026
  2. Sy-D commented on Jul 29, 2026

    @Sy-D
    Sy-D
    on Jul 29, 2026
    Contributor
    More actions

    Opened #4853.

    The choice was panel state keyed to one file path — "rendered is on for this file" — so leaving the thread tore it down. It is now a preference, persisted the way this same panel already persists its explorer state, rather than a new mechanism or a settings-schema change.

    What was checked, and by whom:

    step result
    Toggle rendered, leave the thread, return still rendered — checked by me on a real project
    Toggle writes and reloads the preference verified in a running client
    Click a file.md:9 link while rendered switches to source and reveals the line; the preference survives
    Toggle after that back to rendered

    One limitation stays, and it is deliberate. rightPanelStore keeps revealLine as durable surface state and restores it across reloads, so if the last thing you did with a file was jump to a line, returning to it still shows source. That is not new — before this change, returning showed source in every case; now only in that one. Making it complete means letting the store consume a reveal once applied, which changes shared surface semantics for every file surface, not just markdown. That belongs in its own change rather than folded in here.

  3. juliusmarminge
    closed this as completedin #4853on Jul 29, 2026
  4. Sy-D
    added 2 commits that reference this issue on Jul 29, 2026

    fix(web): remember the rendered-markdown choice across threads

    This issue will close once commit 22a1526 is merged into the 'main' branch.
    22a1526

    fix(web): remember the rendered-markdown choice across threads

    This issue will close once commit dae51be is merged into the 'main' branch.
    dae51be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.