Skip to content

Align Windows sidebar row presentation with macOS - #873

Open
coneilen wants to merge 1 commit into
mainfrom
coneilen-sidebar-row-parity
Open

coneilen wants to merge 1 commit into
mainfrom
coneilen-sidebar-row-parity

Conversation

@coneilen

Copy link
Copy Markdown
Collaborator

Summary

Bring Windows sidebar row presentation closer to the shipping macOS hierarchy and visual vocabulary without changing navigation, action routing, or hit targets. This is a bounded, source-derived presentation improvement; sidebar parity remains Partial.

Changes

  • Align Graph, Quick Chats, local-folder, and remote-network icons in one monochrome leading column; keep project controls trailing and make section chevrons hover-only. Match chat-child indentation and the loop tree's 16-pixel indentation.
  • Draw loop kind as a 3-by-14 rounded stripe in the five macOS kind colors, followed by a 12.5-size title, 10.5-size monospaced elapsed label, and a 7-pixel solid/hollow recorded-state indicator. Measure the actual age label so short ages do not unnecessarily truncate titles; keep age/state clear of existing disclosure hit targets.
  • Match compound elapsed units such as 1h 59m and 1d 23h. Preserve existing missing/invalid/future/equal-timestamp handling, row generation, public signatures, selection/action routing, scrolling, clipping, and footer geometry.
  • Add six inline behavioral/offscreen contracts in the already-registered Sidebar test root. All five stripe colors, all nine recorded states, exact stripe extent, disjoint columns including deep nesting, icon alignment, hover controls, and reclaimed title space are covered with synthetic data and memory DIBs. Only graphcode-windows\src\Sidebar.zig changes; the leased recent-project fixture did not need changes.

Source ground truth:

  • graphcode\Sources\Features\App\AppSidebarView.swift:278-296: stripe, title, monospaced age, trailing state. Lines 332-371, 387-425, and 435-515 define group ordering, section captions, and Quick Chats.
  • graphcode\Sources\Features\App\AppSidebarView+Rows.swift:43-111,253-285: monochrome leading icons, trailing hover controls, and nested row presentation.
  • graphcode\Sources\Features\App\LoopTypeAppearance.swift:30-48: five kind colors, converted to Windows COLORREF byte order.
  • graphcode\Sources\Features\App\LoopStateAppearance.swift:49-82,132-140 and graphcode\Sources\Features\Canvas\LoopCardView.swift:393-412: solid/hollow state shapes and hues.
  • graphcode\Sources\Features\Canvas\LoopCardPresentation.swift:272-280: days/hours/minutes duration wording.

Existing-expectation corrections are intentional, not removed coverage: the old kind-color literal (including its clipping-test sentinel), whole-hour age expectation, and title/state-word/age column measurements encoded the presentation defects. Behavioral RED established the replacement palette, duration, and title/age/indicator contracts before implementation. Replacements expand coverage to five colors, nine state shapes, compound-age native font measurements, and fixed-control/deep-nesting bounds; all invalid-timestamp and hit-target checks remain.

Test plan

RED: & $env:GRAPHCODE_ZIG0152 test src\Sidebar.zig --test-filter 'sidebar row parity' -target x86_64-windows-msvc -lc -luser32 -lgdi32 "-I$env:GRAPHCODE_WINGHOSTTY_ROOT\include" --cache-dir "$scratch\zig-local" -> 0 passed; 0 skipped; 5 failed behaviorally: expected 14932691, found 8042751; expected '1h 1m', found '1h'; age/state order, state pixel, and header-icon assertions failed.
GREEN: & $env:GRAPHCODE_ZIG0152 test src\Sidebar.zig --test-filter 'sidebar row parity' -target x86_64-windows-msvc -lc -luser32 -lgdi32 "-I$env:GRAPHCODE_WINGHOSTTY_ROOT\include" --cache-dir "$scratch\zig-local" -> All 6 tests passed, including measured-title follow-up.
REGRESSION: & $env:GRAPHCODE_ZIG0152 test src\Sidebar.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 "-I$env:GRAPHCODE_WINGHOSTTY_ROOT\include" --cache-dir "$scratch\zig-local" -> All 216 tests passed; positive executed count asserted.

Commands above ran from graphcode-windows with the repository-bootstrap-pinned Zig 0.15.2/provider environment loaded from C:\gct\sidebar-ef1f\environment.ps1. $scratch is this session's artifact directory; TEMP/TMP and Zig caches were isolated. Original failure logs were retained separately from passing logs.

Additional actual commands/results:

  • & $env:GRAPHCODE_ZIG0152 test src\Sidebar.zig --test-filter 'sidebar row parity gives short elapsed' -target x86_64-windows-msvc -lc -luser32 -lgdi32 "-I$env:GRAPHCODE_WINGHOSTTY_ROOT\include" --cache-dir "$scratch\zig-local" -> 1 executed behavioral failure at title_pixels > 20, before the measured-age fix identified by visual review; now passes in the six-case GREEN.
  • & $env:GRAPHCODE_ZIG0152 test src\Navigation.zig --cache-dir "$scratch\zig-navigation" -> All 2 tests passed.
  • & $env:GRAPHCODE_ZIG0152 build -Doptimize=ReleaseSafe "-Dwinghostty-dir=$env:GRAPHCODE_WINGHOSTTY_ROOT" --cache-dir "$scratch\zig-build" --prefix "$scratch\sidebar-build" --summary all -> 5/5 build steps succeeded; production Windows executable produced.
  • & $env:GRAPHCODE_ZIG0152 fmt --check graphcode-windows\src\Sidebar.zig from repository root -> passed. git diff --check -> passed.
  • & $env:GRAPHCODE_ZIG0152 test src\GraphCanvas.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 -lgdiplus "-I$env:GRAPHCODE_WINGHOSTTY_ROOT\include" --test-filter 'paint export: overview-paint-764' --cache-dir "$scratch\zig-paint" --global-cache-dir "$scratch\zig-global-paint" with the existing export environment -> 1/1 passed; three production memory-DIB renders with matching RGB hashes. BMP was converted to PNG for local review, not published as converter-validated provenance.
  • ONE fresh-eyes code-review task -> "No significant issues found in the reviewed changes."
  • ONE paired visual review -> Partial. Compared that Windows offscreen export against investigation\visual-baseline\rendered-macos\macos-canvas-sidebar.png (reference commit b0af051fe28a890bc9ebf3c6bd97fffaba51cc3b, 1x). Different fixture contents and dimensions are not a pixel match. The review found over-reserved age width; the additional behavioral RED/GREEN above addresses it, with no repeated reviewer round.

Honest intermediate failures, all retained: one implementation compile error in a Zig defer statement was corrected (not behavioral evidence); an exact stripe raster assertion found 11 rather than 14 painted rows and drove the bounded raster correction; one concurrent compiler attempt returned OutOfMemory before tests ran, then passed serially. The first production build lacked the freshly bootstrapped Winghostty static host library; the documented pinned build -Demit-win32-host=true prerequisite was built in this session's provider root, and the production build then passed. These are separate from the original five behavioral RED failures.

Remaining Partial:

  • GraphModel.Node does not retain exit-code, active-dependent, or mailroom-watch metadata required by macOS LoopNode.displayState and watcher presentation. The sidebar draws the recorded state; it does not invent derived idle/failed/waiting state or a watcher glyph.
  • Existing Windows fixed GRAPH/Projects chrome, vertical row geometry, Needs-you/activity surfaces, and action/hit targets are preserved. The visual review still noted density and native icon-ink differences. No claim of complete hierarchy, typography, material, or visual parity.
  • Missing/invalid/future/equal timestamps keep the existing - rather than fabricating elapsed time.
  • No desktop capture, foreground interaction, physical/native keyboard input, UIA/accessibility conformance, real daemon persistence, or live walkthrough ran. macOS make test and make check were not run on this Windows host. The shared parity ledger and all macOS/shared Swift sources are untouched.
  • Hosted checks are reported separately from these local results; no merge or ready-for-review transition is requested.

Checklist

  • I have read the Contributing Guidelines
  • I have signed off my commits (git commit -s) per the DCO
  • Tests pass locally (make test)
  • Code follows the existing style (make check)
  • I added the test/contract before the implementation and observed the intended RED failure

@coneilen
coneilen added this pull request to stack #877 October 18, 2026 20:17
@coneilen
coneilen force-pushed the coneilen-sidebar-row-parity branch from 4815397 to 17c9075 Compare October 18, 2026 22:26
@coneilen
coneilen marked this pull request as ready for review October 18, 2026 22:45
Use monochrome aligned navigation icons, source-matched kind stripes, compound monospaced ages, and trailing solid/hollow state indicators while preserving row action geometry. Add behavioral and offscreen draw coverage; retain explicit parity limits for unavailable model metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ef1fefd5-272c-435b-bfce-fc10e44ef00f
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
@coneilen
coneilen force-pushed the coneilen-sidebar-row-parity branch from 17c9075 to 6652c21 Compare October 18, 2026 23:06

This branch has not been deployed

No deployments
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.

1 participant