Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions site/preview-v2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
if(type==='CONNECT')op.mode=source.wireTapMode==='split'?'split':'send';
const ok=wireGraphCommit([op]);
closeRouteChoice();if(!ok)return false;
render();kickWireSpring(source.id,dest.id);
render();selectTrack(source);kickWireSpring(source.id,dest.id);
say(source.name+' → '+dest.name+' · '+(kind==='only'?'ROUTE ONLY':'PARALLEL SEND')+' · reference only');
return true;
}
Expand Down Expand Up @@ -1973,6 +1973,7 @@
if(replugWireEdge(g.sourceId,g.originDestId,snap?.track.id??null)){
wireWsRecord(before);
if(!snap)selectedWireEdgeId=null;
else selectTrack(wireSourceTrack(g.sourceId)); // reveal accepted selected cable
}
}
}else{
Expand All @@ -1981,7 +1982,8 @@
const target=snap?.track||(input?findTrack(input):null),source=wireSourceTrack(g.sourceId);
if(target&&source&&target.id!==source.id){
wireSourceId=source.id;wireSourcePinned=true;wireIntent=true;wireAnchorId=target.id;
requestWireConnection(source,target,input);
if(requestWireConnection(source,target,input))
selectTrack(source); // a successful OUT drag reveals its selected cable
}else say('WIRE drop canceled · release in destination WIRE bay (graph unchanged)');
}
renderWireRouting();wireSuppressClick=true;
Expand Down
12 changes: 8 additions & 4 deletions tests/pages_v60_fader_wire_tactile_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,13 @@ def test_wire(page):
samples=page.evaluate("window.__v60WireSamples")
# Deterministic physical direction: first visible UP kick near IN,
# OUT remains quiet initially; then the decayed crest reaches near OUT.
physics=page.evaluate("""()=>{
const g=wireMotionGeometry.get('1-3');
if(!g)return null;
# Canonical Pages GUI intentionally encapsulates its lexical graph.
# Probe the exact checked-in motion function without exposing a runtime
# debug global or duplicating the production renderer.
motion=HTML[HTML.index("const WIRE_IMPACT_TRAVEL_MS="):
HTML.index("function kickWireSpring(")]
physics=page.evaluate("()=>{\n"+motion+"""\n
const g=[0,0,180,0,72]; // representative wire with anchored plugs
const [x0,y0,x1,y1,limit]=g;
const span=Math.abs(x1-x0),ceiling=Math.max(12,Math.min(100,Number(limit)||72));
const sag=Math.max(10,Math.min(ceiling,Math.min(ceiling-5,28+Math.sqrt(span)*1.55)));
Expand Down Expand Up @@ -219,7 +223,7 @@ def test_wire(page):
hit=page.locator('#wireLayer path.wire-interaction-hit[data-cable-key="1-3"]')
assert hit.count()==1
# The newly plugged edge is selected immediately, before the user clicks it.
assert page.locator('#wireLayer path.wire-outgoing-line[data-from="1"][data-to="3"].is-wire-selected').count()==1
assert page.locator('#wireLayer path.wire-outgoing-line[data-from="1"][data-to="3"].is-wire-selected,#wireLayer path.wire-incoming-line[data-from="1"][data-to="3"].is-wire-selected').count()==1
initial_edge=hit.get_attribute("data-edge-id")
mid=point_at_midpoint(hit)
page.mouse.click(mid["x"],mid["y"])
Expand Down
Loading