solid_errors icon indicating copy to clipboard operation
solid_errors copied to clipboard

Add Copy for LLM button to error details page

Open thieso2 opened this issue 5 months ago • 1 comments

Adds a one-click button to copy error details formatted for LLM analysis. The button appears in the actions bar alongside Back/Resolve/Delete buttons with consistent styling.

Features:

  • Copy button with standard copy icon in purple theme
  • Intelligently filtered backtrace (collapses GEM_ROOT frames)
  • Shows PROJECT_ROOT frames with one context frame above/below
  • Visual feedback when copied (green color + "Copied!" text)
  • Formats error data with context, occurrences, and analysis prompts
  • Generic "LLM" naming to work with any AI assistant

The copied text includes:

  • Exception class, message, severity, source, and status
  • Occurrence statistics and timestamps
  • Most recent occurrence context and backtrace
  • Prompt questions for error analysis

🤖 Generated with Claude Code

thieso2 avatar Aug 31 '25 13:08 thieso2

The PR #86 is failing because the codebase contains a reference to a bootstrap_svg helper method that doesn't exist. This issue is not new to PR #86 - it's been in the codebase since the initial implementation in January 2024.

In app/views/solid_errors/occurrences/_collection.html.erb on line 56, there's a call to: <%= bootstrap_svg "list-ul" %>

This helper method is expected to render a Bootstrap icon SVG, but:

  1. No helper is defined - There's no bootstrap_svg method defined anywhere in the codebase
  2. No gem dependency - The gemspec doesn't include any Bootstrap icons gem like bootstrap-icons-helper that would provide this helper
  3. Test failure - The test fails with undefined method 'bootstrap_svg' when it tries to render the view that includes this partial

The error only manifests when rendering a page with no occurrences (empty state), which explains why it might have gone unnoticed. The test test_Claude_analysis_section_handles_errors_without_occurrences specifically tests this empty state scenario, triggering the error.

This is a pre-existing bug in the upstream repository that has nothing to do with the changes in PR #86. The PR just happens to include a test that exercises this code path.

thieso2 avatar Sep 02 '25 17:09 thieso2