Skip to content

Conversation

thieso2
Copy link

@thieso2 thieso2 commented Aug 31, 2025

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 and others added 3 commits August 31, 2025 15:58
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](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Previously, when users clicked "Copy for LLM", the copied text included
HTML comments with BEGIN/END tags around the rendered partial content.
This fix uses Rails' capture helper to render the partial content into
a variable first, then strips whitespace before using it in the HTML
attribute, eliminating the unwanted HTML comments.

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

Co-Authored-By: Claude <[email protected]>
The previous fix using capture() wasn't sufficient to prevent Rails
view annotation comments from appearing in development mode. This
enhanced fix uses regex to explicitly strip all HTML comments
(<!-- ... -->) from the captured content before embedding it in
the data attribute, ensuring completely clean LLM text output.

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

Co-Authored-By: Claude <[email protected]>
@thieso2
Copy link
Author

thieso2 commented Sep 2, 2025

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.

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.

1 participant