RepoPilot

agalwood / motrix

Search agalwood/motrix

GitHub

Code

How agalwood/motrix is laid out, and where to start for common changes.

B
Architecture grade
score 84/100
3
Import cycles
lower is better
319
Files mapped
342 imports between them
97%
Layering
of imports point one way

From the map of which files import which, built when the code was last read in full. It shows what depends on what, not a reading order.

Module map

Shade by
Entry points and orchestratorsFoundationStandaloneshared144 files · 100+ commitsrenderer590 files · 100+ commitscore374 files · 100+ commitsmain119 files · 100+ commitsserver50 files · 69 commitstest-utils19 files · 22 commitspreload2 files · 9 commitsenv.d1 file · 1 commit

8 modules, 1 links. A link means one module imports another; thicker lines mean more imports. Links come from 319 of 1,443 source files, so the real counts are higher. Select a module to trace it: blue lines go to what it uses, orange lines come from what uses it.

shared14410100+Foundation
renderer59000100+Standalone
core37400100+Standalone
main11900100+Standalone
server500069Standalone
test-utils190022Standalone
preload2019Entry or leaf
env.d1001Standalone

Where to start reading

  1. Repository root
  2. Repository root
  3. Likely public API
  4. Likely public API
  5. Likely start-up file
  6. Suggested starting pointAI
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add a new MDXP command for extensions/CLI

  • Add command constant to the commands catalog
  • Register handler in bridge receiver's dispatch switch
  • Implement business logic in appropriate service (e.g., task-activity-service.ts)
  • Add validation rules in validators.ts if command accepts parameters

Add a new React UI component for desktop

  • Create component file in src/renderer/components/ with .tsx extension
  • Import and invoke preload API via context from src/preload/api.ts for bridge communication
  • Add component test file with .test.tsx extension
  • Integrate into app-root.tsx or parent component tree

Add native integration for desktop/server hybrid feature

  • Implement desktop-specific handler in src/main/bridge/ module
  • Implement headless-specific handler in src/server/bridge/ module
  • Expose command through shared commands catalog
  • Add integration test covering both desktop and server paths

Change the public API

Trace runtime behavior

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.
  • Some entry points named in the manifest are build output or are missing from the file list, so their source is not shown.

Code quality and hotspots

Largest source files

  • Branch points104 per file on average
  • Code issues0 errors, 3 warnings
  • Largest file2,072 lines
  • Hotspot load4 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions9 workflows
  • Tests1,091 test filesJest/Vitest · 0.76 test files per source file (file count, not coverage)
  • Dependency updatesNo config detected

Test folders: e2e · e2e/bridge · e2e/bridge/fixtures/test-extension

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.