Repository navigation
fix(canvas): Focus mode dims the connections outside the focus set (v0.21.1) - #331
Merged
Merged
Conversation
…0.21.1) The bug reported in #329; part of #330. Version 0.21.1. Cause: src/components/edges/LoopEdge.tsx passed `opacity: activatorOn === false ? 0.5 : 1` as an inline style on every connection path (since e7a401d). The Focus rule `.react-flow__edge.lgr-deemph .react-flow__edge-path { opacity: 0.26 }` came later (986eed5), and an inline style beats a stylesheet rule, so a connection outside the focus set was never dimmed; only the nodes were. The tests asserted the class, not the drawn opacity. Fix: the unsatisfied activator's 0.5 is now the `.edge-activator-off` class (src/index.css), and the inline `opacity` is gone. The Focus rule has the higher specificity, so a connection outside the focus set is 0.26, its path and its arrowhead (the arrowhead is the path's own marker), whatever its activator says; an unsatisfied activator inside the focus set keeps its 0.5. Under forced colours a dimmed connection is not faded: opacity 1, and the existing sparse `1 5` dash stays its tell. Labels, the selection underlay, nodes, the playback tokens and cues, files, digests and the simulation are unchanged. Measured before and after on the same dev server with the same script, light, dark and forced colours: the only differences are the dimmed paths' opacity (1 to 0.26 in light and dark; an unsatisfied activator outside the focus set 0.5 to 0.26, and 0.5 to 1 under forced colours), the removed inline value, the new class and the arrowhead pixels. The first comparison had no selected connection, so the selection underlay was measured separately on the old and the new code: unchanged in all three (1 inside the focus set, 0.26 outside, same colour). Tests: e2e/focus-edge-dimming.spec.ts reads the drawn opacity: Focus inside and outside times activator satisfied and unsatisfied in light and dark, forced colours (opacity 1 and the `1 5` dash), and a played step (the dimmed path at 0.26 while the token keeps its opacity and colour). All four fail on the old code. e2e/whats-new.spec.ts pins 0.21.1. No visual baseline changes: no existing baseline is taken with Focus mode on. Release: three release-note lines in 18 languages, 16 without native review; the copy guards move only their exact pins (catalog 1030 to 1033, runtime 1252 to 1255, pt-PT's difference from pt-BR 275 to 277, two new ё words for ru), no bound widened. pt-PT's difference outside the password keys is now 249 against its quarter bound of 249.75; one of the three lines reads the same in pt-BR and pt-PT so it stays there. Docs: docs/large-graph-readability.md §LGR3.1, CHANGELOG.md and README.md.
Deploying cozy-loop-studio with
|
| Latest commit: |
29dec5d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://693239dd.cozy-loop-studio.pages.dev |
| Branch Preview URL: | https://fix-focus-edge-dimming.cozy-loop-studio.pages.dev |
This was referenced Oct 7, 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.
Part of #330. A bug fix for the problem reported in #329, released as v0.21.1 (the release date is set to the actual merge day before merging). It is the prerequisite of the play execution visualization work.
The bug
With Focus mode on, the nodes outside the focus set were dimmed as
docs/large-graph-readability.md§LGR3.1 specifies, but the connections outside it were drawn at full strength. Measured onmain6de1852and on productionv0.21.0: every connection outside the set had thelgr-deemphclass, and its path's computed opacity was1, at rest and during a played step.Cause
src/components/edges/LoopEdge.tsxpassedopacity: activatorOn === false ? 0.5 : 1as an inline style on every connection path (sincee7a401d)..react-flow__edge.lgr-deemph .react-flow__edge-path { opacity: 0.26 }came later (986eed5). An inline style beats a stylesheet rule, so it never applied.The fix
.edge-activator-offclass insrc/index.css; the inlineopacityis gone. The Focus rule has the higher specificity, so it wins.opacity: 1; the existing sparse1 5dash stays its tell.1 5dash1 5dashLabels, the selection underlay, nodes, the playback tokens and cues, files, digests, the engine and the simulation are unchanged.
Before and after
main6de1852and after on this branch, in light, dark and forced colours: a state graph with one satisfied and one unsatisfied activator, Focus anchored on each side; two isolated connections for the arrowhead; and a played step paused mid-travel.Visual baselines
No baseline changes, and none was updated. No existing baseline is taken with Focus mode on: the one screenshot test that turns Focus on turns it off before its shot, and an unsatisfied activator draws at the same 0.5 as before. Every screenshot spec on chromium and mobile passed without an update: 321 passed, 5 skipped by design.
Tests
e2e/focus-edge-dimming.spec.ts(4) reads the drawn opacity: Focus inside and outside times activator satisfied and unsatisfied, in light and dark; forced colours (opacity 1 and the1 5dash); and a played step, where the dimmed path is 0.26 while the token keeps its opacity and colour. All four fail on the old code and pass on the fix, three repeats in a row.e2e/whats-new.spec.tspins 0.21.1.Release
.changes/focus-edge-dimming.json, release noterelease:0.21.1with three lines in 18 languages, 16 without native review.docs/large-graph-readability.md§LGR3.1,CHANGELOG.md,README.md.Verification (local, at the head commit)
npx tsc -b, oxlint (39 warnings, the existing baseline, 0 errors), 3,207 unit tests, all 21 source checks of the CIchecksjob, and the list of 1,997 tests in exactly one of the 5 shards.mobileproject 109 passed, 4 skipped by design;i18n-vi26 passed; the playback, Focus, state, routing and forced-colours specs 309 passed; the portable file 16 of 16, the production bundle 16 of 16, the PWA 19 of 19.CI
29dec5d, the head: every job passed and the union is exact (1,997: 1,990 passed, 7 skipped by design, 0 failed, 0 retried).v0.21.1 · build 29dec5d, and its automated check through the real UI passed 21 of 21 with no page error, in light, dark and forced colours: no inline opacity left; the four Focus x activator combinations (outside 0.26 in light and dark, 1 with the1 5dash under forced colours; an unsatisfied activator 0.5 inside and Focus winning outside); the dimmed arrowhead painted fainter with its path in light and dark and not faded under forced colours; the selection underlay 1 inside the focus set and 0.26 outside, as onmain; and, during a played step, the dimmed paths dimmed while every token keeps opacity 1 and one colour.Not claimed