Skip to content

[Bug] Code blocks cannot be copied correctly and HTML preview is not interactive #280

Description

@TheLeaderDev

Version: 2.0.32

Describe the Bug

There are several issues with the Code panel and HTML preview in the Windows version.

1. No Copy Code button

When the model generates code, there is no dedicated "Copy Code" button in the Code panel.

Users have to manually select the code and copy it.

2. Line numbers are included when copying code

When selecting and copying code from the Code panel, the line numbers on the left side are also included in the copied text.

For example, if the code panel displays:

1
2
3

selecting and copying the code also copies the line numbers.

The expected behavior is that only the actual code should be copied, without the line numbers.

A dedicated "Copy Code" button would also solve this problem.

3. HTML Preview is not interactive

The HTML Preview panel does not behave like a real HTML preview.

It appears more like a static image/snapshot rather than a functional rendered webpage. Interactive elements and the webpage itself cannot be properly interacted with.

The preview should render the generated HTML as a functional webpage so that elements such as buttons, inputs, links, JavaScript interactions, etc. can work as expected.

Steps to Reproduce

  1. Open Atomic Chat on Windows.
  2. Start a new chat.
  3. Ask the model to generate an HTML page containing some code and interactive elements.
  4. Open the Code panel.
  5. Try to copy the generated code.
  6. Notice that there is no dedicated "Copy Code" button.
  7. Manually select the code and copy it.
  8. Notice that the line numbers are included in the copied text.
  9. Open the HTML Preview.
  10. Try to interact with the generated webpage.
  11. Notice that the preview does not behave like a fully functional webpage.

Expected Behavior

The Code panel should provide a dedicated "Copy Code" button.

When copying code, only the actual source code should be copied, without:

  • Line numbers
  • UI elements
  • Other Code panel content

The HTML Preview should render the generated HTML as a functional and interactive webpage rather than a static representation.

Screenshots / Logs

See the attached screenshot.

The screenshot shows the Code panel with line numbers and the HTML Preview panel.

Operating System

  • MacOS
  • Windows
  • Linux

Additional Note

Please also check whether the same Code Copy and HTML Preview issues exist in the mobile version.

If these issues are present on mobile as well, they should ideally be fixed there too so that the behavior is consistent across desktop and mobile versions.

IMG_20260907_165612_321.png

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions