Before #7797, elements such as “Toggle full version output” in the
compiler version popup or the share buttons (“Short Link” etc.) would
change the cursor to a pointer on hover (like normal links do), but this
was lost when they were switched to use `link-primary`.
This PR restores the previous behaviour.
## Summary
This PR improves the pre-commit hook performance by:
- Using `vitest related` to run only tests affected by changed files
- Adding ability to skip expensive tests (filter tests) during
pre-commit
- Providing a consistent mechanism for skipping expensive tests
## Changes
- Modified `lint-staged.config.mjs` to run `vitest related` with
`SKIP_EXPENSIVE_TESTS=true`
- Updated `test/filter-tests.ts` to use idiomatic `describe.skipIf()`
for conditional test execution
- Changed `test-min` script to use `SKIP_EXPENSIVE_TESTS` environment
variable instead of `--exclude`
- Updated `CLAUDE.md` with documentation about the new test workflow
## Impact
- Pre-commit hooks are now much faster as they:
- Only run tests related to changed files
- Skip 688 expensive filter tests
- Use the same skipping mechanism as `npm run test-min`
## Testing
- ✅ Verified `vitest related` correctly identifies and runs related
tests
- ✅ Confirmed filter tests are skipped when `SKIP_EXPENSIVE_TESTS=true`
- ✅ Tested that full test suite still runs all tests when env var is not
set
- ✅ Pre-commit hooks work correctly with the new setup
🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Fixes EBADF error in HeaptrackWrapper by removing redundant file
descriptor close operation
- The net.Socket takes ownership of the FD and closes it during cleanup,
making manual close unnecessary and dangerous
## Root Cause Analysis
The issue occurred in `lib/runtime-tools/heaptrack-wrapper.ts:133` where
the code attempted to manually close a file descriptor that was already
owned by a `net.Socket`. When creating a socket with `new
net.Socket({fd: fd})`, the socket takes ownership of the file descriptor
and closes it during cleanup operations like `resetAndDestroy()`.
Attempting to close the FD again results in:
1. EBADF errors when the FD hasn't been recycled
2. Potentially closing a different resource if the FD has been recycled
by the OS
## Solution
Removed the manual `oldfs.close(fd)` call since the socket handles FD
cleanup automatically. This prevents both the EBADF error and the more
dangerous scenario of closing recycled file descriptors.
## Verification
Created tests to verify that `net.Socket` takes ownership of file
descriptors:
```javascript
// Test confirms that after socket.destroy(), the FD is no longer valid
const fd = fs.openSync(pipePath, O_RDWR | O_NONBLOCK);
const socket = new net.Socket({ fd: fd, readable: true, writable: true });
socket.destroy();
// fs.fstatSync(fd) throws EBADF - confirming FD was closed by socket
```
## Test Plan
- [x] TypeScript compilation passes
- [x] Minimal test suite passes
- [x] Pre-commit hooks pass
- [x] Created unit test to verify net.Socket FD ownership behavior
Fixes COMPILER-EXPLORER-EA7
🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
- removes config for firejail (unused, and doesn't exist on aarch64)
- copies execution config to aarch64prod, aarch64staging (as that's the
path that is looked for by the environment)
- unifies c and c++ aarch64 config to "supportBinary" for aarch64
compilers
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>
Root cause: Source mapping happens AFTER beforeSend/ignoreErrors processing, so
frame.filename contains minified bundle paths, not readable source paths.
Changes:
- Add 'Canceled' to ignoreErrors array for clipboard cancellation errors
- Remove frame-based clipboard filtering (doesn't work with minified code)
- Add comprehensive comments explaining source mapping timing issue
- Keep hit testing filter using error message content (works with minified code)
- Document that frame-based filtering is unreliable for Monaco errors
This should finally stop the 20k+ COMPILER-EXPLORER-CGQ clipboard cancellation errors.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds Sentry debugging to capture actual runtime filter data including:
- Error value and type received by filter
- Frame filenames array
- Boolean results of hasClipboardFrame and isCancellationError checks
- Whether filter should have triggered
This will help identify why the filter isn't working despite appearing correct.
Will be removed once issue is identified.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Summary
Fixed the clipboard cancellation filter that was deployed but not
working due to `SentryCapture` context modification.
## Root Cause
The filter was checking for exact equality:
```typescript
event.exception.values[0].value === 'Canceled'
```
But `SentryCapture()` modifies error messages by adding context:
- Original: `"Canceled"`
- Modified: `"Canceled\nSentryCapture Context: Unhandled Promise
Rejection"`
## Solution
Changed to use `startsWith('Canceled')` which:
- ✅ Catches original error: `"Canceled"`
- ✅ Catches modified error: `"Canceled\nSentryCapture Context: ..."`
- ✅ More precise than `includes()` - reduces false positives
- ✅ Still combined with specific stack trace check for safety
## Test Plan
- [x] TypeScript type checking passes
- [x] Pre-commit hooks pass
- [ ] Deploy and verify clipboard cancellation errors are filtered
This should finally stop the 20k+ COMPILER-EXPLORER-CGQ occurrences.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
Fixed two Monaco Editor error filters that weren't working due to
misunderstanding the Sentry event structure:
• **COMPILER-EXPLORER-CGQ (Clipboard cancellation)**: Filter was
checking for `'Canceled: Canceled'` but actual error value is just
`'Canceled'`
• **COMPILER-EXPLORER-AXA (Hit testing)**: Filter was checking
`frames[0].function` but due to Sentry wrapping, the function name
appears in the error message instead
## Root Cause
The key insight was examining the actual JSON from Sentry UI rather than
making assumptions:
- Sentry UI displays "type: value" format but JSON has separate `type`
and `value` fields
- `frames[0]` is often Sentry's wrapper (`sentryWrapped`), not the
original error source
- Function names may appear in error messages rather than frame metadata
## Changes
1. **Fixed clipboard filter**: Changed error value check from
`'Canceled: Canceled'` to `'Canceled'`
2. **Fixed hit testing filter**: Changed from checking
`frames[0].function` to checking error message content
3. **Added debugging comments**: Comprehensive notes for future Sentry
filter debugging
## Test Plan
- [x] TypeScript type checking passes
- [x] Minimal test suite passes
- [x] Pre-commit hooks pass
- [ ] Deploy and verify errors are filtered in production
Both issues have 10k+ occurrences so this should significantly reduce
Sentry noise.
🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>