Repository navigation
Keep Show in Graph clear of the collapsed loop panel's expand control - #659
Merged
Merged
Conversation
With the loop detail panel collapsed, the "Loop panel" expand control was painted over the loop bar's Show in graph button: both occupied the bar's trailing ~92px. Pointer clicks there could not reach Show in graph, and in fact no pointer click on the bar, the toggle, or the workspace tabs reached the workspace at all, because collapsed loop workspaces routed input as if the bottom workspace panel were hidden and fell through to the hidden graph. The bar's hit layout also always assumed the panel was expanded, so Stop and Show in graph were hit-tested 272px left of where they were drawn. The collapsed expand control now owns the loop bar's trailing slot, with Show in graph and Stop moved left of it. One App helper computes the bar layout for painting, pointer hit-testing, and UIA, and loop workspaces route pointer input from the header down regardless of panel state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
…el-toggle-overlap Signed-off-by: Colin Neilens <coneilen@microsoft.com>
…workspace With the loop detail panel collapsed, WM_LBUTTONDOWN used to take the graph surface's workspace_top (the client bottom), so presses on the workspace tab strip and the loop bar fell through to the hidden graph and started a canvas pan. This adds a native-message App test at 1200 and 960 px and 96 and 144 DPI that presses a workspace tab and the loop bar's Stop with the panel collapsed, checks between DOWN and UP that no graph pan, node drag, or edge drag began, and requires the tab selection to change and Stop to send one stopNode for the open loop. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
coneilen
added a commit
that referenced
this pull request
Oct 8, 2026
Record the immutable, unpublished 0.1.78-windows.beta17 candidate built from 4ab2fcf with #658 and #659 (Show in Graph and collapsed loop panel fixes). Beta16 and its r2 handoff are failed/superseded and kept unchanged. Approval A keeps fixture-only Worktrees reclaim. Correct the parity count to the ledger's actual 98 surfaces: 58 Validated / 40 Partial. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
2 of 5 tasks
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
Follow-up to #658. With the loop detail panel collapsed, the "Loop panel" expand control was painted over the loop bar's Show in graph button, so pointer users could not reach Show in graph. This PR gives the expand control its own trailing slot in the loop bar and fixes two related routing bugs that also blocked collapsed-state clicks.
Changes
client.right-104..-14) sat on top of Show in graph (right-104..-12).LoopBarLayout.computenow takes apanel_toggleflag. When it is set, the expand control takes the bar's trailing slot and Show in graph and Stop move left of it, with the existing 8 px gap.GraphCanvas.loopDetailExpandBoundsnow reads that same rect.client.right - loop_detail_width. With the panel collapsed, Stop and Show in graph were hit-tested 272 px left of where they were drawn. A newApp.workspaceLoopBarhelper now computes the bar layout, and painting,WM_LBUTTONDOWNhit-testing, and UIA (workspace-show-graph-*,workspace-stop-*,workspace-toggle-panel-*) all use it.WM_LBUTTONDOWNused the graph surface'sworkspace_top(client_bottom). So no click under the header reached the workspace block (panel toggle, loop bar, tab chrome). Those clicks fell through to the hidden graph. Loop workspaces now route from the header down whatever the panel state.WM_LBUTTONDOWN/UPat the UIA-published centers of Collapse, Stop (asserts onestopNodefor the open loop, panel unchanged), Show in graph (asserts the graph is shown, panel state unchanged, no outbound frames) and Expand. It also asserts that the three controls are pairwise disjoint and inside the client area, both expanded and collapsed.LoopBarLayoutgains collapsed-slot geometry tests at 1280/1200/960 px, for both active and resolved loops.stopNodefor the open loop.false; their geometry is unchanged.investigation/ui-parity-matrix.md: the "Right loop panel" row moves fromValidatedtoPartial. Its live gate only toggled through UIA invoke, and the new collapsed geometry has unit evidence only.Test plan
All runs used the pinned Zig 0.15.2 from
Tools\windows\bootstrap.ps1 -SkipSwift, run fromgraphcode-windows.zig test src\App.zigused the full native link line fromTools\windows\Tests\WindowsShell.Tests.ps1("App shell executable tests").RED: zig test src\App.zig (App shell link flags) --test-filter "loop panel toggle never covers" -> 0 passed, 1 failed: TestUnexpectedResult at expectLoopBarButtonsDisjoint, !physicalRectsOverlap(show_graph, panel_toggle) with the panel collapsed (expanded case passed first); same command --test-filter "collapsed loop panel routes native tab" with only the cause-3 workspace_top line reverted -> 0 passed, 1 failed: TestUnexpectedResult at expectWorkspaceOwnsPress, !app.canvas.dragging on the tab press (the press panned the hidden graph)
GREEN: zig test src\App.zig (App shell link flags) --test-filter "loop panel toggle never covers" -> 1/1 passed (1200 and 960 px, 96 and 144 DPI); --test-filter "collapsed loop panel routes native tab" -> 1/1 passed
REGRESSION: zig test src\App.zig (App shell link flags), after merging main add3e7e -> All 888 tests passed; zig test src\LoopBarLayout.zig -> All 8 tests passed; zig test src\TerminalSurface.zig (terminal link flags) -> All 164 tests passed; zig build -Doptimize=ReleaseSafe -Dwinghostty-dir=pinned root at 2d33df3 -> exit 0
To confirm the behavioral failure as well as the geometry one, I made two throwaway edits before the fix. Each edit bypassed only the collapsed geometry assertion, and I reverted both. Neither is in this diff. The routing RED came from a third throwaway edit that put back only the pre-fix
workspace_topcondition; it was also reverted.expected 2, found 1on the outbound count.expected .project, found .workspace. Panel state stayed collapsed, because the click never reached the workspace handler.Limits:
zig fmt --checkis clean on the changed code.TerminalSurface.zighas formatting drift onmain(lines 414-424 and 580) that this PR leaves alone.Checklist
git commit -s) per the DCOmake test). This change is Windows-only, andmake testis the macOS suite, which was not run. The Windows Zig suites above passed.make check). macOS lint was not run.zig fmt --checkis clean on the changed lines.