243 Commits
Author SHA1 Message Date
Matt Godbolt 59e6dab086 Doc simplification 2025-08-04 14:39:51 -05:00
Matt Godbolt f0d3f9ba12 Self review 2025-08-04 10:17:10 -05:00
Matt Godbolt 38a791bdb5 Merge remote-tracking branch 'origin/main' into claude-mg/explain 2025-08-04 09:02:37 -05:00
Matt Godbolt ef264acace Update to Privacy Policy (#7983)
A whole bunch of changes I've been meaning to make:
- Clarify things and put the TLDR at the top
- Remove my own darn address etc (after checking this is OK)
- Clarifying the goo.gl situation
- Paving the way for the explain feature
2025-08-02 16:20:20 -05:00
Matt Godbolt b0390f8dab Merge remote-tracking branch 'origin/main' into claude-mg/explain 2025-07-28 14:37:51 -05:00
Patrick Quist f70ab79be4 Add new /api/tools/<language> API endpoint (#7950) 2025-07-27 13:47:06 +02:00
Mats Jun Larsen d147341663 Serve all static asset files over the CDN (#7795) 2025-06-28 14:01:36 +02:00
Matt GodboltandClaude 23fad10939 Unit testing the frontend (#7829)
This adds some unit tests for the front end.

- configures "frontend tests" as a unit tests in `static/tests`,
removing the old cypress-requiring "unit" tests
- hack enough of a DOM  to get things working
- port motd and id tests
- *adds* a golden layout checks  (see #7807)
- Updates READMEs etc

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-06-19 08:46:57 -05:00
Patrick Quist bbe966f115 Update API doc to AI's liking (#7771) 2025-06-18 14:23:14 +02:00
Patrick Quist d3b67fcd5e Update API documentation for missing endpoints (fixes #4395) (#7821) 2025-06-17 09:56:57 +02:00
Matt GodboltandClaude acd2d07f39 Address PR feedback for Claude Explain feature
- Add aria-label attributes to select elements for screen reader accessibility
- Fix type consistency: make explainApiEndpoint non-optional in Options interface
- Update documentation to use "Claude Explain" consistently (matching UI text)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 08:32:05 -05:00
Matt Godbolt d9290379c3 Get frontend tests working again 2025-05-31 13:34:25 -05:00
Matt Godbolt 6b7eba933d Update docs 2025-05-31 13:13:36 -05:00
Matt Godbolt a8a47a57c5 Remove the plan now we're done 2025-05-31 11:31:16 -05:00
Matt GodboltandClaude 46957e4b40 Add info buttons with popovers to Claude Explain dropdowns
- Add Bootstrap popover info buttons next to audience and explanation dropdowns
- Dynamically populate popovers with API option descriptions
- Remove redundant labels from dropdowns for cleaner UI
- Update plan to mark UI description tasks as complete

This improves discoverability of what each option means without cluttering
the interface with permanent descriptions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 11:18:01 -05:00
Matt Godbolt 81bb840d53 Mark all TODO items complete - Claude Explain feature finished 2025-05-31 09:53:24 -05:00
Matt Godbolt a4def8a0db Extract interfaces and mark feature complete 2025-05-31 09:53:01 -05:00
Matt GodboltandClaude 6a31dc3a26 Add frontend test for Claude Explain pane
Add simple Cypress test to verify that the explain view opens correctly
when the "Claude Explain" button is clicked. Follows the same pattern
as other pane tests.

Changes:
- Add explain entry to PANE_DATA_MAP in frontend.cy.ts
- Add single line test call using addPaneOpenTest pattern
- Update plan document to mark frontend testing as complete

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 09:33:51 -05:00
Matt GodboltandClaude 43fb0764fa Extract markdown styles to shared file for reusability
Create a new markdown.scss file containing comprehensive markdown rendering
styles that can be reused by other components. Update the explain view to
use both semantic (.explain-content) and styling (.markdown-content) classes.

Changes:
- Create static/styles/markdown.scss with ~200 lines of markdown styles
- Import markdown.scss in explorer.scss
- Remove markdown styles from explain-content rule in explorer.scss
- Update explain.pug template to use both .explain-content and .markdown-content
- Update plan document to mark markdown extraction as complete

This provides clean separation between behavior (explain-content) and
styling (markdown-content) while making the styles reusable.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 09:00:11 -05:00
Matt GodboltandClaude 254b072a2c Clean up TODO comments and update implementation plan
Remove outdated TODO comments from explain-view.ts and consolidate
remaining tasks in the plan document. Update priorities based on
actual implementation status and remove completed items.

Changes:
- Remove TODO comment block from explain-view.ts
- Update plan document with realistic assessments of remaining work
- Mark theming fixes as complete
- Clarify that error handling and other areas are already well-implemented
- Streamline remaining actionable items

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 08:49:07 -05:00
Matt GodboltandClaude 9f3f7e8987 Add theme support for Claude Explain UI components
Implement proper theme styling for all explain view components across
dark, pink, and one-dark themes to improve visibility and consistency.

Changes:
- Add dark theme overrides for .explain-box (consent/no-ai messages)
- Add theme-specific styling for .explain-bottom-bar
- Enhance .ai-disclaimer badge visibility in different themes
- Ensure proper contrast and readability in all supported themes
- Update plan document to mark theme fixes as complete

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 08:00:08 -05:00
Matt GodboltandClaude 49eb27a854 Add no-ai directive support to Claude Explain feature
Implement detection of "no-ai" directive (case-insensitive) in source code
to respect users who don't want their code processed by AI. When detected,
the explain pane displays a polite message explaining why AI explanation
is not available.

Changes:
- Add checkForNoAiDirective() method to search for the directive
- Add dedicated UI element in explain.pug template for the no-ai message
- Update onCompileResult() and fetchExplanation() to check for directive
- Add explain-box CSS class for consistent styling of message boxes
- Update ClaudeExplainPlan.md to mark feature as complete

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 07:43:50 -05:00
Matt Godbolt bfbb747ef5 Update privacy policy 2025-05-31 07:13:25 -05:00
Matt GodboltandClaude 65ca586766 Improve Claude Explain UI transparency and consent flow
- Enhanced warning badge with more prominent styling (bg-warning)
- Expanded tooltip to clearly explain LLM limitations and confidence issues
- Improved form controls using Bootstrap input groups for better appearance
- Significantly enhanced consent UI with comprehensive information:
  - Clearly states that both source code AND compilation output are sent
  - Links to Anthropic with proper external link handling
  - Explains what LLMs are and their limitations
  - Clarifies that data is NOT used for model training
  - References Privacy Policy
- Better paragraph structure in consent flow for readability
- Changed "AI" to "LLMs" for more accurate terminology

These changes address high priority items from the plan around improving
consent clarity and adding better disclaimers about AI limitations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 06:59:20 -05:00
Matt GodboltandClaude 5178ad4b47 Implement dynamic options and state persistence for Claude Explain
- Add UI controls for audience level and explanation type selection
- Fetch available options dynamically from GET endpoint with fallback
- Implement proper state management with URL persistence
- Fix critical bug where class property initializers overwrote saved state
- Add cache status indicators (client/server/fresh) in bottom bar
- Update API integration for new camelCase field names
- Include audience, explanation, and bypassCache parameters in requests
- Add comprehensive TypeScript interfaces for type safety

Key Features:
- Audience levels: Beginner, Intermediate, Expert
- Explanation types: Assembly, Source, Optimization
- State preserved across page reloads and URL sharing
- Multi-level caching with clear status indicators
- Graceful fallback when API unavailable

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-30 19:36:25 -05:00
Matt GodboltandClaude 0d35084a9f Update Claude Explain documentation for new API features
- Document new GET endpoint for fetching available options
- Add audience level and explanation type parameters
- Document server-side caching and bypass_cache parameter
- Update API request/response structures
- Add detailed implementation plan for integrating new features
- Document cache status indicators and multi-level caching
- Include critical UI state management considerations

The documentation now reflects the explain API's new capabilities
including dynamic option fetching, customizable explanations, and
enhanced caching strategies.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-30 18:20:46 -05:00
Patrick Quist 80da3d3995 Update SupportedEmulators.md 2025-05-30 17:27:29 -05:00
Patrick Quist e3539e8652 Add Game Boy emulator support using WasmBoy (#7717) 2025-05-30 17:27:29 -05:00
Patrick Quist b99653804c Update SupportedEmulators.md 2025-05-24 19:29:25 +02:00
Patrick Quist 6fb3ab38e7 Add Game Boy emulator support using WasmBoy (#7717) 2025-05-24 18:43:41 +02:00
Matt Godbolt e58cd64ecc Add ideas 2025-05-24 08:57:57 -05:00
Matt Godbolt 358810958b More thoughts 2025-05-23 17:17:02 -05:00
Matt Godbolt cd62938744 Update with progress 2025-05-23 15:39:10 -05:00
Matt Godbolt caba5a97dc WIP 2025-05-20 15:21:01 -05:00
Matt Godbolt 15ba41279b Fix TypeScript errors in Claude Explain implementation
- Updated Options interface to include explainApiEndpoint property
- Fixed type errors in updateStatsInBottomBar method with explicit string[] type
- Removed unused appendMarkdown method

This fixes the TypeScript errors found during pre-commit checks for the Claude Explain feature.
2025-05-20 14:23:22 -05:00
Matt GodboltandClaude b1623e70c5 Add Claude Explain feature for explaining compilation output
This feature adds a new 'Claude Explain' tool that uses Claude AI to provide natural
language explanations of assembly code generation. The implementation includes:

- Server-side configuration with minimal stub implementation
- Client-side UI component for consent management and API interaction
- Markdown formatting of explanations
- Session-persistent consent for improved user experience
- Error handling and loading states

The feature operates entirely client-side, with the browser directly contacting the
Claude Explain API after user consent, which helps distribute API load and maintains
user privacy.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-20 12:03:34 -05:00
Matt Godbolt 74e5f237eb Update all the things (#7699)
All minor updates, commander was one major update but only to support
node 20 (which we're already past).

Tests pass, everything loaded up locally.
2025-05-19 06:51:21 -05:00
Matt Godbolt 1dab667564 Support hostnameForLogging too, more out of date refences 2025-05-12 12:59:57 -05:00
Matt GodboltandClaude 54c942ba76 Replace nopt with commander.js for argument parsing (#7673)
- Replace nopt with commander.js for better command-line argument parsing
- Add automatic help generation with detailed descriptions
- Maintain backward compatibility with existing arguments
- Remove unused nopt dependency from package.json

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-12 12:49:28 -05:00
Matt GodboltandClaude fac3bf59c1 Documentation improvements (#7672)
This PR includes various documentation improvements:

- Fix grammar in README.md introduction
- Update Node.js version references to consistently indicate 'Node.js 20
or higher'
- Enhance macOS installation and setup guide with detailed instructions
- Fix broken link in API.md
- Fix formatting inconsistencies in WhatIsCompilerExplorer.md

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-11 16:46:05 -05:00
partouf 2597939d56 short osx readme 2025-05-08 17:23:48 +02:00
Matt Godbolt 54e2dae21f Add comprehensive Configuration.md documentation (#7626)
This PR adds a detailed Configuration.md document that comprehensively
explains the Compiler Explorer configuration system. It covers:

- Configuration file structure and hierarchical loading
- Property types and automatic conversions
- List separators and specialized formats
- Group inheritance and compiler configuration
- Variable substitution mechanisms
- Advanced features like remote compilers and property debugging

Additionally, it updates all related documentation to reference this
central document for configuration details, reducing duplication and
ensuring consistency.

This document will serve as the foundation for future configuration
system improvements by providing clear documentation of the current
implementation.
2025-04-26 18:12:58 -05:00
Matt GodboltandClaude 993b8ec7a7 Cleanup post bootstrap 5 (#7608)
Remove some unnecessary functions and clarify docs.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-04-24 18:41:55 -05:00
Matt Godbolt e6de1495df Fix the embedded iframe buttons. Note to future selves: try and avoid… (#7606)
… styles as code indicators ... mea culpa
2025-04-24 15:06:45 -05:00
Matt Godbolt 82eff66c49 Handle items that don't exist in embedded mode; fix iframe generation (#7605)
Checked locally. Have no idea how the heck the quotes got changed....
2025-04-24 14:09:02 -05:00
Matt GodboltandClaude 9e5fd3d377 Update Bootstrap5Migration.md with completed tasks and issue references
- Mark documentation update tasks as complete
- Add a comprehensive documentation section for custom component implementations
- Document key changes between Bootstrap 4 and 5 for each component type
- Add sections on event handling, CSS class changes, and special integration notes
- Track remaining tasks with GitHub issues (#7602, #7603, #7604)
- Update references from "beta site" to "live site"

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-24 12:42:09 -05:00
Matt GodboltandClaude 637564f389 Migrate to Bootstrap 5 (#7582)
This PR completes the migration from Bootstrap 4 to Bootstrap 5.3.5
following the plan outlined in
[docs/Bootstrap5Migration.md](https://github.com/compiler-explorer/compiler-explorer/blob/mg/bootstrap5/docs/Bootstrap5Migration.md).

## Migration Process

We followed a phased approach as documented in the migration plan:

1. **Phase 1: Dependency Updates and Basic Setup**
   - Updated Bootstrap from 4.6.2 to 5.3.5
   - Added @popperjs/core dependency (replacing Popper.js)
   - Updated Tom Select theme from bootstrap4 to bootstrap5

2. **Phase 2: Global CSS Class Migration**
   - Updated directional utility classes (ml/mr → ms/me)
- Updated floating utility classes (float-left/right → float-start/end)
   - Updated text alignment classes (text-left/right → text-start/end)

3. **Phase 3: HTML Attribute Updates**
- Updated data attributes to use Bootstrap 5 prefixes (data-bs-toggle,
data-bs-target, etc.)
   - Fixed tab navigation issues

4. **Phase 4: JavaScript API Compatibility Layer**
   - Created bootstrap-utils.ts compatibility layer
- Updated component initialization for modals, dropdowns, popovers, etc.

5. **Phase 5: Component Migration**
- Updated and tested specific components (modals, dropdowns, toasts,
etc.)
   - Fixed styling issues in cards and button groups

6. **Phase 6: Form System Updates**
   - Updated form control classes to Bootstrap 5 standards
   - Updated checkbox/radio markup patterns
   - Simplified input groups

7. **Phase 7: Navbar Structure Updates**
   - Updated navbar structure with container-fluid
   - Fixed responsive behavior

8. **Phase 8: SCSS Variables and Theming**
   - Added custom CSS fixes for navbar alignment
   - Verified theme compatibility

9. **Phase 9: Accessibility Improvements**
   - Updated sr-only to visually-hidden
   - Added proper ARIA attributes
   - Enhanced screen reader support

## Key Changes

- No more jQuery dependency in Bootstrap 5
- New prefix for data attributes (data-bs-*)
- Improved accessibility with ARIA attributes
- Updated positioning classes (start/end instead of left/right)
- Simplified input group structure

## Test Plan

1. **Navigation Testing**
   - Verify all dropdown menus open and close properly
   - Test mobile menu responsiveness
   - Check tab navigation in settings dialog

2. **Component Testing**
- Verify all modals open and close correctly (settings, share,
load/save)
   - Test tooltips and popovers
   - Check form controls in different dialogs

3. **Layout Testing**
   - Test responsiveness on different screen sizes
   - Verify proper alignment of elements
   - Check dark mode compatibility

4. **Specific Features to Test**
   - Compiler selection and options
   - Share dialog functionality
   - Settings dialog
   - Tree view (IDE mode)
   - Font selection dropdown

5. **Browser Testing**
   - Test in Chrome, Firefox, Safari
   - Test in mobile browsers

## Note on Further Improvements

After this migration is stable, we could consider Phase 12: removing
jQuery dependency entirely, as Bootstrap 5 no longer requires it. This
would be a separate effort.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-04-24 12:10:37 -05:00
Matt Godbolt 03fb43066a More library hacking notes (cc @partouf in case I made any obvious blunders) 2025-04-23 10:51:05 -05:00
Matt Godbolt 58fec88694 Add a little more clarity on how libraries work 2025-04-15 10:34:06 -05:00
Patrick Quist 26c6f8eb95 Update SupportedEmulators.md 2025-04-08 18:12:04 +02:00