Skip to content

feat(astro): add copy button for stack trace in error overlay#14489

Merged
matthewp merged 8 commits intowithastro:mainfrom
dev-shetty:feat-stacktrace-copy
Oct 22, 2025
Merged

feat(astro): add copy button for stack trace in error overlay#14489
matthewp merged 8 commits intowithastro:mainfrom
dev-shetty:feat-stacktrace-copy

Conversation

@dev-shetty
Copy link
Contributor

Changes

  • This PR adds a button to copy the stack trace, which makes it easier to add to any LLM or AI editor for easier debugging. More here Discussion #1234
  • There is a subtle animation to give feedback that the stack is copied
Video of the Implementation
Screen.Recording.2025-10-04.at.2.14.21.PM.mov

Testing

I ran pnpm test:e2e:match "error|overlay", all the 18 test cases passed

Test case screenshot Screenshot 2025-10-04 at 2 47 55 PM

Docs

It is a small UI addition to the error overlay, so i believe no docs are needed

@changeset-bot
Copy link

changeset-bot bot commented Oct 4, 2025

🦋 Changeset detected

Latest commit: 22b180d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) semver: major Change triggers a `major` release labels Oct 4, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a major changeset. A reviewer will merge this at the next release if approved.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 4, 2025

CodSpeed Performance Report

Merging #14489 will not alter performance

Comparing dev-shetty:feat-stacktrace-copy (22b180d) with main (62ec8ea)1

Summary

✅ 6 untouched

Footnotes

  1. No successful run was found on main (4632db3) during the generation of this report, so 62ec8ea was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Copy link
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! Do you think you could add an e2e test for it?

@florian-lefebvre florian-lefebvre removed the semver: major Change triggers a `major` release label Oct 6, 2025
@dev-shetty
Copy link
Contributor Author

Thanks for the review!

Never wrote e2e tests, but a good opportunity to learn.

Will add it.

@florian-lefebvre florian-lefebvre added the semver: minor Change triggers a `minor` release label Oct 6, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@dev-shetty
Copy link
Contributor Author

@florian-lefebvre, added e2e test to check the copy functionality, and also the button interaction

Video showing the e2e test
Screen.Recording.2025-10-07.at.12.38.17.AM.mov

All the tests are passing

e2e test logs Screenshot 2025-10-07 at 12 39 53 AM

@dev-shetty
Copy link
Contributor Author

Thanks for the review!

@florian-lefebvre made the test case use getErrorOverlayContent(page). You can have a look

@florian-lefebvre
Copy link
Member

Thanks looks good! We may be slow to merge it as we're currently at ViteConf

@dev-shetty
Copy link
Contributor Author

Sure, no problem.

Enjoy your time there! ♥️

Copy link
Member

@Princesseuh Princesseuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, awesome work!

@florian-lefebvre florian-lefebvre added this to the v5.15.0 milestone Oct 13, 2025
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changeset approved by docs! 🎉

@dev-shetty
Copy link
Contributor Author

@florian-lefebvre are we good to merge this? ^^

@florian-lefebvre
Copy link
Member

Yes! It's going to be part of 5.15, to be merged in the coming days

@dev-shetty
Copy link
Contributor Author

Awesome! Thanks 🙌🏻

@matthewp matthewp merged commit add4277 into withastro:main Oct 22, 2025
38 of 39 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants