Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 15, 2025

Copy buttons for PARI and LEAN exports were not being removed when their containers collapsed, leaving orphaned buttons visible.

Changes

Root cause: Content and button containers were created separately but only content containers were removed on collapse.

Fix:

  • Added unique IDs to button containers (loda-pari-buttons-${sequenceId}, loda-lean-buttons-${sequenceId})
  • Modified togglePariExport() and toggleLeanExport() to remove both content and button containers when collapsing
if (pariContainer) {
  pariContainer.remove();
  if (pariButtonsContainer) {
    pariButtonsContainer.remove();  // Now removes buttons too
  }
  button.textContent = BUTTON_STATES.PARI_COLLAPSED;
  return;
}

Screenshots

Before fix - orphaned copy button remains after collapse:

After fix - both content and copy button removed cleanly:

Original prompt

This section details on the original issue you should resolve

<issue_title>Copy button not removed when formula is collapsed</issue_title>
<issue_description>When collapsing the PARI or LEAN containers, the Copy buttons are not removed. Please fix.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix copy button not removed when formula is collapsed Fix copy buttons not removed when collapsing PARI/LEAN containers Nov 15, 2025
Copilot AI requested a review from ckrause November 15, 2025 18:00
@ckrause ckrause marked this pull request as ready for review November 15, 2025 18:12
@ckrause ckrause requested a review from neoneye as a code owner November 15, 2025 18:12
@ckrause ckrause merged commit ef72021 into master Nov 15, 2025
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.

Copy button not removed when formula is collapsed

2 participants