Fix Overview pinned state after canvas docking - #160
Merged
Conversation
Both rules generalise a defect found in the Overview Agents sticky strip, where observePinnedState captured .dashboard and its sentinel once inside a single requestAnimationFrame and never re-resolved them, under a subscription key that could not express the dependency. Copilot-Session: 96532087-8fa0-4bde-adca-56755c5d64f1
The first rule was unimplementable for an observer or element listener: both must resolve their target at setup to attach at all, so re-querying inside their own callback cannot recover a replaced node. Split the guidance into resolving nodes per effect invocation and binding node-bound resources to a node React never replaces (or restarting them when the target can change). Copilot-Session: 96532087-8fa0-4bde-adca-56755c5d64f1
The Agents strip stopped closing its drill-down on scroll and stopped scrolling to the top on a pinned click, because OverviewAgentsStuck was never dispatched again. Two independent causes: - .app-layout reordered its two unkeyed, same-typed children by dock position, so React reconciled them by index and the observers ended up watching the canvas pane whenever the canvas was docked left or top. Docking is now purely CSS (order), with DOM order fixed. - observePinnedState resolved its nodes in a single animation frame and gave up silently when that frame ran before React committed the band. It now re-resolves each frame until the nodes exist. Both observers stay: the IntersectionObserver keeps its initial callback and non-scroll geometry updates, and setCircleShift stays on the ResizeObserver rather than on the scroll path. Copilot-Session: 4d993231-8a87-4e1b-a1e3-bacde1d5db21
There was a problem hiding this comment.
Pull request overview
Fixes Overview pinned-state observers after canvas docking by preserving React node identity and retrying observer attachment.
Changes:
- Stabilizes dashboard/canvas reconciliation and visual docking.
- Retries observer setup until DOM nodes exist.
- Adds specifications and E2E regression coverage.
Show a summary per file
| File | Description |
|---|---|
src/Client/App.fs |
Keeps layout children in stable DOM order. |
src/Client/index.html |
Visually reorders left/top canvas docking. |
src/Client/OverviewBand.fs |
Retries pinned-observer attachment. |
src/Tests/OverviewBandE2ETests.fs |
Adds docking and observer-race regressions. |
docs/spec/canvas-pane.md |
Documents canvas layout behavior. |
docs/spec/overview-drilldown.md |
Documents delayed observer attachment. |
docs/spec/beads-overview-band.md |
Updates canonical Overview behavior. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Balanced
0101
enabled auto-merge (squash)
July 31, 2026 17:46
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.
Problem
Fix
orderfor left/top docking.Tests
dotnet test src\Tests\Tests.fsproj --filter "Category=OverviewBandE2E" --logger "console;verbosity=minimal"— 21 passed