Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
29e8320
migration spec and plan init
vagkaratzas Apr 6, 2026
c64a68d
scaffolding front- and backend folder structure + config files init, …
vagkaratzas Apr 6, 2026
f5158c4
plan, spec and migration docs revised and updated with Fable 5, seren…
vagkaratzas Jul 2, 2026
1d20b94
backend: switch to uv + python-igraph
vagkaratzas Jul 2, 2026
23ce2e0
infra: docker-compose, prod Dockerfile, nginx, CI, pre-commit (Phase …
vagkaratzas Jul 2, 2026
ec450eb
backend: GET /api/config + typed frontend client (Phase 2 complete)
vagkaratzas Jul 2, 2026
1efb6a3
backend: POST /api/network TSV parser + validation (Phase 3)
vagkaratzas Jul 2, 2026
809c893
backend: POST /api/layout with 11 igraph layouts (Phase 4)
vagkaratzas Jul 2, 2026
1f2c388
backend: clustered layout via supernode strategy (Phase 5)
vagkaratzas Jul 2, 2026
e0e01d9
backend: POST /api/topology metrics + node scaling (Phase 6)
vagkaratzas Jul 2, 2026
30298df
backend: session import/export + external API (Phase 7)
vagkaratzas Jul 2, 2026
ab2ebe8
frontend: EventBus, store, command history, typed API client (Phase 8)
vagkaratzas Jul 2, 2026
4190f03
frontend: Three.js classes ported to TypeScript (Phase 9)
vagkaratzas Jul 3, 2026
a9eb160
frontend: undo/redo scene commands (Phase 10)
vagkaratzas Jul 3, 2026
a582bd1
frontend: layout/topology actions + Phase 11 re-scope (Phase 11 partial)
vagkaratzas Jul 3, 2026
e5fee86
frontend: Three.js render loop + main entry (Phase 12 partial)
vagkaratzas Jul 3, 2026
de76bba
serena switched to python + ts
vagkaratzas Jul 3, 2026
b164d49
frontend: network build action feeding LoadNetworkCommand (Phase 12 p…
vagkaratzas Jul 3, 2026
69aca45
frontend: node action — hover, selection, repaint (Phase 12 partial)
vagkaratzas Jul 3, 2026
e2ad38f
remove ci tests from this branch
vagkaratzas Jul 3, 2026
f3259c6
fix frontend lint
vagkaratzas Jul 3, 2026
ec9f18e
frontend: edge action — inter/intra render machinery + setters (Phase…
vagkaratzas Jul 3, 2026
439c36f
frontend: layer action — spread, hover, selection, visibility (Phase …
vagkaratzas Jul 3, 2026
a1ae9b5
frontend: themes action listening to theme:changed (Phase 12 partial)
vagkaratzas Jul 3, 2026
78f1200
frontend: labels action rendering in the animate loop (Phase 12 partial)
vagkaratzas Jul 3, 2026
8b3a7c8
frontend: canvas mouse/keyboard scene controls (Phase 12 partial)
vagkaratzas Jul 3, 2026
85a2728
frontend: right-click node menu + path-selection commands (Phase 12 p…
vagkaratzas Jul 3, 2026
aeef6e7
frontend: layer DragControls port; delete v2 drag_controls.js + matri…
vagkaratzas Jul 3, 2026
c3cd94e
chore: delete fully-ported v2 JS (event_listeners, on_page_load, 4 ob…
vagkaratzas Jul 3, 2026
5759e3d
frontend: session import build (v2 importNetwork); delete network.js
vagkaratzas Jul 3, 2026
3f2c552
frontend: predefined layouts — parallel, zigZag, starLike, cube (Phas…
vagkaratzas Jul 3, 2026
2ac0072
frontend: session export action (v2 convertSessionToJSON)
vagkaratzas Jul 3, 2026
998572f
frontend: Bootstrap 5 navbar + tab panes in index.html (Phase 13)
vagkaratzas Jul 3, 2026
540efdd
frontend: Home panel port (views/home.R) + panel overlay CSS
vagkaratzas Jul 3, 2026
97270cb
frontend: File panel port (views/file.R) — upload/session/example
vagkaratzas Jul 3, 2026
55cf514
frontend: Layer Selection & Layouts panel port (views/layouts.R)
vagkaratzas Jul 3, 2026
da2fa10
frontend: Scene Actions panel port (views/scene.R)
vagkaratzas Jul 3, 2026
f61e088
frontend: Layer Actions panel port (views/layer.R)
vagkaratzas Jul 3, 2026
07252f7
frontend: Node Actions panel port (views/node.R)
vagkaratzas Jul 3, 2026
8854b2a
frontend: Edge Actions panel port (views/edge.R + edges.R toggles)
vagkaratzas Jul 3, 2026
13e0e80
frontend: FPS panel port (views/fps.R)
vagkaratzas Jul 3, 2026
f3891e7
frontend: View Data panel port (views/data.R + render.R tables)
vagkaratzas Jul 3, 2026
64c24fc
docs: mark View Data panel + edges.R done in PLAN/MIGRATION
vagkaratzas Jul 3, 2026
6390053
frontend: Help panel port (views/help.R → src/ui/help.ts)
vagkaratzas Jul 3, 2026
cfb0dc2
frontend: footer port (views/footer.R → index.html static footer)
vagkaratzas Jul 3, 2026
c7a64be
frontend: Undo/Redo navbar buttons wired to CommandHistory
vagkaratzas Jul 3, 2026
0d4427c
style: prettier pass on ui panels
vagkaratzas Jul 3, 2026
8abfa13
frontend: retire Shiny JS bridge (rshiny_handlers/update, www/js/config)
vagkaratzas Jul 3, 2026
f3016f2
cleanup: delete v2 UI shell (views/, ui.R, server.R, arena3dweb.css, …
vagkaratzas Jul 3, 2026
8caa07a
frontend: nav controls port (canvas_controls.js nav buttons + control…
vagkaratzas Jul 3, 2026
1374f30
feat: node/edge attribute-file uploads (POST /api/attributes)
vagkaratzas Jul 3, 2026
85a94b6
cleanup: delete dead R/Shiny startup files (global.R, Rprofile.site, …
vagkaratzas Jul 3, 2026
c122629
cleanup: relocate backend test fixtures, delete www/
vagkaratzas Jul 3, 2026
515a0b3
docs: rewrite CLAUDE.md for the FastAPI + Vite/TS/Three.js stack
vagkaratzas Jul 3, 2026
dbd2ffa
docs: rewrite README for the FastAPI + Vite/TS/Three.js stack
vagkaratzas Jul 3, 2026
2ce05f7
docs: fix production image run port (8080:8080)
vagkaratzas Jul 3, 2026
2203ab1
test: Playwright E2E network flow + fix tsc stray-emit
vagkaratzas Jul 3, 2026
3df6a72
checking stale item of plan
vagkaratzas Jul 3, 2026
51d2d12
init prompt
vagkaratzas Jul 3, 2026
6d50047
remove prompt file
vagkaratzas Jul 4, 2026
99c7c48
removed plan files
vagkaratzas Jul 4, 2026
87b20b1
feat(three): cap device pixel ratio and prefer high-performance GPU
vagkaratzas Jul 4, 2026
fa0ad9a
feat(three): drive render loop with pure rAF + timestamp FPS cap
vagkaratzas Jul 4, 2026
cb32750
feat(three): dispose GPU resources of discarded redo snapshots
vagkaratzas Jul 4, 2026
9454682
feat(three): smooth eased wheel zoom with reduced-motion fallback
vagkaratzas Jul 4, 2026
b979c5a
feat(three): smoother pan/orbit/lasso with finer drag threshold
vagkaratzas Jul 4, 2026
94c57cd
fix(three): stop leaking lasso geometry/material on every drag move
vagkaratzas Jul 4, 2026
cba2903
perf(three): coalesce hover raycasts to one per rendered frame
vagkaratzas Jul 4, 2026
e0ed74f
fix(three): non-recursive raycasts in hover and double-click picking
vagkaratzas Jul 4, 2026
9bd9f47
feat(three): optional subtle bloom via EffectComposer
vagkaratzas Jul 4, 2026
ace137a
feat(ui): cohesive dark chrome for canvas overlays, footer and loader
vagkaratzas Jul 4, 2026
fa74b08
docs: add REPORT_THREEJS.md summarizing the Three.js/UI refinement pass
vagkaratzas Jul 4, 2026
897ea6b
feat: default render loop to 60 FPS
vagkaratzas Jul 4, 2026
a6aa70c
fix(three): layer drag failing when the ray hit a plane child first
vagkaratzas Jul 4, 2026
6b1c017
fix(three): keep inter-layer edges live during drags
vagkaratzas Jul 4, 2026
78d8b32
fix(three): reposition DOM labels when the scene transform changes
vagkaratzas Jul 4, 2026
aa5f0c0
fix(three): select the hovered plane directly on layer-drag start
vagkaratzas Jul 4, 2026
b661d64
fix(three): redraw inter-layer edges on scene pan/orbit/zoom
vagkaratzas Jul 4, 2026
c144fc8
Merge pull request #20 from Pavlopoulos-Lab/three-js-lifting
vagkaratzas Jul 4, 2026
52bc63b
init prompt
vagkaratzas Jul 4, 2026
e694282
remove prompt file
vagkaratzas Jul 4, 2026
fe4578f
feat(ui): unified dark instrument design foundation
vagkaratzas Jul 4, 2026
4226195
feat(ui): open action panels as a side drawer, not full-scene overlay
vagkaratzas Jul 4, 2026
d5e342d
feat(ui): make panel content fit the drawer width
vagkaratzas Jul 4, 2026
18a3e81
feat(ui): redesign Home panel with hero, action cards, quiet citations
vagkaratzas Jul 4, 2026
6088be8
feat(ui): theme the Help panel tab bar and content for dark mode
vagkaratzas Jul 4, 2026
6dea96c
feat(ui): polish scene overlays and add a centered empty state
vagkaratzas Jul 4, 2026
19f0f69
feat(ui): responsive nav and drawer clearance
vagkaratzas Jul 4, 2026
8559a7e
docs: add REPORT_TASTE.md summarizing the UI/UX redesign
vagkaratzas Jul 4, 2026
e893d59
feat(ui): redesign nav help as a shortcut cheat-sheet with kbd keys
vagkaratzas Jul 4, 2026
9c64a5c
feat(ui): polish canvas controls table with hover states and themed s…
vagkaratzas Jul 4, 2026
f9b1224
fix(ui): stop nav-control button clipping and dead info scrollbar
vagkaratzas Jul 4, 2026
73355e2
feat(ui): real stop/play and up/down icons on nav toggle buttons
vagkaratzas Jul 4, 2026
93b3e68
feat(ui): add collapse handle for side-opening action panels
vagkaratzas Jul 4, 2026
ce5f11d
feat(network): seed node scatter so loads are reproducible
vagkaratzas Jul 4, 2026
8bf5e31
feat(ui): collapse the File drawer after a successful load
vagkaratzas Jul 4, 2026
19789a8
feat(ui): port v2 theme bar (Light/Dark/Gray) with e2e test
vagkaratzas Jul 4, 2026
652d808
fix(ui): keep theme floor color on layer hover-exit
vagkaratzas Jul 4, 2026
e37cda4
report removed
vagkaratzas Jul 4, 2026
94e13cd
Merge pull request #21 from Pavlopoulos-Lab/taste-skill-ui-ux-update
vagkaratzas Jul 4, 2026
5f3a04a
docs: add code review report of potential bugs
vagkaratzas Jul 4, 2026
b601df3
docs: add fix plan for code review findings
vagkaratzas Jul 4, 2026
ab1e522
fix(session): wire external session handoff via ?session= token
vagkaratzas Jul 4, 2026
7b6b85f
fix(session): validate referential integrity on import
vagkaratzas Jul 4, 2026
8168bf6
fix(edge): toggle channel visibility by tag, not positional index
vagkaratzas Jul 4, 2026
72ae9e8
fix(session): surface channel-removal warning to the client
vagkaratzas Jul 4, 2026
e37ee34
fix(session): reject duplicate layer names on import
vagkaratzas Jul 4, 2026
4ef021f
fix(session): resolve edge endpoints from node list, not id slicing
vagkaratzas Jul 4, 2026
bb313a6
fix(clustering): repel super-nodes radially even at x == 0
vagkaratzas Jul 4, 2026
4d226a0
fix(external): tolerate concurrent sweep/resolve race in _sweep
vagkaratzas Jul 4, 2026
ce3b7ca
fix(topology): score single-edge layers instead of skipping them
vagkaratzas Jul 4, 2026
fa74014
fix(edge): copy colors into importedColors instead of aliasing
vagkaratzas Jul 4, 2026
f24e6c8
fix(canvas): track lasso membership in a set, not opacity sentinel
vagkaratzas Jul 4, 2026
7b664df
fix(events): don't hijack Ctrl+Z/Y while typing in inputs
vagkaratzas Jul 4, 2026
6db6cbb
fix(canvas): ignore z/x/c axis keys when Ctrl/Meta is held
vagkaratzas Jul 4, 2026
08e2c08
fix(themes): back theme state with the store, drop duplicate
vagkaratzas Jul 4, 2026
59adea9
fix(edge): fall back to default color for unknown channel
vagkaratzas Jul 4, 2026
0c2bd27
fix(external): read ARENA_PUBLIC_URL per request
vagkaratzas Jul 4, 2026
78bc6b4
fix(ui): make dropdown options readable (dark bg, light text)
vagkaratzas Jul 4, 2026
b6c1c8a
removing md reporting files
vagkaratzas Jul 4, 2026
eb7b090
linting / formatting
vagkaratzas Jul 4, 2026
5c29ec7
Merge pull request #22 from Pavlopoulos-Lab/v3-fable-auto
vagkaratzas Jul 4, 2026
a44f203
chore(deps): bump numpy 2.5.1, uvicorn 0.50.0
vagkaratzas Jul 4, 2026
d781f29
chore(deps): update frontend deps to latest
vagkaratzas Jul 4, 2026
d41f4fd
Command design pattern to add more undo/redo events
vagkaratzas Jul 5, 2026
0109317
fix Z key + node drag, labels following
vagkaratzas Jul 5, 2026
6a08c52
satellite view
vagkaratzas Jul 5, 2026
6dd6a90
hide hidden layers from satellite
vagkaratzas Jul 5, 2026
426e924
Merge pull request #23 from Pavlopoulos-Lab/feat-satellite-view
vagkaratzas Jul 5, 2026
062d269
anchor zoom to mouse instead of scene middle
vagkaratzas Jul 5, 2026
37b9cef
raycasting undraggable layer bug finally fixed!
vagkaratzas Jul 5, 2026
5f3b224
Merge pull request #24 from Pavlopoulos-Lab/fix-layer-drag-always
vagkaratzas Jul 5, 2026
e595740
CHANGELOG.md init
vagkaratzas Jul 5, 2026
c434da0
testing e2e failing test on github
vagkaratzas Jul 5, 2026
f97d692
retry playwright test pass on github ci
vagkaratzas Jul 5, 2026
c512542
another attempt with dispatchEvent
vagkaratzas Jul 5, 2026
c3abd05
logos updated
vagkaratzas Jul 5, 2026
d03ff0e
rename back to Arena3D
vagkaratzas Jul 5, 2026
a581ca4
fix httpx backend test warning by updating to httpx2
vagkaratzas Jul 5, 2026
4df7978
README.ms updated
vagkaratzas Jul 5, 2026
a583add
release date added to CHANGELOG.md
vagkaratzas Jul 5, 2026
3bac743
security fixes and optimization
fbaltoumas Jul 6, 2026
32b4f23
deployment-based fixes
fbaltoumas Jul 6, 2026
03462e8
npx prettier fix
fbaltoumas Jul 8, 2026
b50d6a9
Merge pull request #26 from Pavlopoulos-Lab/v3_fixes
vagkaratzas Jul 8, 2026
37eeb91
github link update to new repo
vagkaratzas Jul 8, 2026
d9359fc
keeping right-click node menu visible
vagkaratzas Jul 8, 2026
ac9076b
external api help page updated
vagkaratzas Jul 8, 2026
4423803
swapped to old Load Example network of 4 layers
vagkaratzas Jul 8, 2026
502f9ad
refresh labels on window resize
vagkaratzas Jul 8, 2026
4f58c95
export scene as png button
vagkaratzas Jul 8, 2026
c74883f
add visible labels to the exported PNG
vagkaratzas Jul 8, 2026
f128632
Capturing labels in the frame
vagkaratzas Jul 8, 2026
2bea859
pointer-events none above label names, to properly use lasso and laye…
vagkaratzas Jul 8, 2026
2a4ace2
fix: add style-src to CSP so inline styles in Help/Data panels render
vagkaratzas Jul 8, 2026
3ef4561
fix: reject oversized request bodies via Content-Length before parsing
vagkaratzas Jul 8, 2026
a14abef
CHANGELOG update
vagkaratzas Jul 8, 2026
73c21c9
audit report files
vagkaratzas Jul 8, 2026
2d9d3b7
Quadratic blow-up in clustered layout DoS attack fixed, added MAX_ALL…
vagkaratzas Jul 8, 2026
c4d1711
fix: bound token-session storage to stop disk-fill DoS (H2)
vagkaratzas Jul 8, 2026
15ac22b
fix: reject malformed TSV with 400 instead of crashing 500 (#1)
vagkaratzas Jul 8, 2026
d0d5620
fix: reject non-object session list members with 400 (#2)
vagkaratzas Jul 8, 2026
4068d63
fix: sanitize edge weights to stop 500s and invalid-JSON output (#3, #4)
vagkaratzas Jul 8, 2026
675d2bb
fix: escapeHtml also escapes the single quote (#5)
vagkaratzas Jul 8, 2026
29a6092
fix: escape channel color before interpolating into attribute value (#6)
vagkaratzas Jul 8, 2026
33793e5
fix: URL-encode external session token in request path (#7)
vagkaratzas Jul 8, 2026
04c5172
fix: rate-limit /api/ to blunt unauthenticated CPU-saturation (#8)
vagkaratzas Jul 8, 2026
ec1f1fb
lint / format backend
vagkaratzas Jul 8, 2026
27887da
Merge pull request #27 from Pavlopoulos-Lab/pre-release-security-audi…
vagkaratzas Jul 8, 2026
cdd0440
delete security audit reports
vagkaratzas Jul 8, 2026
04a5af6
fix: refresh node labels on predefined layout change
vagkaratzas Jul 8, 2026
3b3fc12
style: restyle File panel action buttons with hierarchy and icons
vagkaratzas Jul 8, 2026
b7542a2
AGENTS.md with extra ruleset/guiderails
vagkaratzas Jul 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches: [main, v3]
pull_request:

jobs:
backend:
runs-on: ubuntu-latest
defaults:
run: { working-directory: backend }
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- run: uv sync
- run: uv run ruff check .
- run: uv run ruff format --check .
- run: uv run mypy app
- run: uv run pytest

frontend:
runs-on: ubuntu-latest
defaults:
run: { working-directory: frontend }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22, cache: npm, cache-dependency-path: frontend/package-lock.json }
- run: npm ci
- run: npm run lint
- run: npx prettier --check src
- run: npx tsc -b --noEmit || npx tsc --noEmit
- run: npm test -- --run

e2e:
runs-on: ubuntu-latest
needs: [backend, frontend]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- uses: actions/setup-node@v4
with: { node-version: 22, cache: npm, cache-dependency-path: frontend/package-lock.json }
- run: cd backend && uv sync && (uv run uvicorn app.main:app --port 8000 &)
- run: cd frontend && npm ci && npx playwright install --with-deps chromium
- run: cd frontend && npm run test:e2e
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,18 @@ vignettes/*.pdf
# R Environment Variables
.Renviron
Arena3Dweb.Rproj

# Python
backend/.venv/
__pycache__/
*.pyc
.mypy_cache/
.ruff_cache/

# Node
frontend/node_modules/
frontend/dist/

# Editors
.DS_Store
.playwright-cli/
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
hooks:
- id: ruff-check
args: [--fix]
files: ^backend/
- id: ruff-format
files: ^backend/

- repo: local
hooks:
- id: eslint
name: eslint
language: system
entry: bash -c 'cd frontend && npx eslint src'
files: ^frontend/src/.*\.ts$
pass_filenames: false
- id: prettier
name: prettier
language: system
entry: bash -c 'cd frontend && npx prettier --check src'
files: ^frontend/src/
pass_filenames: false
2 changes: 2 additions & 0 deletions .serena/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/cache
/project.local.yml
137 changes: 137 additions & 0 deletions .serena/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# the name by which the project can be referenced within Serena
project_name: "Arena3Dweb"


# list of languages for which language servers are started; choose from:
# al angular ansible bash clojure
# cpp cpp_ccls crystal csharp csharp_omnisharp
# dart elixir elm erlang fortran
# fsharp go groovy haskell haxe
# hlsl html java json julia
# kotlin lean4 lua luau markdown
# matlab msl nix ocaml pascal
# perl php php_phpactor powershell python
# python_jedi python_ty r rego ruby
# ruby_solargraph rust scala scss solidity
# svelte swift systemverilog terraform toml
# typescript typescript_vts vue yaml zig
# (This list may be outdated. For the current list, see values of Language enum here:
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
# Note:
# - For C, use cpp
# - For JavaScript, use typescript
# - For Angular projects, use angular (subsumes typescript+html; requires `npm install` in the project root)
# - For Svelte projects, use svelte (subsumes typescript/javascript for .svelte projects; requires npm)
# - For SCSS / Sass / plain CSS, use scss (some-sass-language-server handles all three)
# - For Free Pascal/Lazarus, use pascal
# Special requirements:
# Some languages require additional setup/installations.
# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers
# When using multiple languages, the first language server that supports a given file will be used for that file.
# The first language is the default language and the respective language server will be used as a fallback.
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
# R dropped: legacy code being deleted through the v3 migration, and its LSP
# (R `languageserver` package) isn't installed — its failure aborted the whole
# language-server manager. Active dev is TS (frontend) + Python (backend).
languages:
- typescript
- python

# the encoding used by text files in the project
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
encoding: "utf-8"

# line ending convention to use when writing source files.
# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default)
# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings.
line_ending:

# The language backend to use for this project.
# If not set, the global setting from serena_config.yml is used.
# Valid values: LSP, JetBrains
# Note: the backend is fixed at startup. If a project with a different backend
# is activated post-init, an error will be returned.
language_backend:

# whether to use project's .gitignore files to ignore files
ignore_all_files_in_gitignore: true

# advanced configuration option allowing to configure language server-specific options.
# Maps the language key to the options.
# Have a look at the docstring of the constructors of the LS implementations within solidlsp (e.g., for C# or PHP) to see which options are available.
# No documentation on options means no options are available.
ls_specific_settings: {}

# list of additional workspace folder paths for cross-package reference support (e.g. in monorepos).
# Paths can be absolute or relative to the project root.
# Each folder is registered as an LSP workspace folder, enabling language servers to discover
# symbols and references across package boundaries.
# Currently supported for: TypeScript.
# Example:
# additional_workspace_folders:
# - ../sibling-package
# - ../shared-lib
additional_workspace_folders: []

# list of additional paths to ignore in this project.
# Same syntax as gitignore, so you can use * and **.
# Note: global ignored_paths from serena_config.yml are also applied additively.
ignored_paths: []

# whether the project is in read-only mode
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
# Added on 2025-04-18
read_only: false

# list of tool names to exclude.
# This extends the existing exclusions (e.g. from the global configuration)
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
excluded_tools: []

# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default).
# This extends the existing inclusions (e.g. from the global configuration).
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
included_optional_tools: []

# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
fixed_tools: []

# list of mode names that are to be activated by default, overriding the setting in the global configuration.
# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes.
# If the setting is undefined/empty, the default_modes from the global configuration (serena_config.yml) apply.
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
# Therefore, you can set this to [] if you do not want the default modes defined in the global config to apply
# for this project.
# This setting can, in turn, be overridden by CLI parameters (--mode).
# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes
default_modes:

# list of mode names to be activated additionally for this project, e.g. ["query-projects"]
# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes.
# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes
added_modes:

# initial prompt for the project. It will always be given to the LLM upon activating the project
# (contrary to the memories, which are loaded on demand).
initial_prompt: ""

# time budget (seconds) per tool call for the retrieval of additional symbol information
# such as docstrings or parameter information.
# This overrides the corresponding setting in the global configuration; see the documentation there.
# If null or missing, use the setting from the global configuration.
symbol_info_budget:

# list of regex patterns which, when matched, mark a memory entry as read‑only.
# Extends the list from the global configuration, merging the two lists.
read_only_memory_patterns: []

# list of regex patterns for memories to completely ignore.
# Matching memories will not appear in list_memories or activate_project output
# and cannot be accessed via read_memory or write_memory.
# To access ignored memory files, use the read_file tool on the raw file path.
# Extends the list from the global configuration, merging the two lists.
# Example: ["_archive/.*", "_episodes/.*"]
ignored_memory_patterns: []
85 changes: 85 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Arena3D is a web application for interactive 3D visualization of multilayered networks: **FastAPI backend** (Python, `uv`) + **Vite / TypeScript / Three.js frontend** (npm).

The app was migrated from R/Shiny to this stack. All R/Shiny source is gone; the migration history lives in:
- **`SPEC.md`** — architecture decisions, chosen stack, design patterns, API contract, and rationale.
- **`PLAN.md`** — phased implementation checklist (essentially complete).
- **`MIGRATION.md`** — old R/Shiny file → new equivalent map (all rows done).

## Rules for Agents

- **Never push to remote.** Commit only when explicitly asked, one commit per feature.
- **Always use the `token-saviour` skill** — and the tools/skills it routes to across its layers — wherever it makes sense.
- **When a plan is active** (e.g. a `PLAN*.md` file): one feature per commit, tick the checkboxes as you go, and verify each feature at runtime before moving to the next.
- **Before every commit**: run the build, lint, typecheck, and the relevant test suite (see commands below). Verify UI/UX changes at runtime with Playwright.
- **Keep responses concise** — summarize rather than dumping full files, to stay within output token limits.

## Running the App

**Backend** (package management via `uv` — no manual venv/pip):
```bash
cd backend
uv sync # installs deps + dev group into .venv
uv run uvicorn app.main:app --reload # http://localhost:8000
```

**Frontend:**
```bash
cd frontend
npm install
npm run dev # http://localhost:5173 — /api proxied to localhost:8000
```

**Both together (Docker):**
```bash
docker-compose up
```

**Backend tests:**
```bash
cd backend && uv run pytest
```

**Frontend tests:**
```bash
cd frontend && npm test # Vitest unit tests
cd frontend && npm run test:e2e # Playwright E2E
```

**Lint / format / typecheck:**
```bash
cd backend && uv run ruff check . && uv run ruff format . && uv run mypy app
cd frontend && npm run lint && npm run format && npx tsc --noEmit
```

## Architecture Overview

### Backend (`backend/app/`)
Stateless FastAPI — the frontend holds all scene state; the server validates input and runs the graph algorithms.

- `main.py` — app + router registration; `config.py` — constants (limits, palettes, scale targets) served at `GET /api/config`.
- `models/` — Pydantic request/response models (`network`, `layout`, `topology`, `session`, `attributes`).
- `routers/` — one per endpoint: `config`, `network` (TSV upload), `layout`, `topology`, `session` (import/export), `external` (token-shared sessions), `attributes` (node/edge attribute files).
- `services/` — logic: `parser` (TSV parse/validate), `graph` (igraph construction + scopes), `layouts` (11 layout algos), `clustering` (4 community algos, optional layout step), `topology` (Degree / Clustering Coefficient / Betweenness), `session`, `attributes`.
- Algorithms use **python-igraph** — same C core as R's igraph, so layouts/clustering/topology port 1:1.

### Frontend (`frontend/src/`)
- `main.ts` — entry point: fetch config → set up Three.js → mount canvas → wire panels + listeners → `animate()`. Exposes `window.__arena = { ctx, history }` as a Playwright test hook (the WebGL canvas is opaque to the a11y tree).
- `three/` — `Scene`, `Layer`, `Node`, `Edge` classes on npm `three` r170; `runtime.ts` holds the shared mutable `ctx` (replaces v2 ambient globals); `constants.ts` static geometry/palette constants.
- `actions/` — one module per domain (`network`, `layout`, `layer`, `node`, `edge`, `labels`, `themes`, `screen`, `canvas_controls`, `nav_controls`, `drag_controls`, `right_click_menu`, `session`). These mutate the object model + `ctx`.
- `commands/` — `Command` interface + `CommandHistory` (undo/redo); `scene.ts` holds the concrete commands. Every scene mutation that should be undoable routes through a command.
- `ui/` — one module per navbar panel (`home`, `file`, `layouts`, `scene`, `layer`, `node`, `edge`, `data`, `fps`, `help`), each filling its `#panel-*` pane with Bootstrap DOM and wiring controls to `actions`/`commands`.
- `bus/` — typed `EventBus` singleton (returns unsubscribe fns); `store/` — typed `AppState` store. Together they replace the old Shiny input/output sync.
- `api/client.ts` — hand-written typed client mirroring the Pydantic models.

### Communication
- **Frontend → backend**: `api.*` calls to `/api/*` (network parse, layout, topology, session, attributes).
- **Within frontend**: components emit/subscribe on the `EventBus` and read/write the `store`; the render loop reacts to `ctx` flags (`renderInterLayerEdgesFlag`, label flags, etc.).

### Network Data Model
- Networks upload as TSV with mandatory columns `SourceNode`, `SourceLayer`, `TargetNode`, `TargetLayer` (optional: `Weight`, `Channel`, edge color columns).
- Node/edge attribute files add per-node color/size/url/description and per-edge (optionally per-channel) color.
- Sessions export/import as JSON with full node/edge/layer/scene state. `POST /api/external` returns a token URL so another app can hand off a session.
13 changes: 0 additions & 13 deletions Arena3Dweb.Rproj

This file was deleted.

34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Changelog

## [3.0.0] - 2026-07-08

Full rewrite: migrated from R/Shiny to a **FastAPI (Python) backend + Vite / TypeScript / Three.js frontend**. Algorithms (layouts, clustering, topology) ported 1:1 via python-igraph.

### Added

- **Satellite view** — minimap overview of the scene (hidden layers excluded).
- **Command-pattern undo/redo** — granular history for scene mutations.
- **Token-shared sessions** — hand off a session to another app via `?session=` URL (`POST /api/external`).
- **Export Image** — button to export the scene as PNG.
- Reproducible node scatter (seeded), 60 FPS render loop as default, redesigned UI (side-drawer panels).

### Changed

- **Zoom to cursor** — mouse-wheel zoom anchors at the pointer instead of the scene center.

### Fixed

- **Undraggable layers when zoomed in** — orthographic drag ray rejected planes sitting behind its origin; layers froze at high zoom despite hover working.

## [2.0.0] - 2023-04-13

Initial public release — Arena3D, an **R/Shiny + Three.js** web app for interactive 3D visualization of multilayered networks.

- Interactive 3D rendering of multilayer networks (Three.js via R/Shiny).
- TSV network upload; layer / node / edge styling.
- Layout algorithms, community clustering, and topology metrics on the graph.
- Session import / export.

## [1.0.0] - 2008-11-28

The now retired legacy Arena3D standalone desktop application written in Java.
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CLAUDE.md

See **[AGENTS.md](AGENTS.md)**.

Guidance for coding agents working in this repository lives there, so that every agent — Claude Code,
Codex, and others — reads the same file.
Loading
Loading