39 Commits
Author SHA1 Message Date
Matt Godbolt (bot acct)andmattgodbolt-molty 83b241ae80 feat(cypress): executor, GCC dump, preprocessor, opt remarks, and shortcut tests (#8489)
## Summary

14 new Cypress E2E tests across 5 new spec files, plus shared helpers
extracted to utils.ts.

### New test files

| File | Tests | What it covers |
|------|-------|----------------|
| `execute.cy.ts` | 4 | Executor pane: open, stdout, stderr, non-zero
exit codes |
| `gccdump.cy.ts` | 3 | GCC Tree/RTL dump: open, pass picker, dump
content |
| `pp-view.cy.ts` | 4 | Preprocessor: open, `#define` expansion,
`#include` macro expansion, source change updates |
| `opt-view.cy.ts` | 2 | Optimisation remarks: open, shows remarks with
`-O2` |
| `shortcuts.cy.ts` | 1 | Ctrl+Enter triggers recompilation |

### Shared helpers added to utils.ts

- `openPaneFromCompiler(buttonId)` — generic helper for any compiler
toolbar pane button
- `openExecutor()`, `openGccDump()`, `openPreprocessor()`,
`openOptRemarks()` — convenience wrappers

### Result

- Total test count: 82 (68 existing + 14 new)
- All passing locally and should pass on CI (uses only `gdefault`)

*(I'm Molty, an AI assistant acting on behalf of @mattgodbolt)*

🤖 Generated by LLM (Claude, via OpenClaw)

---------

Co-authored-by: mattgodbolt-molty <mattgodbolt-molty@users.noreply.github.com>
2026-02-18 20:39:27 -06:00
Matt Godbolt (bot acct)andmattgodbolt-molty 0f2928f027 refactor(cypress): extract shared helpers to utils.ts (#8488)
## Summary

Refactors the Cypress test suite to extract common helpers into
`cypress/support/utils.ts`, making it simpler to add new tests.

### Changes

- **Shared helpers extracted to utils.ts**: `findPane()`,
`sourceEditor()`, `compilerOutput()`, `compilerPane()`,
`waitForEditors()`, `setupAndWaitForCompilation()`, `visitPage()`, and
many more
- **New workflow helpers**: `addCompilerFromEditor()`,
`addCompilerFromCompilerPane()`, `openConformanceView()`,
`addConformanceCompiler()`, `openDiffView()`, `allCompilerTabs()`,
`compilerEditorFromTab()`, `compilerPaneFromTab()`,
`lastCompilerContent()`
- **Template literals**: Replaced `.join('\n')` array patterns with
backtick multiline strings
- **Bug fix**: `frontend.cy.ts` hardcoded `localhost:10240` instead of
using `baseUrl` — now uses relative URL
- **Deprecated**: Marked `clearAllIntercepts()` as deprecated with
explanation of why the name is misleading

### Result

- Net reduction of ~110 lines across test files
- All 68 tests pass (7 spec files)
- Adding a new test now typically needs just 3-4 lines of well-named
helper calls
- No changes to test behaviour or coverage

*(I'm Molty, an AI assistant acting on behalf of @mattgodbolt)*

🤖 Generated by LLM (Claude, via OpenClaw)

---------

Co-authored-by: mattgodbolt-molty <mattgodbolt-molty@users.noreply.github.com>
2026-02-18 13:34:46 -05:00
Matt Godbolt (bot acct)andmattgodbolt-molty fee671eb0c Cypress E2E tests: conformance view, diff view, multi-compiler (#8484)
## Summary

Adds 11 new Cypress E2E tests across 3 new test files, covering
conformance view, diff view, and multi-compiler pane workflows.

*(I'm Molty, an AI assistant acting on behalf of @mattgodbolt)*

## New Test Files

### `conformance.cy.ts` (5 tests)
- Opens conformance view from editor dropdown
- Verifies pass indicator (fa-check-circle) for clean compilation
- Verifies fail indicator (fa-times-circle) for static_assert failure
- Source change updates pass/fail status dynamically
- Multiple compilers with different -D flags showing pass + fail
simultaneously

### `multi-compiler.cy.ts` (4 tests)
- Adds second compiler pane from editor dropdown
- Different -D flags produce different output in separate panes
- Cloning a compiler inherits its options
- Source change triggers recompilation in all panes

### `diff.cy.ts` (2 tests)
- Opens diff view from the Add menu
- Verifies diff content with two compiler panes (auto-selected)

## Approach

All tests use only gdefault (the single compiler available on CI
runners), using preprocessor conditionals (#ifdef) with -D flags to
produce different compilation outputs. This avoids any dependency on
specific compiler versions being installed.

## Test Duration

~55 seconds for all 11 new tests (headless Chrome).

## Follows from

PR #8478 (merged) which added the initial compile workflow tests.

---------

Co-authored-by: mattgodbolt-molty <mattgodbolt-molty@users.noreply.github.com>
2026-02-18 07:06:57 -06:00
Matt Godbolt (bot acct)andmattgodbolt-molty ad480589d2 WIP: Cypress E2E tests for core compilation workflow (#8478)
*(I'm Molty, an AI assistant acting on behalf of @mattgodbolt)*

## What

Adds Cypress E2E tests for the core CE workflow — writing code, seeing
assembly output, and interacting with panes.

## Tests (14 total)

**Basic compilation (2)**
- Default code compiles on load and assembly appears
- Recompilation when source code changes

**Source-assembly line linking (2)**
- Hover over source → assembly lines highlight
- Hover over assembly → source lines highlight

**Compiler options (1)**
- `-DCYPRESS_TEST` toggles `#ifdef` branch correctly

**Output filters (2)**
- Toggling directives filter off shows `.cfi_startproc`
- Toggling comments filter off shows `GNU C++` comment lines

**Compilation errors (1)**
- Invalid code shows "Compilation failed" message

**Output pane (3)**
- Valid code → "Compiler returned: 0"
- Invalid code → `error:` messages with non-zero return
- Undeclared identifier appears in error output

**Editor interactions (3)**
- Add a second source editor
- Add a second compiler
- Both compilers produce assembly independently

## Utilities added

- `monacoEditorTextShouldContain` / `monacoEditorTextShouldNotContain` —
retrying assertions that handle Monaco's non-breaking space (U+00A0)
rendering
- `getMonacoEditorText` — normalised text extraction from Monaco
view-lines
- `findPane(titleMatch)` — robust GoldenLayout pane discovery via tab
titles

---
🤖 Generated by LLM (Claude, via OpenClaw)

---------

Co-authored-by: mattgodbolt-molty <mattgodbolt-molty@users.noreply.github.com>
2026-02-16 21:04:18 -06:00
Matt Godbolt (bot acct)andmattgodbolt-molty e0e7647e10 fix: add node_modules to cypress typeRoots (#8482)
Cypress bundles its types at `node_modules/cypress/types/` rather than
in `@types`, so the `typeRoots` array in `cypress/tsconfig.json` needs
to include `../node_modules` in addition to `../node_modules/@types`.

Without this, `npx tsc -p cypress/tsconfig.json --noEmit` fails with:
```
TS2688: Cannot find type definition file for 'cypress'
```

Fixes #4831

*(I'm Molty, an AI assistant acting on behalf of @mattgodbolt)*

---------

Co-authored-by: mattgodbolt-molty <mattgodbolt-molty@users.noreply.github.com>
2026-02-16 19:42:54 -06:00
Matt Godbolt 1f118e6889 Update monaco-editor from 0.49 to 0.55 (#8426)
Bump `monaco-editor` from `^0.49.0` to `^0.55.1` (resolves to 0.55.1).

## What changed in Monaco 0.49 → 0.55

- **0.50–0.52**: Minor additions (placeholder, compactMode, new editor
options)
- **0.53**: AMD build deprecated (we use ESM via webpack — unaffected)
- **0.54**: New `mouseMiddleClickAction` option, bug fixes
- **0.55**: Nested language namespaces moved to top level
(`languages.typescript` → `typescript`, etc.) — we don't use any of
these

## No breaking changes affect our usage

- `deltaDecorations` still works (soft-deprecated since 0.34); existing
TODOs in ast-view and ir-view track migration to
`createDecorationsCollection`
- No removed APIs are used by CE
- `monaco-vim` 0.4.4 has a wildcard peer dep — works fine
- Webpack plugin stays pinned at 7.1.0 due to upstream bug
[microsoft/monaco-editor#5073](https://github.com/microsoft/monaco-editor/issues/5073)
— see #8214 for tracking

Closes #7881

## Testing

- ✅ `npm run ts-check` — all 4 projects pass (backend, frontend, tests,
frontend-tests)
- ✅ `npm run test-min` — 1382 tests passed
- ✅ Dev server: UI renders, compilation works, source-to-asm line
mapping works, vim mode works
- ✅ Zero browser console errors/warnings

---
🤖 *This PR was generated by an LLM (Claude, via OpenClaw)*
2026-02-03 20:25:34 -06:00
Matt GodboltandClaude 65e4f302b7 URL serialization refactoring and Cypress test improvements (#8215)
## Summary
This PR makes URL serialization logic available to Node.js contexts
(like Cypress tests) and replaces a hard-coded 4812-character base64 URL
in tests with programmatically generated state. This builds on the
shared utilities refactoring from #8246.

### Changes

#### 1. Extract URL Serialization to Shared Module
**Problem:** URL serialization code depended on GoldenLayout's
browser-only ConfigMinifier, preventing Cypress spec files from
importing it (they load in Node.js before running in browser).

**Solution:** Created `shared/url-serialization.ts` with a
Node-compatible ConfigMinifier reimplementation.

**Technical Details:**
- Reimplemented GoldenLayout's ConfigMinifier without browser
dependencies
- Moved serialization functions (`serialiseState`, `deserialiseState`,
`risonify`, `unrisonify`) to shared module
- Moved minification functions (`minifyConfig`, `unminifyConfig`) to
shared module
- Updated `static/url.ts` to use shared module instead of GoldenLayout
- Added comprehensive test coverage in `test/url-serialization.ts`

**Files:**
- **New:** `shared/url-serialization.ts` (~279 lines)
- **Modified:** `static/url.ts` (removed ~30 lines, eliminated
GoldenLayout dependency)
- **New:** `test/url-serialization.ts` (~96 lines)

#### 2. Replace Hard-coded Cypress URL with Programmatic State
**Before:** A hard-coded 4812-character base64 URL containing state for
all panes
```typescript
cy.visit('http://localhost:10240/#z:OYLghAFBqd5TB8IAsQGMD2ATApgUWwEsAXTAJwBoiQIAzIgG...');
```

**After:** Programmatically generated state using
`buildKnownGoodState()` function
```typescript
const state = buildKnownGoodState();
const hash = serialiseState(state);
cy.visit(`http://localhost:10240/#${hash}`, {...});
```

**Benefits:**
- Human-readable, maintainable test state
- Programmatic generation from `PANE_DATA_MAP` keys
- Layout optimized with 8 panes per row
- Produces identical compressed URL format
- Much easier to add/modify panes in the future

#### 3. PANE_DATA_MAP Consistency Improvements
Updated `PANE_DATA_MAP` to use component names exactly as registered
with GoldenLayout:

**Key renames:**
- `preprocessor` → `pp`
- `llvmir` → `ir` 
- `pipeline` → `llvmOptPipelineView`
- `mir` → `rustmir`
- `hir` → `rusthir`
- `macro` → `rustmacroexp`
- `core` → `haskellCore`
- `stg` → `haskellStg`
- `cmm` → `haskellCmm`
- `dump` → `gccdump`
- `tree` → `gnatdebugtree`
- `debug` → `gnatdebug`

**Added panes:** `codeEditor`, `compiler`, `conformance`, `output` (were
missing from map)

**Re-enabled tests:**
- `yul` pane test (was commented out, now fixed)
- `clojuremacroexp` pane test (was commented out, now fixed)
- `cfg` pane test (had TODO, now removed)

**Why this matters:** The `buildKnownGoodState()` function uses
`Object.keys(PANE_DATA_MAP)` as the `componentName` property, so keys
must match the actual registered component names for GoldenLayout to
find them.

## Test Plan
- [x] All Cypress tests pass (confirmed by @mattgodbolt)
- [x] TypeScript compilation passes (`npm run ts-check`)
- [x] Linting passes (`npm run lint`)
- [x] URL serialization tests pass (3/3 tests)
- [x] Pre-commit hooks pass
- [x] Related vitest tests pass

## Dependencies
- Builds on #8246 (shared utilities refactoring - already merged)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-04 14:09:01 -06:00
Matt Godbolt 83a796400e Disable yul frontend tests for now 2025-11-04 10:43:12 -06:00
LJ 5a15d893d7 Add support for Yul intermediate view when compiling Solidity (#8219)
## What

Adds support for seeing Yul (Solidity IR) as intermediate output when
compiling Solidity.

This PR also enables that view for the Resolc compiler.

### Main Additions

- [x] Support viewing Yul in a supplementary view
- Solidity compilers can enable this by setting
`this.compiler.supportsYulView = true` in the compiler's constructor
- If custom processing of the Yul output or the Yul output filename is
needed, the compiler can override `processYulOutput()` or
`getYulOutputFilename()`
- [x] Enable the Yul view for Resolc
- [x] Implement a Yul backend option for filtering out debug info from
the output

### Notes

Source mappings are currently not handled for Yul -> Solidity.

## Overall Usage

### Steps

* Choose Solidity as the language
* Choose a Resolc compiler
* View intermediate results:
  * Yul
* (Hide/show debug info by toggling "Hide Debug Info" in the Yul view
filters)

## Screenshots

<img width="1502" height="903" alt="ce-yul-view"
src="https://github.com/user-attachments/assets/ccc897e2-cd8d-4c33-962c-522d60b63134"
/>
2025-11-04 09:00:19 -06:00
Matt Godbolt 5fa44c49bc Disable clojure pane test 2025-10-22 11:23:38 -05:00
Frank Leon RoseandMatt Godbolt b9dc265973 Clojure language support (#8146)
<img width="1405" height="474" alt="Clojure in Compiler Explorer 2"
src="https://github.com/user-attachments/assets/76dfed9b-d0eb-4764-b371-9c6023088a50"
/>

With Macro Expansion:
<img width="1642" height="594" alt="image"
src="https://github.com/user-attachments/assets/8b511af9-3617-426e-868d-5a99e5db5756"
/>

TODO
- [x] Language configuration
- [x] Compile via wrapper
  - Inject namespace if necessary to simplify minimal code sample
  - Parse Unix style command line parameters into compiler bindings
  - Place file in path according to namespace
- [x] Install some versions of Clojure [PR
here](https://github.com/compiler-explorer/infra/pull/1849)
- [x] Macroexpansion view (modeled on Rust macro expansion view)
- [x] Filter out command line options that would break wrapper operation
- [x] ~~Parse `--help` output to a list of options~~ Reverted because
not applicable.
- [x] Short form compiler options
- [x] Support Clojure compiler settings via env var, like
`JAVA_OPTS=-Dclojure.compiler.direct-linking=true
-Dclojure.compiler.elide-meta=[:doc,:file]`

NOT DOING
- [x] ~~Support loading dependencies~~ Non-trivial enhancement. Not
necessary for initial release.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2025-10-22 09:04:20 -05:00
Matt Godbolt c602745856 Make Explain generally available (#8103) 2025-09-18 17:47:54 -05:00
Matt Godbolt f824efe73e Library updates and lint fixes (#8099)
* Minor updates only
* Added explicit radix parameter (10) to all Number.parseInt() calls throughout the codebase (new lint rule)
* Updated several @ts-ignore comments to @ts-expect-error for better TypeScript practices (new lint rule)
* Removed unnecessary @ts-ignore comments in some mode files (ditto)
* Used "none return" based arrow functions for some map stuff
* Replaced a `map()` call that didn't return anything to a for() loop
* Fixed up some cypress stuff, noting work for the future
2025-09-12 14:23:49 -05:00
Matt Godbolt b213c9a781 Update claude explain configuration (#8069) 2025-08-27 11:35:35 -05:00
Matt GodboltandClaude df43146b8c Improve TypeScript type safety in Cypress tests (#7997)
Address Copilot feedback by replacing `any` types with proper TypeScript
types in Cypress test files.

## Changes

**cypress/support/utils.ts:**
- `win: any` → `win: Cypress.AUTWindow`
- `$element: any` → `$element: JQuery<HTMLTextAreaElement>`
- `$body: any` → `$body: JQuery<HTMLElement>`

**cypress/e2e/claude-explain.cy.ts:**
- `req: any` → `req: Cypress.Interception` (3 instances)
- `url: any` → `url: string`

## Benefits

- Improves type safety and catches potential runtime errors at compile
time
- Follows TypeScript best practices
- Addresses all Copilot suggestions for better code quality
- No functional changes, purely type improvements

All TypeScript checks pass and no functionality is affected.

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-05 16:54:24 -05:00
Matt Godbolt 50ec53d0e7 Add comprehensive Cypress E2E tests for Claude Explain feature (#7751)
- Add comprehensive test suite covering all Claude Explain functionality:
  - Basic pane opening and consent flow
  - no-ai directive detection
  - API interactions and error handling
  - Options/customization features
  - Caching behavior and persistence
  - Compilation state handling
  - State persistence across page loads

- Fix caching bug in explain-view.ts:
  - Cache was incorrectly implemented as instance variable, losing cached explanations when panes were closed/reopened
  - Made cache static to persist across all pane instances (matches consent persistence pattern)
  - Fixes failing "Caching and reload" Cypress test
  - Aligns implementation with documented behavior: "shared across all explain views in the session"

- Add test utilities and helpers:
  - Monaco editor content manipulation using clipboard events
  - Claude Explain specific helpers moved to test file
  - General utilities remain in utils.ts

- Performance optimizations:
  - Clear Cypress intercepts in afterEach to prevent O(n²) degradation
  - Use :visible selectors to avoid GoldenLayout template elements
  - Proper mock setup timing to prevent race conditions

- Add comprehensive README with lessons learned and best practices

All tests use fake test data (test_first, focus_a, etc.) to clearly distinguish from production values and prevent accidental API calls.
2025-08-05 16:42:48 -05:00
Matt GodboltandClaude c29ad46f3a [Not Live; disabled by default] Add Claude Explain feature for AI-powered assembly explanations (#7749)
Add Claude Explain feature for AI-powered code explanations

This PR introduces Claude Explain, a new feature that provides AI-powered explanations of compiler output directly within Compiler Explorer.

Key features:

Claude Explain functionality:
  - New explain view pane
  - Explains compiler output with full context of source code and compilation output
  - Configurable audience level and explanation type
  - Response caching to improve performance and reduce API calls
  - Usage statistics display showing requests used and token counts

User experience:
  - Consent flow on first use explaining data handling and privacy
  - AI disclaimer banner warning about potential LLM inaccuracies
  - Respects "no-ai" directive in source code for users who don't want AI processing

Privacy and security:
  - Data sent to Anthropic's Claude API as documented in privacy policy
  - No data used for model training
  - Clear consent required before first use
  - Support for opting out via "no-ai" directive

The feature is marked as beta and can be enabled via configuration.

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-05 09:31:48 -05:00
Matt Godbolt 8734c3e492 Update biome (#7956)
- latest biome, and fix its configuration
- fixes "static" content to be globally configured too (instead of
per-line)
- fixes issues:
  - imports fixed up
  - `Date.now()` vs `+new Date()`
  - some unused things `_` prefixed
 
After discussion with the team, turned off the unused parameter warning.
2025-07-28 10:34:46 -05: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 bd9e2d4cbc fix remote libraries listing backend and frontend (#7688) 2025-05-16 16:53:40 +02:00
Mats Jun Larsen 5eea63328f Migrate to Biome for linting and formatting (#7033) 2025-02-02 17:54:31 +00:00
Mats Larsen ef0c9f5ded Don't use sinon/chai code for frontend tests
Using these imply that sinon and chai will be built for the final bundle that the user downloads. This is not a good thing, because it bloats our bundle.
2024-10-28 18:59:56 +09:00
Matt Godbolt fd3dd917f5 Vitest (#6219)
Port to vitest. Port everything to typescript. Remove chai, mocha and
chai-as-promised. Adds some docs.
2024-03-08 22:25:09 -06:00
Matt GodboltandJeremy 32ddf75adc Update to ts5 (#5879)
Co-authored-by: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com>
2023-12-18 20:11:11 -06:00
J. Ryan Stinnett c3e1b04c31 Rename opt pipeline without LLVM prefix (#5828)
This prepares for future work that will reuse the opt pipeline view
outside of the LLVM ecosystem by renaming related components to remove
the LLVM prefix.

The pass dumper keep its LLVM prefix, as it is assumed this part is
likely to be customised for each compiler ecosystem.

The historical component name has been preserved in the component list
as an alias to keep old links working.
2023-12-03 11:33:42 -05:00
Matt Godbolt 6506ed6773 Fix ups for the new view in cypress tests (#5182) 2023-06-19 21:37:06 -05:00
Guo Ci 7651874a98 add Stack Usage Viewer (#5160)
For #4834
2023-06-19 20:26:15 -05:00
Matt Godbolt a8f832f80c Bump to latest cypress (#4853)
Latest cypress:
- updated all the tests
- fixed up warnings
- got rid of isolation stuff, it's now isolated by default
- added simple docs
- added `--noLocal` to prevent any local config from screwing up when
testing locally
- store screenshot artifacts if things go wrong
2023-03-14 10:00:40 -05:00
Mats Jun LarsenandMatt Godbolt 633eb82d18 Transition to ECMAScript Modules (#4780)
Makes the Compiler Explorer app, and all the tooling ESM compatible.
Things that have been done:

1. The package.json has `type: module` now
2. All relative imports have a .js ending
3. All directory imports are now directory/index.js to comply with ESM
standards
4. Dependency node-graceful is now imported into tree, because the
package is broken under esm
5. Dependency p-queue has been bumped to 7.x with ESM support
6. Dependency profanities has been bumped to 3.x with ESM support
7. Webpack config is now both ESM and CommonJS compatible
8. Non-ESM compatible imports have been rewritten
9. ESLint configuration has been tweaked to not fail on .js imports
10. Mocha is now hacked together and ran with ts-node-esm
11. Webpack is now hacked together and ran with ts-node-esm
12. Webpack config is now ESM compatible, so that it can be used in the
dev server
13. Cypress code still runs commonjs, and has been excluded from the
tsconfig
14. All sinon mock tests have been commented out, because sinon module
mocks do not work with ESModules (because ESModules are immutable)

A lot of tests are now giving warnings/errors to stdout, yet still pass.
Docenizer codegenerator scripts have been updated, but I did not re-run
them, and instead just changed their code.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-02-27 18:06:38 -06:00
Jeremy Rifkin 8e53f01553 Tsify cypress/ (#4717)
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
2023-02-12 11:06:10 -05:00
Jeremy Rifkin 1294c3f949 Control flow graph tool rework (#3899)
* Removed old code

* Base functionality

* Work on edge offsets

* Setup interval trees for edges

* linter things

* Formatting

* Added syntax highlighting

* Cleanup and simplification. Improved handling of direct dropdown edges.

* Basic zoom/pan

* Remove old blocks from output

* Fix distance calculation

* Added function selector

* Improved zoom behavior

* figue 8 logic

* Canvas scaling / repainting, updated colors

* Don't truncate output, also removed some console.logs

* Tweak to zoom system

* Replaced canvas stuff with svg

* Experimenting with adding shadows to edges

* Removed shadows, was causing problems. Improved how blocks with lots of incident edges are handled.

* Slightly improved edge system

* some work on implementing segment priority system from cutter

* Optimization to rendering process. I was worried the graph layout algorithm was causing the page to hang but it turns out it was adding elements to the page with +=

* Removed need for storing the previous segment

* refactor, splitting up some logic

* Cleaned up logic and got horizontal edges working better

* Remove vis-network dependency

* Updated package-lock, removed @import vis-network css stuff, added a todo for myself

* Cleaned up notes and error messages. Added comments. Clear the pane if there's no function to display

* Added layout time information, implemented .resize

* Light theme

* State work and bug fix for dragiing

* Re-dading lost dark theme changes

* Added jquery import

* Cleaned up console.logs

* Added basic block count

* Incorporated PR review comments; Fixed cypress (hopefully), added documentation, improved the dropdown, and fixed dropdown items not being cleared with an empty result.cfg

* Ran format
2022-11-29 22:28:10 -05:00
partouf 13053fe262 bugfix frontendtest 2022-10-12 18:37:50 +02:00
partouf ebd851e47a bugfix frontendtest 2022-10-12 18:31:15 +02:00
Markus e490978410 Convert device-view.js to typescript (#4105) 2022-10-12 17:07:04 +02:00
Rubén Rincón Blanco 8d6f171197 Cypress test to open all panes (#3953) 2022-09-04 17:31:36 +02:00
Rubén Rincón Blancoandpartouf a61b877eb1 Adds date filtering for ads (#3916)
* Adds date filtering for ads

No idea how to get test to work though :(

* move motd test to frontend testing

* bugfix isValidAd

* Add missing testcases

Co-authored-by: partouf <partouf@gmail.com>
2022-07-30 10:01:59 +02:00
Matt Godbolt f2c1e0bd31 The Grand Reformat (#3643)
* The Grand Reformat

- everything made prettier...literally
- some tweaks to include a few more files, including documentation
- minor changes to format style
- some tiny `// prettier-ignore` changes to keep a few things the way we like them
- a couple of super minor tweaks to embedded document types to ensure they format correctly
2022-05-09 23:13:50 -05:00
Rubén Rincón Blanco 48eee26d2c Group some files to their own folders (#3384)
* Group some files to their own folders

In etc/scripts/, added disasms/, docenizers/, and util/ folders
In lib/, added mapfiles/, and parsers/ folders (+moved google.js to
shortener)
In static/, added widgets/ folder

Added cypress folder to .gitignore

* Address Matt's PR reviews

* Move new Pane renaming to folder
2022-02-22 00:18:21 +01:00
Patrick Quist 51047b6ad7 Frontend testing (#3169) 2022-02-04 18:35:04 +01:00