Qt-removal R7.5b-1: Faded Connections canvas visual#148
Merged
Conversation
Ports the legacy scene's faded-connections toggle into the React Flow canvas - the first (smallest) of R7.5's 3 remaining canvas-visual parity gaps. When enabled, every connection dims to the legacy's exact 0.08 opacity except the one currently under the mouse. Same bare-bool/"scene"-topic shape as the existing snap-to-grid setting; the intent name matches the legacy GridControlBridge's own Slot name 1:1. Legacy's dead is_selected stay-bright branch (confirmed never set True anywhere in the Qt codebase) is deliberately not ported - hover is the only exemption.
This was referenced Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the legacy scene's faded connections toggle into the new React Flow canvas — the first and smallest of R7.5's three remaining canvas-visual parity gaps (faded connections → orthogonal routing → smart guides, shipping in that order). When enabled, every connection on the canvas dims to low opacity except the one currently under the mouse, matching the legacy
ChatScene's exact behavior (confirmed via fresh recon ofgraphlink_connections.py/graphlink_scene.py, not reimplemented from memory).What changed
backend/canvas.py:SceneDocumentgainsfade_connections_enabled: bool = False, published on the existing"scene"topic. AsetFadeConnectionsintent (name matches the legacyGridControlBridge's own Slot name 1:1, per this file's established convention) flips it and republishes — identical shape to the existingsetSnapToGrid.graphlink_app/graphlink_scene_payload.py: the codegen source-of-truth dataclass for the SPA's wire type gains the matching field (confirmed this is a separate file frombackend/canvas.py's runtime payload dict, not redundant — codegen reads from here).web_ui/src/app/canvas/SceneCanvas.tsx:toFlowEdges(now exported for direct unit testing, same astoFlowNodes) takes ahoveredEdgeIdand applies the legacy-exact0.08opacity to every edge except the hovered one, wired through newonEdgeMouseEnter/onEdgeMouseLeaveprops on<ReactFlow>. Legacy'sis_selectedstay-bright exemption was deliberately not ported — the recon confirmed it's dead code (never setTrueanywhere in the Qt codebase).web_ui/src/app/canvas/sceneStore.ts:setFadeConnectionsintent wrapper, matchingsetSnapToGrid.web_ui/src/app/chrome/ViewPopover.tsx: a new "Fade Connections" checkbox in the Grid section, sameview-check-rowmarkup as the existing Snap to Grid checkbox.web_ui/src/app/chrome/help-data/sections.ts: Help panel text updated to list faded connections as available (R7.5a had corrected it to say "not available yet"; orthogonal routing and smart guides remain honestly listed as not-yet-available until their own increments land).scene-state.ts/.schema.json) regenerated viagraphlink_island_codegen.py --write.Test plan
backend/tests/test_canvas.py: new intent test (defaultFalse, setter flips + republishes)SceneCanvas.test.tsx: 4 newtoFlowEdgesunit tests (no-op when disabled regardless of hover, fades all-but-hovered when enabled, fades everything when nothing is hovered, docked-node edge suppression still holds independent of fade state)ViewPopover.test.tsx(new file): the new checkbox reflects state and calls the right store method —ViewPopover.tsxhad zero prior test coverage; this intentionally covers only the new control, not a full backfillcreate_app()instance (isolated scratch settings/chat-db so the real~/.graphlink/session.datis never touched) plus the real Vite dev server, drove real nodes/edges into the live scene over the actual WebSocket protocol, and confirmed on the real rendered SVG:opacity: 0.08