Skip to content

livePreviewMode setting #3117

Open
Open

Description

@tegirvaru

Describe the bug

i keep changing the "livePreviewMode": "highlight" setting in the phcode.json, but it keeps reverting it to "edit" no matter what i try. i have changed the config to "preview" because that is what i want. i have changed it in the toolbar above the preview as well, but it never loads back to preview on startup.

Image

the phcode file is saving correctly, i have that file open when loading and i can see that upon load, it changes it from "preview" to "edit".

Image

during load is the one with the spaced lines, then when it's done loading my settings (compact lines), it changes the preview back to edit.

i have even changed the setting in an external json editor just to make sure.

Image

separately, it keeps adding a ".phcode.json" file to the file tree. i don't know what it is, sometimes it contains server settings (which i don't use), and sometimes it has other settings in it. i deleted the file that said to delete it if you disable AI features.

Reproduction

change setting to preview,
reload phoenix,
setting reverts after load.

Expected behavior

keep my setting as "preview", and load on startup.

OS, Browser and Phoenix versions

win 11
PC laptop
Release 5.2 build 5.2.5-23290
Phoenix Pro Build: 5886d20

logs or debug stack trace if any

Additional context

No response

Activity

  1. added
    bug
    on Aug 19, 2026
  2. devvaannsh commented on Aug 20, 2026

    @devvaannsh
    Member

    Hey @tegirvaru, right now we automatically switch to Edit mode in Live Preview when you restart the app or switch projects. The idea was to help users discover the Live Preview Edit Mode features. But I understand the issue you're pointing out. This isn't the right behavior if it ignores the user's preference.

    Apologies for the trouble. We'll address this in an upcoming release.

    Regarding the .phcode.json file, it's an auto-generated Phoenix file that's created when a Live Preview related setting is modified. It's safe to keep, so you don't need to delete it.

  3. tegirvaru commented on Oct 29, 2026

    @tegirvaru
    Author

    i just got the new update. this preview mode not staying as preview only is really annoying. it is interrupting when i just want to click and actually use/test my app actions. it's a totally dynamic layout, so having it show element and class details is completely useless to me.

    the issue about having to save twice seems to be fixed though. the dot went away first save, and no false dirty flag. never mind, it is still the same. have to double save.

    Release 5.5 build 5.5.11-23832
    Phoenix Pro Build: d786c9f
    build timestamp: 2026-10-27T11:04:30.905Z
    windows 11

  4. devvaannsh commented on Oct 30, 2026

    @devvaannsh
    Member

    Hey @tegirvaru, we only switch back to edit mode when you close and reopen the app. If that's not the case, could you please help us understand exactly when the preview mode automatically switches to edit mode? Really sorry about this experience! :(

  5. tegirvaru commented on Oct 30, 2026

    @tegirvaru
    Author
  6. abose commented on Oct 31, 2026

    @abose
    Member

    This has been a bit of a balancing act. Earlier, we had users who accidentally switched out of Live Preview Edit mode and then reached out why Live Preview features were not working. Then we made the change to not remember the mode being turned off permanently. But this can be frustrating for users who prefer Preview mode to be remembered. Looking at how best to balance both experiences, need to figure out. Another setting will complicate things. But ill look i to it.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions