Commit Graph
10236 Commits
Author SHA1 Message Date
Matt Godbolt c8dcbd5acf Merge branch 'main' into claude-mg/explain 2025-05-31 09:09:02 -05:00
Matt Godbolt 86f37b0ada Fix js gh-14996 2025-05-31 09:08:46 -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
Partouf a6dad502d4 hotfix msvc execution gh-14995 2025-05-31 15:06:18 +02:00
Partouf 218d24c43f remove msvc compiler that we dont have 2025-05-31 15:05:36 +02: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>
gh-14994
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
Matt Godbolt 4f4cb67cfe Use an actual released compiler for vc 17.11 (#7748)
Closes #7745. Hopefully

I followed
https://github.com/compiler-explorer/infra/blob/main/docs/adding_msvc_compilers.md
with an official 17.11.6 compiler
gh-14993
2025-05-30 17:32:02 -05:00
Matt Godbolt fca3aa69bd Merge remote-tracking branch 'origin/main' into claude-mg/explain gh-14992 2025-05-30 17:27:33 -05:00
Matt GodboltandClaude 239b3f470c Add DynamoDB support for Google URL shortener (#7724)
## Summary
- Add DynamoDB support to Google URL shortener to check in preference to goo.gl itself (which will be going away)
- Update ShortLinkResolver to accept AWS properties and use DynamoDB table `goo-gl-links`
- First check DynamoDB for fragment lookup before falling back to Google URL shortener (for now)
- Refactor resolve method to use async/await instead of raw promises for better readability
- Add awsProps to ServerDependencies and pass through component hierarchy
- Configure googleLinksDynamoTable property in AWS config files (defaults to empty)

## Implementation Details
- When `googleLinksDynamoTable` property is configured, `ShortLinkResolver` creates a DynamoDB client
- DynamoDB table uses `fragment` as the key and stores `expanded_url`
- Maintains backwards compatibility by falling back to Google URL (for now) shortener if DynamoDB is not configured or lookup fails
- Google URL shortener fallback will be removed in August 2025 when the service shuts down

## Test plan
- [x] All existing tests pass
- [x] TypeScript compilation succeeds
- [x] Linting passes
- [x] Updated tests to accommodate new awsProps parameter
- [x] Verify fallback to Google URL shortener when DynamoDB not
configured
- [x] Manual testing

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-30 17:27:29 -05:00
Marc Poulhiès 15666b4b7f Add GCC 14.3 (#7725)
fixes compiler-explorer/compiler-explorer#7693
2025-05-30 17:27:29 -05:00
Spencer Fricke d066e773b4 Update Khronos Logos (#7726) 2025-05-30 17:27:29 -05:00
Patrick Quist f34c582637 Refactor objdump execution to use BaseObjdumper class (#7715) 2025-05-30 17:27:29 -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 cd06c2d286 Add Rust crate ahash v0.8.12 (#7723)
This PR adds the Rust crate **ahash** version 0.8.12 to Compiler
Explorer.

Related PR: https://github.com/compiler-explorer/infra/pull/1633
gh-14989
2025-05-30 18:27:43 +02:00
Quinton Miller 984b47e666 Update Crystal to 1.16.3 (#7736) gh-14988 2025-05-30 09:27:18 -05:00
Alfredo Correa 399a72a773 Add bmpi3 (#7735)
Proposing to add the B-MPI3 library to the live site.
https://gitlab.com/correaa/boost-mpi3

Followed the steps as best as I could in based on other gitlab type
libraries (bmulti)

Feedback on improving the hooks and the organizations of files in the
repository is welcome.
The goal is to include the library by doing
#include<mpi3/communicator.hpp>.
gh-14987
2025-05-30 09:26:45 -05:00
Rob Parolin 157662eb31 [mojo-lang] Fixing LLVM IR panel due to calling the mojo compiler with incorrect args. (#7716)
This PR fixes the LLVM IR output for the Mojo compiler integration,
ensuring the LLVM IR panel works correctly and no longer shows "Internal
error; unable to open output path" errors.
gh-14986
2025-05-30 07:48:28 -05:00
narpfel 20bae12039 Add Miri tool for Rust (#7718)
Resolves
https://github.com/compiler-explorer/compiler-explorer/issues/2563.

`misc-builder` PR:
https://github.com/compiler-explorer/misc-builder/pull/112
`compiler-workflows` PR:
https://github.com/compiler-explorer/compiler-workflows/pull/36
`infra` PR: https://github.com/compiler-explorer/infra/pull/1631

Screenshot:

![miri-tool](https://github.com/user-attachments/assets/d866bb42-a242-445b-be52-6fd0b3c877bb)
gh-14985
2025-05-30 07:17:01 -05:00
Patrick Quist abe7d9c836 fixes for windows execution (#7740) gh-14980 2025-05-30 04:53:20 +02:00
T 3859bdda5a Add zig 0.14.1 and make it the default zig compiler (#7737)
zig `0.14.1` released on 2025-05-21.

The corresponding infra PR:
https://github.com/compiler-explorer/infra/pull/1639
gh-14976
2025-05-29 11:01:22 -05:00
Partouf c473db498c get rid of cewrapper error gh-14972 2025-05-28 16:47:28 +02:00
Partouf 2e0549b3fb more fixes gh-14971 2025-05-28 15:21:02 +02:00
Partouf d16d717220 hotfix windows gh-14970 2025-05-28 14:49:51 +02:00
Partouf de3e34bda8 windows hotfix gh-14969 2025-05-28 14:00:09 +02:00
Patrick Quist 2e76639163 Windows library support (#7554)
Huray
gh-14967
2025-05-28 10:50:26 +02:00
Partouf 50e504d304 golang prop fixes gh-14966 2025-05-28 10:50:12 +02:00
Matt GodboltandCopilot 1831edc227 Refactor startup to catch exceptions where they're thrown. (#7734)
Fixes issues with missing components (e.g. from beta, 'explain')

The issue was that the exceptions are thrown in `initLayout`, not in the
constructor.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
gh-14959
2025-05-27 12:43:56 -05:00
Matt GodboltandClaude e3ff68f4dd Fix Vitest timeout deprecation warnings (#7733)
## Summary
This PR updates test files to use the new Vitest timeout syntax,
resolving deprecation warnings.

## Changes
- Updated `test/packager-tests.ts` to pass timeout as a number instead
of `{timeout: 5000}`
- Updated `test/filter-tests.ts` to pass timeout as a number instead of
`{timeout: 10000}`

## Details
Vitest now expects timeouts to be passed directly as a number as the
third parameter to `it()`, rather than as an object. This change updates
all occurrences to use the new syntax.

## Test plan
- [x] All existing tests continue to pass
- [x] No deprecation warnings are shown when running tests
- [x] Linter and type checks pass

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

Co-authored-by: Claude <noreply@anthropic.com>
gh-14952
2025-05-27 12:17:44 -05:00
Matt GodboltandClaude d27d59fc1e Add DynamoDB support for Google URL shortener (#7724)
## Summary
- Add DynamoDB support to Google URL shortener to check in preference to goo.gl itself (which will be going away)
- Update ShortLinkResolver to accept AWS properties and use DynamoDB table `goo-gl-links`
- First check DynamoDB for fragment lookup before falling back to Google URL shortener (for now)
- Refactor resolve method to use async/await instead of raw promises for better readability
- Add awsProps to ServerDependencies and pass through component hierarchy
- Configure googleLinksDynamoTable property in AWS config files (defaults to empty)

## Implementation Details
- When `googleLinksDynamoTable` property is configured, `ShortLinkResolver` creates a DynamoDB client
- DynamoDB table uses `fragment` as the key and stores `expanded_url`
- Maintains backwards compatibility by falling back to Google URL (for now) shortener if DynamoDB is not configured or lookup fails
- Google URL shortener fallback will be removed in August 2025 when the service shuts down

## Test plan
- [x] All existing tests pass
- [x] TypeScript compilation succeeds
- [x] Linting passes
- [x] Updated tests to accommodate new awsProps parameter
- [x] Verify fallback to Google URL shortener when DynamoDB not
configured
- [x] Manual testing

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
gh-14948
2025-05-26 16:24:04 -05:00
Marc Poulhiès 2777ed482d Add GCC 14.3 (#7725)
fixes compiler-explorer/compiler-explorer#7693
gh-14944
2025-05-26 22:10:40 +02:00
Spencer Fricke c2a02c7d8f Update Khronos Logos (#7726) gh-14932 2025-05-25 16:12:33 +00:00
Patrick Quist 7f393e6763 Refactor objdump execution to use BaseObjdumper class (#7715) gh-14928 2025-05-25 17:21:01 +02:00
Patrick Quist b99653804c Update SupportedEmulators.md gh-14916 2025-05-24 19:29:25 +02:00
Patrick Quist 6fb3ab38e7 Add Game Boy emulator support using WasmBoy (#7717) gh-14915 2025-05-24 18:43:41 +02:00
Matt Godbolt e58cd64ecc Add ideas gh-14918 2025-05-24 08:57:57 -05:00
Matt Godbolt 358810958b More thoughts gh-14912 2025-05-23 17:17:02 -05:00
Matt Godbolt cd62938744 Update with progress gh-14911 2025-05-23 15:39:10 -05:00
Matt Godbolt c38e6be044 Merge remote-tracking branch 'origin/main' into claude-mg/explain gh-14907 2025-05-23 12:32:28 -05:00
Matt Godbolt 43776830b5 Add simple disclaimer 2025-05-23 12:32:21 -05:00
Matt GodboltandClaude 27464ee7b1 Add caching to Claude Explain feature and improve UI
- Implement LRU caching for explain API responses to prevent redundant requests
- Add reload button to bypass cache when needed
- Fix flexbox layout issues with proper container structure
- Replace custom loading element with standard status icon (spinner/check/error)
- Keep success icon visible instead of auto-hiding
- Always cache explain responses (independent of global compiler cache setting)
- Rename ExplainHtmlView to ExplainView for clarity
- Clean up redundant CSS and rely on Bootstrap utilities

The caching uses the same LRU strategy as CompilerService with a 200KB limit.
Cache keys are generated from language, compiler, code, options, and assembly.

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

Co-Authored-By: Claude <noreply@anthropic.com>
gh-14906
2025-05-23 12:28:37 -05:00
Matt GodboltandClaude 5b3c487467 Migrate Claude Explain from Tool to Pane
This change converts Claude Explain from a backend "Tool" to a proper frontend "Pane",
providing a cleaner architecture and better user experience.

Major changes:
- Add Claude Explain as a pane in the "Add new..." dropdown for all languages
- Remove server-side ExplainTool and all tool configurations from property files
- Move API endpoint configuration to global options (explainApiEndpoint)
- Update event handling from tool events to pane-specific events (explainViewOpened/Closed)
- Make button visibility conditional on API endpoint configuration
- Trigger recompilation when Claude Explain pane is opened

Benefits:
- Universal availability across all languages without per-language configuration
- No need for fake binaries (/bin/true) or server-side stubs
- Cleaner architecture with all logic in the frontend
- Better UX with Claude Explain appearing alongside other analysis panes
- Automatic recompilation when opened, matching behavior of AST/Opt viewers

Technical details:
- Register EXPLAIN_VIEW_COMPONENT_NAME and factory in hub.ts
- Add button to compiler.pug with conditional visibility
- Update ExplainHtmlView to emit pane events and use global API endpoint
- Remove redundant getCurrentState() override
- Clean up all references to the old tool implementation

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

Co-Authored-By: Claude <noreply@anthropic.com>
gh-14900
2025-05-23 09:25:54 -05:00
narpfel 91a2d58aa2 Make 2024 the default edition for Rust >= 1.85 (#7649)
Resolves #7472.
gh-14897
2025-05-23 03:01:26 +02:00
Matt Godbolt 5bdf6e0c80 Add explain to amazon tools gh-14886 2025-05-22 15:50:05 -05:00