Skip to content

Fix Overview pinned state after canvas docking - #160

Merged
0101 merged 8 commits into
mainfrom
bug-in-glued-agents-1
Jul 31, 2026
Merged

Fix Overview pinned state after canvas docking#160
0101 merged 8 commits into
mainfrom
bug-in-glued-agents-1

Conversation

@0101

@0101 0101 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Problem

  • Docking the canvas left or top reversed the dashboard and canvas children in the DOM.
  • React reconciled the same-typed children by index, leaving the Overview band's pinned-state observers attached to the wrong pane.
  • Observer setup could also run before React committed the band and silently stop after one failed node lookup.

Fix

  • Keep dashboard and canvas DOM order stable, using CSS order for left/top docking.
  • Retry pinned-state observer attachment on animation frames until the band nodes exist.
  • Document the stable DOM-order and observer-attachment requirements in the relevant specs.
  • Add end-to-end regression coverage for left docking, delayed node availability, and opening Overview while already scrolled.

Tests

  • dotnet test src\Tests\Tests.fsproj --filter "Category=OverviewBandE2E" --logger "console;verbosity=minimal" — 21 passed

0101 added 8 commits July 27, 2026 09:42
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
Copilot AI balanced review requested due to automatic review settings July 31, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/Client/index.html
@0101
0101 enabled auto-merge (squash) July 31, 2026 17:46
@0101
0101 merged commit 8846779 into main Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants