No preview when re-opening any project

When returning to a project I can’t see any preview rendered. I discovered that if i go to version 1 and refresh preview it correctly renders the initial version and then I can go one-by-one through versions by clicking in the chat on each version and see changes applied. This gets tedious with a lot of versions but it’s the only way to correctly get back to where I left off last time in the project. If I skip a version the changes from that version are not included.

This can’t be expected behaviour?

I would have assumed that you would switch between versions and version X would include all changes from version 1 up to that given version?

This is not expected behavior but also hard to guess how it happens – the files for each version are saved in Blob rather than being assembled out of diffs

  • Can you confirm that you see a mangled preview made of mismatched versions?
  • How does the code tab behave?
  • In your initial state, do you just see a blank preview or is the preview missing entirely?

Can you share a chat ID with this issue so we can dig in?

To illustrate, my chat has 3 versions (https://v0.app/chat/third-duplicate-of-shad-cn-project-setup-RPjdlV5hNyy)

  • Version 1: Initial implementation, basic shadcn style, result of full prompt
  • Version 2: Adjust colors in global.css
  • Version 3: Adjust font

If I go to version 1, I see preview and it works. If I jump there to version 3, I see the font update in the preview but stay with shadcn colors.

If I go to version 1 and then to version 2 I see colors but no font.

If I go to version 1, then version 2 and then version 3 I see what I would expect and where I left off last time I ended working on the project.

(I have to refresh in between each of the 3 experiment to get the clean behaviour, If I don’t refresh in between I get even more jumbled up behaviour, like it will show version 1 with global colors but no font, if I first go through all versions but then back to version 1)

In the code view I’m seeing a subset of the files in the project and I can see diffs of each individual version depending on which one I select. It seems to behave correct though it is rather annoying that I can’t always see all files within the project.

Ok this looks like it’s design mode related, the code correctly belongs to each version but we’re getting cached styles from whichever version gets opened that aren’t getting cleared when the version changes. I suspect this comes from when they’re loaded into the design mode tab to allow the user to configure them

I will escalate this one internally

This should be fixed now, thank you so much for the clean reproduction. There was a code path where we weren’t unloading styles properly when switching between versions

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.