Skip to content
Merged

React #468

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
295 commits
Select commit Hold shift + click to select a range
845740e
Freetext copy
FloSch62 Dec 11, 2025
1afaa7a
better vite
FloSch62 Dec 11, 2025
6103e33
refactor
FloSch62 Dec 12, 2025
57f8959
freeshapes
FloSch62 Dec 12, 2025
9ea116a
Bulk link
FloSch62 Dec 12, 2025
a5a1cee
resizeable panels
FloSch62 Dec 12, 2025
5a31f7a
better mock
FloSch62 Dec 12, 2025
524c55e
Enhance rotation handle accessibility with wider hit area and improve…
FloSch62 Dec 12, 2025
00fec0b
groups
FloSch62 Dec 12, 2025
22801ed
ungroup
FloSch62 Dec 12, 2025
f5fca8c
dont use cyto way for groups, use html
FloSch62 Dec 12, 2025
e955250
cleaned up cyto leftovers
FloSch62 Dec 12, 2025
cb69b8b
Enhance annotation handling by adding group and node support, update …
FloSch62 Dec 12, 2025
58e91b8
better group interaction
FloSch62 Dec 12, 2025
e9f8183
groups as they should be
FloSch62 Dec 12, 2025
82c4756
Add info panel visibility logic and enhance event handler setup for e…
FloSch62 Dec 12, 2025
5ef568f
better dev
FloSch62 Dec 14, 2025
9c029df
fix ts errors
FloSch62 Dec 14, 2025
b2ec910
added typecheck
FloSch62 Dec 14, 2025
92a7a58
annotated lab
FloSch62 Dec 14, 2025
6f5d874
group undo/redo
FloSch62 Dec 14, 2025
e4e3912
implement membership change tracking for undo/redo functionality
FloSch62 Dec 14, 2025
d8f5d55
remove cy ctx menu
FloSch62 Dec 14, 2025
6875786
Migrated Navbar Features
FloSch62 Dec 14, 2025
26225a9
reduce complexity
FloSch62 Dec 14, 2025
8eafe0f
move hooks to hooks
FloSch62 Dec 14, 2025
3c45622
Refactor annotation wrapper styles for improved scaling and rotation …
FloSch62 Dec 14, 2025
1ba1bf8
make label options work
FloSch62 Dec 14, 2025
ccfba2c
geomap
FloSch62 Dec 14, 2025
a7fa22c
fast geomap
FloSch62 Dec 14, 2025
4341983
Enhance geo map zoom handling with intermediate updates and improved …
FloSch62 Dec 14, 2025
3dd1b19
finally the speed of the geomap that reminds on google maps
FloSch62 Dec 14, 2025
8ce3141
a better geomap?
FloSch62 Dec 14, 2025
c9bfa93
satisfy lint
FloSch62 Dec 14, 2025
7f3049d
improve dev
FloSch62 Dec 15, 2025
5e21b29
annotations working on geomap
FloSch62 Dec 15, 2025
2a97435
fixed switchting between geo and preset
FloSch62 Dec 15, 2025
00fd9ef
support legacy annotations
FloSch62 Dec 15, 2025
befe6a1
deploy/destroy lab
FloSch62 Dec 15, 2025
dfc39d7
make ssh work
FloSch62 Dec 15, 2025
feba45e
shapes behind nodes
FloSch62 Dec 15, 2025
5788718
network nodes
FloSch62 Dec 15, 2025
1730559
undo/redo tests and shape undo/redo improvement
FloSch62 Dec 15, 2025
d84533c
better dev for networks
FloSch62 Dec 15, 2025
2c12f99
better init
FloSch62 Dec 15, 2025
8721095
better mock
FloSch62 Dec 15, 2025
3b829a9
Network Editor
FloSch62 Dec 15, 2025
22b067f
remove bs
FloSch62 Dec 15, 2025
2d26cf5
Interface stats
FloSch62 Dec 15, 2025
5caed6c
not an easteregg
FloSch62 Dec 15, 2025
26943ce
refactor
FloSch62 Dec 15, 2025
23bd906
easter eggs
FloSch62 Dec 16, 2025
8d520ae
better easter eggs
FloSch62 Dec 16, 2025
031a8c2
improvements
FloSch62 Dec 16, 2025
edb75f2
refactor
FloSch62 Dec 16, 2025
da0feca
refactor
FloSch62 Dec 16, 2025
6f74d66
groups in groups
FloSch62 Dec 17, 2025
e14867a
fix undo/redo
FloSch62 Dec 17, 2025
3cf381c
copy pasteable groups
FloSch62 Dec 17, 2025
bae1a2a
fix complexity
FloSch62 Dec 17, 2025
a6af6cb
playwright
FloSch62 Dec 17, 2025
cb2b822
fix: improve readability by adding braces in collectNodeIdsToInclude …
FloSch62 Dec 17, 2025
6e080b1
more playwright tests
FloSch62 Dec 17, 2025
110bdd2
fixing bugs
FloSch62 Dec 17, 2025
330bde4
make playwright tests better
FloSch62 Dec 17, 2025
370e572
install dev pkgs
FloSch62 Dec 17, 2025
14a3bc7
improve tests finding bugs
FloSch62 Dec 17, 2025
b0f7d1b
run paralell
FloSch62 Dec 17, 2025
808ef58
Fix Bugs
FloSch62 Dec 17, 2025
3a18237
fix bugs
FloSch62 Dec 17, 2025
7249494
fix
FloSch62 Dec 17, 2025
bbdc079
use real io files
FloSch62 Dec 18, 2025
2da8c38
Refactor file savings
FloSch62 Dec 18, 2025
7c61e6d
Enhance test isolation and improve file I/O handling
FloSch62 Dec 18, 2025
ee76efb
fix node renaming
FloSch62 Dec 18, 2025
aaf5d86
fix Graph node ID not updated after rename
FloSch62 Dec 18, 2025
1fe340c
fix Undo link creation does not remove the link from graph
FloSch62 Dec 18, 2025
645e4b9
fix undo/redo group creation
FloSch62 Dec 18, 2025
7f77688
fix copy paste
FloSch62 Dec 18, 2025
92ddcd8
fix undo
FloSch62 Dec 18, 2025
38de30f
full workflow, need fixes
FloSch62 Dec 18, 2025
06baff8
fix group copy paste bug
FloSch62 Dec 18, 2025
440dfd1
allow to be complext
FloSch62 Dec 18, 2025
f281e65
fixes, fixes and fixes
FloSch62 Dec 18, 2025
fdf13ae
fixes, better testes
FloSch62 Dec 18, 2025
48432ed
enhance topology loading and node editor tests with retries and state…
FloSch62 Dec 19, 2025
0cd6382
fix linting
FloSch62 Dec 19, 2025
e161734
add lock state management and enhance lab settings persistence
FloSch62 Dec 19, 2025
6fc21c2
fix
FloSch62 Dec 19, 2025
07acddb
fix flackiness
FloSch62 Dec 19, 2025
13d558f
fix icon change and test
FloSch62 Dec 19, 2025
c16fcef
fix lint
FloSch62 Dec 19, 2025
9bbb606
fix bugs in mock
FloSch62 Dec 19, 2025
525dd63
refactor: enhance node editor opening logic with retry mechanism
FloSch62 Dec 19, 2025
f76af9a
fix node editor persitence
FloSch62 Dec 19, 2025
076f0dc
fix lint
FloSch62 Dec 19, 2025
ca33f2d
browser logs
FloSch62 Dec 19, 2025
586fdb0
unified message handling
FloSch62 Dec 19, 2025
bdb3d57
Refactor SplitViewPanel to fetch YAML and annotations from server
FloSch62 Dec 19, 2025
9109960
unify dev server with production services via adapter injection
FloSch62 Dec 19, 2025
9c637e1
remove SaveTopologyService and AnnotationsManager wrappers
FloSch62 Dec 19, 2025
0273b04
fix tests
FloSch62 Dec 20, 2025
22fa52b
remove cut
FloSch62 Dec 20, 2025
4156d69
huge refactor to lift the vscode depencies
FloSch62 Dec 20, 2025
eea1294
fixes
FloSch62 Dec 20, 2025
27cb2f4
cleaning
FloSch62 Dec 20, 2025
08b130a
mac os support
FloSch62 Dec 20, 2025
c2fc6fd
fix default node
FloSch62 Dec 20, 2025
6dda66a
fixed kind from schema
FloSch62 Dec 20, 2025
1fd43ec
sros components and inherit badges
FloSch62 Dec 20, 2025
4325817
fix inherited, logo, labs, fix reset
FloSch62 Dec 20, 2025
3bd1255
Goodbye legacy TopoViewer
FloSch62 Dec 20, 2025
c21ec93
remove dead code
FloSch62 Dec 20, 2025
12dc440
fix tests
FloSch62 Dec 20, 2025
ffbdb84
fix test
FloSch62 Dec 20, 2025
7741700
dedup
FloSch62 Dec 20, 2025
39998ac
remove dead code, unify dups
FloSch62 Dec 20, 2025
0ac7e8d
dedup: consolidate shared types and utilities
FloSch62 Dec 20, 2025
f61a8d2
remove duplication
FloSch62 Dec 20, 2025
0138d8f
proper layering
FloSch62 Dec 20, 2025
116a2ab
cycle deps
FloSch62 Dec 20, 2025
da28c8b
fix circular deps
FloSch62 Dec 20, 2025
ec5ad8b
stricter lint
FloSch62 Dec 20, 2025
f170965
make stricter lint happy
FloSch62 Dec 20, 2025
689e7c9
fix lint
FloSch62 Dec 20, 2025
3ce8787
start fix stricter lint
FloSch62 Dec 20, 2025
7afe835
barrel imports
FloSch62 Dec 20, 2025
e30d7b2
Refactor type exports and remove deprecated hooks
FloSch62 Dec 20, 2025
11df411
remove clones
FloSch62 Dec 21, 2025
ec971a3
splitting huge index files
FloSch62 Dec 21, 2025
b968f65
fix tests
FloSch62 Dec 21, 2025
9217868
stricter lint
FloSch62 Dec 21, 2025
d5bb4bc
resolve max-dependencies lint warnings via barrel restructuring
FloSch62 Dec 21, 2025
da910a4
Make app.tsx smaller
FloSch62 Dec 21, 2025
adc645d
remove any
FloSch62 Dec 21, 2025
9d1056f
stricter typing
FloSch62 Dec 21, 2025
c8a7889
no any
FloSch62 Dec 21, 2025
191636a
depcruise
FloSch62 Dec 21, 2025
a9f75d3
removed cloned code reported by cpd
FloSch62 Dec 21, 2025
6a87fef
refactor: reorganize imports and improve documentation across compone…
FloSch62 Dec 21, 2025
413f1da
refactor: remove unused service adapter files and inline simple adapt…
FloSch62 Dec 21, 2025
a9a9525
consolidate hooks
FloSch62 Dec 21, 2025
ca418ac
consolidate hooks
FloSch62 Dec 21, 2025
d8e2a2a
consolidate hooks
FloSch62 Dec 21, 2025
254bc3f
fix test
FloSch62 Dec 21, 2025
1c632ec
consolidate hooks
FloSch62 Dec 21, 2025
5e2110b
consolidate hooks
FloSch62 Dec 21, 2025
297d468
consolidate hooks
FloSch62 Dec 21, 2025
7628798
simplify app.tsx
FloSch62 Dec 21, 2025
f0f349e
reduce app.tsx
FloSch62 Dec 22, 2025
529626c
fix traffic stats
FloSch62 Dec 22, 2025
d6e68ba
App.tsx Complexity Reduction
FloSch62 Dec 22, 2025
5ad8f1d
webview owns persistenc
FloSch62 Dec 22, 2025
3ecb641
single source of truth
FloSch62 Dec 22, 2025
3dfc950
Refactor React TopoViewer services to be per-viewer, eliminate global…
FloSch62 Dec 22, 2025
b92808a
Split the “god” TopoViewerContext into useTopoViewerState + useTopoV…
FloSch62 Dec 22, 2025
a5e3d42
shrink hooks API and split annotation context
FloSch62 Dec 22, 2025
183ba50
fix pos issue
FloSch62 Dec 22, 2025
29c2f8e
fix lab settings
FloSch62 Dec 22, 2025
7da8c56
lock lab settings when lab is locked
FloSch62 Dec 22, 2025
25362e0
support default kinds
FloSch62 Dec 22, 2025
0675c5c
split view in dev
FloSch62 Dec 22, 2025
553da84
use layout if no pos available
FloSch62 Dec 22, 2025
23c80d4
more tests and fixes
FloSch62 Dec 23, 2025
298941c
remove some redundant tests and fixes
FloSch62 Dec 23, 2025
0431cd5
fix bugs and cleanup
FloSch62 Dec 23, 2025
4ad5902
fix lint and clones
FloSch62 Dec 23, 2025
07a683c
removed cyto grid guide, pos test, half working svg export with annot…
FloSch62 Dec 23, 2025
49a771f
Text is now not moving anymore when zooming
FloSch62 Dec 23, 2025
e1153d8
viewport including annotations
FloSch62 Dec 23, 2025
4ef2c6d
resolve macOS case-sensitivity conflict for FloatingPanel
FloSch62 Dec 23, 2025
5895563
working svg export
FloSch62 Dec 23, 2025
46bde13
Icon color and radius fix
FloSch62 Dec 29, 2025
da2d9da
live update in dev
FloSch62 Dec 29, 2025
2d634b7
clear undo/redo when clab.yml is modifies manual
FloSch62 Dec 29, 2025
e8e459d
fix lint
FloSch62 Dec 29, 2025
7dfacfd
custom node icon
FloSch62 Dec 29, 2025
417ffc4
fix lint
FloSch62 Dec 29, 2025
1bab84e
correct shortcuts
FloSch62 Dec 29, 2025
3048714
add panelRef to usePanelResize for accurate height measurement during…
FloSch62 Dec 29, 2025
26e1905
update TOPOLOGIES_DIR
asadarafat Dec 30, 2025
758c10a
feat(topoviewer): stabilize group ids and membership behavior (prom…
asadarafat Dec 30, 2025
2f7f174
chore(test): add remote Playwright UI script
asadarafat Dec 30, 2025
c2a8a35
Completing the network nodes with tests
FloSch62 Dec 30, 2025
0e4eb3b
fix(groups): use functional loadGroups updates and add e2e test for g…
asadarafat Dec 30, 2025
d0fb86d
chore: merger-branch
asadarafat Dec 30, 2025
b2f8085
fix(node-editor): ensure deleted fields are properly removed from YAM…
FloSch62 Dec 30, 2025
f68a4a2
remove bs
FloSch62 Dec 30, 2025
1473823
chore: update package.json to require Node.js 24.0.0 and update @type…
FloSch62 Dec 30, 2025
48519e5
Removed all 13 deprecated /* eslint-env mocha */ comments from test f…
FloSch62 Dec 30, 2025
68ff071
goodbye webpack, hello esbuild only
FloSch62 Dec 30, 2025
c4ff77f
fix flacky tests
FloSch62 Dec 30, 2025
477e517
feat(api): Expose a stable API surface for other extensions to access…
asadarafat Dec 30, 2025
d9a0248
fix: add delay in boxSelect to ensure Shift key state is registered
FloSch62 Dec 31, 2025
a579a43
Merge branch 'react' of https://github.com/flosch62/vscode-containerl…
FloSch62 Dec 31, 2025
1ee0204
fix flacky tests
FloSch62 Dec 31, 2025
34b0848
This commit is only for today :D
FloSch62 Dec 31, 2025
7b8f82f
fix: persist custom node icon styles and apply on creation
asadarafat Dec 31, 2025
a412f6f
fix: sync bulk link UI with graph state
asadarafat Dec 31, 2025
c5e5ac1
fix: remove nested scrolling in about panel
asadarafat Dec 31, 2025
d23bac6
test: add e2e coverage for bulk link UI updates
asadarafat Dec 31, 2025
839c124
test: add undo/redo coverage for bulk link UI updates
asadarafat Dec 31, 2025
92272f8
feat: keep paste selection additive (nodes only)
asadarafat Dec 31, 2025
3c6589f
test: cover additive paste selection with undo/redo
asadarafat Dec 31, 2025
e6da974
feat(topoviewer): add global endpoint label offset control
asadarafat Jan 1, 2026
bc0c416
feat(topoviewer): persist endpoint label offset viewer settings
asadarafat Jan 1, 2026
70cf35d
feat(topoviewer): add per-link endpoint label offset overrides
asadarafat Jan 1, 2026
9f69e42
feat(link-editor): switch per-link endpoint offset to slider
asadarafat Jan 1, 2026
5206722
feat(topoviewer): default endpoint label offset on and persist initia…
asadarafat Jan 2, 2026
55c9cd4
test: verify global endpoint label offset UI reflects persisted settings
asadarafat Jan 2, 2026
bbaaa6d
feat(topoviewer): sync per-link endpoint offsets with undo/redo
asadarafat Jan 2, 2026
ed322b8
test: cover per-link endpoint offset undo/redo
asadarafat Jan 2, 2026
ca33c9f
fix(topoviewer): key-match edge annotations and prune stale offsets
asadarafat Jan 2, 2026
88d4388
Revert "This commit is only for today :D"
FloSch62 Jan 4, 2026
804063a
fix custom node settigs, fix initial layout, fix filenames for new lab
FloSch62 Jan 4, 2026
65fa1b1
fix link state and fix missing uPlot Css
FloSch62 Jan 4, 2026
820fafb
fix fit to viewport
FloSch62 Jan 4, 2026
a8e7146
fix(text-resize): adjust minimum dimensions and incorporate Cytoscape…
FloSch62 Jan 4, 2026
1a7a88f
remove clones
FloSch62 Jan 4, 2026
179e7c2
allow hairpin
FloSch62 Jan 4, 2026
41207a7
bump packages
FloSch62 Jan 4, 2026
6ba0bbe
fix flacky tests
FloSch62 Jan 4, 2026
3ee5fb5
make nodes clickable when shape is above
FloSch62 Jan 4, 2026
2cb15cb
reduce minimum panel width to improve layout responsiveness
FloSch62 Jan 4, 2026
6616b7e
remove unused packages and fix lint
FloSch62 Jan 4, 2026
03a5077
refactor group resize to use dedicated undo handler
FloSch62 Jan 4, 2026
2fcbfba
add e2e tests job to PR workflow with Playwright integration
FloSch62 Jan 4, 2026
889f071
fix: ensure topologies directory exists before resetting disk files
FloSch62 Jan 4, 2026
28678d6
Callback to sync committed positions into React state
FloSch62 Jan 4, 2026
14dc13a
remove warnings
FloSch62 Jan 4, 2026
cdf254b
fix show dummy link
FloSch62 Jan 4, 2026
4d2aa08
fix geomap
FloSch62 Jan 5, 2026
7e56eb6
smoother zooming
FloSch62 Jan 5, 2026
9fbf7ce
fix: allow self-loop endpoint offsets and persist link editor endpoin…
asadarafat Jan 5, 2026
4b006db
fix: ensure distinct interface auto-assign for self-loop links
asadarafat Jan 5, 2026
cf13fd4
fix: always enable link endpoint offset on apply/ok
asadarafat Jan 5, 2026
8d0074e
fix: simplify link offset UI and auto-enable overrides
asadarafat Jan 5, 2026
852a80e
style: harmonize link editor headings and offset value display
asadarafat Jan 5, 2026
387f570
style: reorder offset controls and add reset spacer in link editor
asadarafat Jan 5, 2026
800d6da
test: update endpoint offset undo/redo expectations
asadarafat Jan 5, 2026
e367238
fix button to add default item in dropdown
FloSch62 Jan 6, 2026
5e50e5a
feat: add getMinimumBounds function for dynamic group resize calculat…
FloSch62 Jan 6, 2026
697d88d
feat: enhance context menu with danger styling for delete actions
FloSch62 Jan 6, 2026
d85bf62
fix exported svg pos
FloSch62 Jan 6, 2026
de8829e
Align Style for panels
FloSch62 Jan 6, 2026
8dce73e
style: increase BasePanel content padding to p-4; align with panel-he…
asadarafat Jan 6, 2026
14c503e
style: Panel-footer content padding to p-4; align with panel-heading
asadarafat Jan 6, 2026
ec96646
style: standardize panel rounding to rounded-sm
asadarafat Jan 6, 2026
6c230bd
show healthcheck, closes #473
FloSch62 Jan 6, 2026
360b728
fix lint
FloSch62 Jan 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
82 changes: 82 additions & 0 deletions .dependency-cruiser.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/** @type {import('dependency-cruiser').IConfiguration} */
module.exports = {
forbidden: [
// ─── Orphan detection ───
{
name: 'no-orphans',
comment: 'Files not reachable from any entry point are likely dead code',
severity: 'warn',
from: {
orphan: true,
pathNot: [
'\\.(test|spec)\\.tsx?$', // test files
'__mocks__', // mock files
'\\.d\\.ts$', // type declaration files
'index\\.ts$', // barrel files (may be entry points)
],
},
to: {},
},

// ─── Path depth limits ───
{
name: 'no-deep-relative-imports',
comment: 'Prevent imports with more than 3 parent directory traversals (e.g., ../../../../)',
severity: 'error',
from: {},
to: {
// Match paths that have 4+ parent directory traversals
path: '^(\\.\\.[\\/]){4,}',
},
},

// ─── Circular dependencies (complementing madge) ───
{
name: 'no-circular',
comment: 'Circular dependencies are problematic for maintainability',
severity: 'error',
from: {},
to: {
circular: true,
},
},
],
options: {
doNotFollow: {
path: ['node_modules'],
},
exclude: {
path: [
'out/',
'dist/',
'dist-dev/',
'legacy-backup/',
'labs/',
'dev/',
'\\.test\\.tsx?$',
'\\.spec\\.tsx?$',
],
},
tsPreCompilationDeps: true,
tsConfig: {
fileName: 'tsconfig.json',
},
enhancedResolveOptions: {
exportsFields: ['exports'],
conditionNames: ['import', 'require', 'node', 'default'],
},
reporterOptions: {
dot: {
collapsePattern: 'node_modules/(@[^/]+/[^/]+|[^/]+)',
theme: {
graph: {
splines: 'ortho',
},
},
},
text: {
highlightFocused: true,
},
},
},
};
37 changes: 35 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,38 @@ jobs:
.npm/_logs/
retention-days: 7

e2e-tests:
runs-on: ubuntu-latest
needs: build-and-test
timeout-minutes: 60

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Install Playwright browsers and dependencies
run: npx playwright install --with-deps chromium

- name: Run E2E tests
run: npm run test:e2e

- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-${{ github.run_number }}
path: playwright-report/
retention-days: 30

# Optional: Add a job to test the packaged extension
package-validation:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -113,16 +145,17 @@ jobs:
# Summary job that depends on all other jobs
pr-check-summary:
runs-on: ubuntu-latest
needs: [build-and-test, package-validation]
needs: [build-and-test, package-validation, e2e-tests]
if: always()

steps:
- name: Check results
run: |
echo "Build and Test: ${{ needs.build-and-test.result }}"
echo "Package Validation: ${{ needs.package-validation.result }}"
echo "E2E Tests: ${{ needs.e2e-tests.result }}"

if [[ "${{ needs.build-and-test.result }}" == "success" && "${{ needs.package-validation.result }}" == "success" ]]; then
if [[ "${{ needs.build-and-test.result }}" == "success" && "${{ needs.package-validation.result }}" == "success" && "${{ needs.e2e-tests.result }}" == "success" ]]; then
echo "✅ All checks passed!"
else
echo "❌ Some checks failed. Please review the artifacts and logs."
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
out
dist
dist-dev
node_modules
.vscode-test/
topoViewerData
.vscode/*
!.vscode/
!.vscode/launch.json
.jscpd/*
.clab-icons/*

package.json
.DS_Store
Expand All @@ -14,9 +17,14 @@ package.json
mochawesome-report/
coverage/
.nyc_output/
test-results/
playwright-report/
playwright/.cache/
clab-*/
*.clab.yml*
*.clab.yaml*
!dev/topologies-original/**
dev/topologies/
CLAUDE.md
AGENTS.md
patch.sh
Expand Down
24 changes: 24 additions & 0 deletions .jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"threshold": 3,
"minLines": 8,
"minTokens": 50,
"reporters": ["console", "json"],
"ignore": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.d.ts",
"**/out/**",
"**/dist/**",
"**/dist-dev/**",
"**/node_modules/**",
"**/legacy-backup/**",
"**/easter-eggs/**"
],
"absolute": true,
"gitignore": true,
"blame": false,
"silent": false,
"output": ".jscpd",
"format": ["typescript", "tsx"],
"skipLocal": false
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
29 changes: 27 additions & 2 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,20 @@
.eslintrc.json
.eslintignore
.yarnrc
.nvmrc
tsconfig.json
eslint.config.mjs
.dependency-cruiser.cjs
.jscpd.json
.jscpd/**
scripts/**
webpack.config.js
esbuild.config.js
postcss.config.js
tailwind.config.js
.mocharc.json
.prettierignore
.prettierrc
Makefile
vsc-extension-quickstart.md

Expand All @@ -24,8 +35,12 @@ out/**
# Build artifacts
**/*.map
**/*.ts
**/*.LICENSE.txt
*.vsix

# Resources only needed for marketplace (loaded from GitHub)
resources/screenshot.png

# Test files
test.clab.yml
**/*.test.js
Expand All @@ -37,11 +52,21 @@ clab-*/
*.clab.yml*
labs/

#others
# Development directories
dev/**
dist-dev/**
.claude/**
legacy-backup/**

# Test and coverage output
.nyc_output/**
playwright-report/**
test-results/**
mochawesome-report/**
test/**

# Documentation and scripts
AGENTS.md
CLAUDE.md
mochawesome-report/**
patch.sh
report/
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Change Log
## [0.22.0] - 2026-01-06
- TopoViewer rewritten in React
- TopoViewer/editor:
- Undo/Redo support (Ctrl+Z / Ctrl+Shift+Z)
- When custom icons are used in lab, they will be copied to lab folder.
- Per-link endpoint label offset overrides
- Global endpoint label offset setting
- Fixes

## [0.21.0] - 2025-12-03
- Events, with clab 0.72.0 the extension does not poll anymore, everything is streamed from clab
- TopoViewer/editor:
Expand Down
103 changes: 103 additions & 0 deletions dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# React TopoViewer Development Server

This directory contains a standalone Vite dev server for rapid UI prototyping of the React TopoViewer without needing to run the full VS Code extension.

## Quick Start

```bash
npm run dev
```

This opens `http://localhost:5173` in your browser with the React TopoViewer running in standalone mode.

## Features

- **Instant Updates**: Changes to React components are reflected immediately (full page reload, Fast Refresh disabled for stability)
- **VS Code Theme Simulation**: CSS variables simulate the VS Code dark/light themes
- **Mock VS Code API**: All `postMessage` calls are logged to browser console
- **Sample Topology Data**: Pre-loaded spine-leaf topology for testing

## Settings Panel

Click the **⚙ gear button** (bottom-right) to open the settings panel:

| Setting | Options | Description |
|---------|---------|-------------|
| **Topology** | Sample, Empty, Large (25), Large (100), Massive (1000) | Load different test topologies |
| **Mode** | Edit, View | Switch between editor and viewer modes |
| **Deployment State** | Deployed, Undeployed, Unknown | Simulate lab deployment status |
| **Light Theme** | Toggle switch | Switch between dark/light themes |

The panel closes when clicking outside of it.

## Console Utilities

The same utilities are also available in the browser console:

```javascript
__DEV__.loadTopology('sample') // spine-leaf topology (6 nodes)
__DEV__.loadTopology('empty') // empty canvas
__DEV__.loadTopology('large') // 25-node grid
__DEV__.loadTopology('large100') // 100-node grid
__DEV__.loadTopology('large1000') // 1000-node grid

__DEV__.setMode('edit') // editor mode
__DEV__.setMode('view') // view-only mode

__DEV__.setDeploymentState('deployed')
__DEV__.setDeploymentState('undeployed')
__DEV__.setDeploymentState('unknown')
```

## UI Indicators

- **DEV MODE banner** (top-center): Confirms you're in development mode
- **⚙ gear button** (bottom-right): Opens settings panel

## File Structure

```
dev/
├── vite.config.ts # Vite configuration with path aliases
├── tsconfig.json # TypeScript config for the dev environment
├── index.html # Entry HTML with VS Code CSS variables
├── main.tsx # Bootstrap with mocked VS Code API
├── mockData.ts # Sample topology data and utilities
└── README.md # This file
```

## How It Works

1. **Vite** serves the dev environment with hot module replacement
2. **Path aliases** (`@webview/*`, `@shared/*`) point to the actual source files
3. **Mock VS Code API** intercepts `postMessage` calls and logs them
4. **CSS variables** simulate VS Code's theme system

## Workflow

1. Run `npm run dev`
2. Make changes to components in `src/reactTopoViewer/webview/`
3. Browser reloads automatically
4. Test UI behavior with different topologies/states
5. When ready, test in VS Code with `npm run package`

## Troubleshooting

### Blank screen with console errors
Clear Vite cache and restart:
```bash
rm -rf node_modules/.vite
npm run dev
```

### Styles not updating
Hard refresh: `Ctrl+Shift+R` (or `Cmd+Shift+R` on Mac)

### Mock API not receiving messages
Check browser console - all `postMessage` calls are logged with green `[postMessage to Extension]` prefix.

## Notes

- Fast Refresh is disabled to avoid React hook order issues with the complex hook structure
- The dev server runs independently of VS Code - no extension debugging needed
- Changes to `src/reactTopoViewer/` files are picked up automatically
Loading