Skip to content

Conversation

@mcollina
Copy link
Member

@mcollina mcollina commented Oct 14, 2025

Summary

This PR improves the generate command output to match the style and functionality of the run command, making it more user-friendly and consistent.

Changes

  • ✨ Add clickable file:// URLs for generated HTML files (matching run command behavior)
  • 🎨 Add profile type detection (CPU vs Heap) for better user feedback
  • 🔥 Add fire emoji to match run command style
  • 🔧 Simplify heap profile detection to check for 'heap' instead of 'heap-profile'
  • 🧪 Update integration tests to match new output format
  • 🧹 Remove redundant stdout noise from generate command

Before

Generating flamegraph from cpu-profile-2025-10-10T15-56-04-670Z.pb...
Flamegraph generated: cpu-profile-2025-10-10T15-56-04-670Z.html
<stdout from react-pprof CLI>

After

🔥 Generating CPU flamegraph from cpu-profile-2025-10-10T15-56-04-670Z.pb...
🔥 CPU flamegraph generated: cpu-profile-2025-10-10T15-56-04-670Z.html
🔥 Open file:///Users/matteo/repos/flame/cpu-profile-2025-10-10T15-56-04-670Z.html in your browser to view the flamegraph

The file:// URLs are clickable in modern terminals, making it much easier to open the generated flamegraph.

Test plan

  • All existing tests pass
  • Integration test updated to check for new output format
  • Heap profile detection still works correctly with simplified check
  • Manual testing confirms clickable URLs work in terminal

🤖 Generated with Claude Code

Screenshot 2025-10-14 at 12 38 18

…ting

- Add clickable file:// URLs for generated HTML (matching run command behavior)
- Add profile type detection (CPU vs Heap) for better user feedback
- Add fire emoji (🔥) to match run command style
- Simplify heap profile detection to check for 'heap' instead of 'heap-profile'
- Update integration tests to match new output format
- Remove redundant stdout noise from generate command

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@mcollina mcollina merged commit dc3799c into main Oct 14, 2025
6 checks passed
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.

2 participants