Skip to content

Restore terminal shell details and DPI-correct tab visibility - #959

Merged
coneilen merged 10 commits into
mainfrom
coneilen-match-windows-terminal-details
Nov 5, 2026
Merged

coneilen merged 10 commits into
mainfrom
coneilen-match-windows-terminal-details

Conversation

@coneilen

@coneilen coneilen commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Restore truthful configured-shell details, source-grounded terminal header metrics and DPI-correct twelve-tab host sizing. Preserve a full selected tab under monitor constraints with the user-approved Windows policy: last-opened panel wins, and auto-hidden panels return when space permits.

Changes

  • Derive plain-shell cmd detail from the pinned provider's actual cmd.exe default, with a provider-source drift contract; this names configuration, not the current foreground child process.
  • Sum individually rounded physical tab/control/panel components before native frame adjustment. Grow without activation, preserve height and persisted terminal layout, cap at the work area, and preserve selected-tab overflow.
  • Preserve 25-logical tab pills, 24-by-22 controls, close targets, stable selection identities and DPI ownership. Measure pane text advances and trailing detail alignment instead of fixed title slots; retain source-grounded font roles.
  • Keep requested panel visibility distinct from effective auto-hidden state. Reserve one full 92-logical selected tab plus existing controls/insets; opening an auto-hidden panel makes it priority rather than toggling its requested intent off. Widening restores requested panels only; explicit user-hidden panels stay hidden.
  • Reuse sidebar menu and loop-panel header/overflow/UIA routes, with effective visibility driving existing paint, hit testing, labels and checked state. If even one requested panel cannot coexist with the terminal minimum, preserve its intent and explicitly ask for a wider window through status. This is user-approved Windows behavior, not a responsive policy specified by macOS source.

Test plan

PATH-NORMALIZED commands, not verbatim: machine/user/session-specific roots below are replaced with named variables or repository-relative paths. $EvidenceRoot denotes private session evidence/scripts, $ShellValidationRoot the owned short validation root, $ValidatorRepositoryRoot the clean validator checkout, $CompiledArtifactRoot its current artifact directory, and $PinnedSwiftExecutable the pinned Swift6.3.3 executable. Exact actual invocations remain in private retained receipts; these substitutions do not change selectors, budgets or reported results.

RED: pwsh -NoProfile -File "$EvidenceRoot\terminal-cap-focused.ps1" -LogName terminal-responsive-policy-red.log -> 0 passed/0 skipped/1 failed: expected 0 boundary/transition failures, found 14; original 56-row reproduction separately observed zero selected tabs in two rows.
GREEN: pwsh -NoProfile -File "$EvidenceRoot\terminal-cap-focused.ps1" -LogName terminal-responsive-final-focused.log -> 1/1 passed: all 56 rows, full-tab minimum, action-route priority swaps, restoration, explicit-hide persistence and seven threshold edges.
REGRESSION: pwsh -NoProfile -File Tools\windows\validate.ps1 -Task windows-shell -ShellPart unit -ShellTestShard 0 -ShellTestShardCount 3 -ShellTestManifest "$ShellValidationRoot\sections\shard-0.json" -ShellValidationRoot $ShellValidationRoot -> exit0 on69773c7f:23 sections,App1676 passed/19 skipped/0 failed,native provider280 checks/0 failures; retained unchanged-execution-input proof, not a bf7505f execution.

Current source and focused evidence

Current head bf7505f36c4d1020ec10c47348dc567709a1d097, tree 8c50c268ee470d8f237595b8c659d80570ae6ba0, is a normal merge with parents 80ec4396ee1cecd5c5557c1925ef5fe572408886 and actual main 8223eab8ab3216fb860309f3c71880094426bf0c. Its exact delta from80ec4396 is only Project.swift lines94-95:0.1.84-beta1/build321 ->0.1.84-beta2/build322, with exact two-field replacement and whole-file hashes verified.

The earlier normal merge1ed5fc4e brought only the same Project.swift fields from0.1.83/build320 to0.1.84-beta1/build321. Subsequent normal merge80ec4396 brought three macOS files,57 insertions/14 deletions: graphcode/Sources/Clients/RemoteRepositoryClient.swift allows existing non-Git remote folders by removing the Git probe and extracting checks; graphcode/Sources/Features/App/AppFeature+Worktrees.swift changes a comment; graphcode/Tests/RemoteRepositoryTests.swift adds two tests/helper. No Windows feature port or shared Swift change is included. Primary and owned short physical source match all seven Terminal bindings, unchanged across69773/1ed5/80ec/bf750. Working/index endings are LF; retained pinned Zig format and current diff checks pass. The original seven unique commits and all three later normal merges are DCO-signed; the retained historical merge b2ec879e lacks the Copilot coauthor and is disclosed rather than amended/history-rewritten. New commits include both required trailers.

UNCHANGED-EXECUTION-INPUT reuse, not current-head executions: at80ec4396, the clean validator independently compared all1255 broadly sealed source files against69773:1251 identical/four changed (Project.swift and the three macOS paths above). All355 embedded/reference inputs and11 compiled outputs are identical; registry684 is unchanged. Real MSBuild/package, Windows format and visual-reader consumer inspection finds none of the three macOS paths/identifiers consumed by these compiled executions or predicates; their actual consumer is the Tuist macOS app. Project.swift is broadly sealed source, but not a compiled embedded/build/predicate input for these Windows executions. Receipt terminal-macos-merge80-input-impact.json, SHA256 B33CD734CA0DC79F20B26E89E00CF4199F706CB378952293F895359F8082B5CC.

The exact version-only delta from80ec4396 extends this accepted boundary without a new broad comparison: cumulative source counts remain1255/1251 same/four changed versus69773,355 embedded/reference inputs and11 retained compiled outputs remain unchanged, registry684 unchanged. Additive receipt terminal-beta2-additive-version-admission.json, SHA256 791BC4688E4343304A4ABA84C37C83600FFD1179B96AE59BDA0186CD69D8DDF9, records the exact Project SHA256 transition 317D456D8FD77E5E878F8D51C58BE1858C79133156710F76C82FE1463F55DF18 -> F8A4DF76B2501FAE27E12241EC56072D90CEE27132CB8473249FA6AF40035D53, unchanged seven Terminal blobs at all four heads, and preservation of70 runtime names/content hashes. Coordinator accepted bounded reuse of69773 local evidence, not a new execution or seal. Original69773 report/seal remains immutable and labeled69773.

The separately completed1ed5fc4e hosted snapshot had27 checks:22 successes/5 legitimate path skips, including all nine required checks. Those remain1ed5fc4e results, not current-head executions or proof of the subsequently merged macOS feature. The later80ec4396 hosted snapshot was not green:15 successes/5 skips/5 pending/one real-packaging failure; see retained failure below. Fresh required checks at bf7505f must pass independently.

The original boundary RED observed all56 combinations: physical client widths1024/1920, seven injected DPIs96/108/120/132/144/168/192 and four rail/detail states. Both-panel1024 cases at168/192 published zero tabs, selected tab invisible, while accessibility refresh succeeded. All other54 rows retained the selected tab. Log terminal-boundary-56-red.log, SHA256 D03E14C1F7684FC7D337A9C9E4805934C0F207860FDD8AD408D92BE2FA613818. The expanded policy RED adds transition/full-width assertions and fails14 checks, not14 independently executed tests.

Focused GREEN observes all56 rows with zero failures, tests full92-logical selected-tab width, native WM_COMMAND sidebar routing, header UIA and overflow priority swaps, grow/shrink restoration, explicit-hide persistence and byte-identical persisted tab layout. Seven exact single-panel threshold edges verify explicit status below the boundary and restoration at the boundary. The separate actual-monitor cap/placement/persisted-layout fixture remains exercised. All hidden windows are destroyed and thread awareness restored. terminal-responsive-final-focused.log SHA256 DA99A2F717A32BF253C6611098473574108BA7374A11D15AE2BF25DCA5E6AD46; these focused runs precede the final signed commit. Direct zig test graphcode-windows\src\WorkspaceControls.zig ->4/4; owned terminal-focused.ps1 with terminal parity/tab chrome/tab overflow/pane header filters ->11/11 adjacent tests.

Actual window DPI is96, monitor work area1920x885. Matrix sizes are real hidden-window client rectangles, not OS display changes or actual168/192-DPI monitors. Twelve visible tabs are asserted only where their desired width fits. macOS read-only source exposes a native split view, resizable trailing rail and user toggles, not an explicit narrow-width automatic fallback; user approval supplies this Windows policy.

Retained69773 gates, reused by unchanged execution inputs

On69773, the unit command on the REGRESSION line, then the same command with shard/manifest1 and2 ->exit0 for23/18/24 sections. Read manifests confirm65/65 positive sections,64 wired roots. App1676 passed/19 skipped/0 failed;19 skips are opt-in GraphCanvas/Gdiplus paint fixtures, not Terminal tests. That App execution links the C++ accessibility provider from the same source; the separately freshly compiled provider suite reports280 checks/0 failures. Default profile unchanged. Four intentionally invalid WorktreeGitProcess subcontrols fail as required by their enclosing positive contract. None of these counts is relabeled as a bf7505f execution.

Retained unit logs:

  • terminal-unit-shard0-gate-20261105T053810714Z.log: SHA256 D7820E9396E2AEB8B077CE1CBC813ECEC727A88005EA0A6C24AE8A4FBB493AFE.
  • terminal-unit-shard1-gate-20261105T054848895Z.log: SHA256 2E8F44412CFEF10AC2A60971A7BD0F4C67480E54FAAE346CCBD40B4E730FBA91.
  • terminal-unit-shard2-gate-20261105T055529977Z.log: SHA256 E16F9107918061E92A4A1979CBAA81C286732FA2908E99A97AFDE1A05F7F3A25.

At69773, the clean validator separately ran SDK10.0.403 dotnet build -c Release ->exit0/0 warnings/0 errors first attempt, then PATH-NORMALIZED ValidationRunner.exe --repository-root $ValidatorRepositoryRoot --artifact-root $CompiledArtifactRoot ->exit0, FIRST default unfiltered full contract pass at69773. Run2026-11-05T08:05:57.5918335-08:00 through08:23:21.7797564-08:00:684 positive controls (683 direct units/2188 direct assertions plus1 derived proof), one PASS/execution marker, EOF/owned-job0. Coordinator independently verified11 output bindings/69773 source closure; report SHA256 E151763128FEB3477FA8BCB7580FD38F17A76745DE3956779D07F9E3131FB619. This Terminal session read retained receipts rather than duplicating that full execution. The broad seal does not match the current merged tree; the input comparison above, not a relabeled seal, establishes accepted reuse.

PATH-NORMALIZED pwsh -NoProfile -File Tools\windows\validate.ps1 -Task windows-shell -ShellPart integration -SkipTrayLive -SwiftExecutable $PinnedSwiftExecutable -ShellValidationRoot $ShellValidationRoot ->exit0 on69773,2026-11-05T16:25:32.4334817Z through16:32:03.9768129Z; controller exit0 at16:32:04.0218246Z. Both special-mode environment keys GRAPHCODE_CARDS_NATIVE_ACCEPTANCE_PLAN and GRAPHCODE_UIA_SUPERVISED_FOREGROUND were absent after overlays; ordinary5-second guards/all phases unchanged. Controller bound today's explicit11:06:22.6966368-08:00 native lease cutoff. An initial controller command proposal was rejected before execution; the corrected controller admitted exactly one integration run. No source/harness change, synthetic focus workaround, Computer Use action or protected Copilot control.

Passing integration log terminal-integration-shard0-gate-20261105T162532427Z.log, SHA256 6112F1EB19118D6342B31E6506A0AD6E2047CA85CF91C7D13E44E193776DD51B: two scripted smoke contracts, smoke/stress/restart/installed-layout/concurrent handoff, scrubbed startup5/5, six positive one-test daemon executions and round trip, TrayAdmission16/16, one complete final GraphCode UIA Root receipt.37 UIA evidence records are records, not37 tests; timeout records0. Actual initial foreground was the owned Update Available modal, not proof of any acquisition cause.

Six held launch teardown receipts report root exited/empty job/drained readers/no failures; final ownedJobs4, provider no candidates, exact DPI6011 restoration and unchanged default profile. Advisory owned-root product process count0. All70 generated physical runtime files remain preserved, not staged. Retained warnings include Swift unhandled resources4/7, refusing to end zmx sessions when other saved layouts could not all be read, and JSON serialization depth8 truncation. No warning is silently converted into stronger evidence.

Preserved failures and earlier evidence

  • Original shell/header tests failed3/3 (expected cmd/empty, missing intrinsic-width source contract, trailing-detail bitmap empty), then passed; the width RED was source wiring, not runtime proof. Integrated fractional tests at108/120/132/168 each failed expected12, found11, then focused/adjacent31/31 and coupled native3/3 passed. These historical dirty-source receipts are not current-head gates.
  • Hosted 0ca3e755 shard0 run41963723612/job127035842240 expected work width1024/found1125: the cap fixture inherited an already wider maximized setup. Test-only 073a5293 corrected its below-cap starting rectangle, preserving grow-only product behavior and exact cap assertions. Its first candidate incorrectly reduced the separate maximized fixture and failed SelectedOverflowTabMissing; that failure remains retained.
  • Hosted 073a5293 shard0 run41969020696/job127052696939 passed width1024 but failed the later positive-overflow assertion at injected168. Final count was not logged there; the56-row local reproduction above proved the real viewport starvation. It was not dismissed as another fixture defect or fixed by skipping1024.
  • The first responsive GREEN attempt had a misplaced nested test declaration compile error; a later action-route fixture lacked the two metric samples needed to expose its panel button. Both failed candidate logs remain distinct; neither is the behavioral RED or claimed runtime success.
  • Earlier 0ca3e755 normal integration failed first at the sidebar foreground guard with Copilot/Tauri foreground, then separately at sketch/custody foreground loss with ShellExperienceHost foreground. A third separately authorized unchanged attempt passed; both failures and sandboxes remain preserved. Temporary user activity was confirmed separately, without establishing exact activation cause.
  • At 69773c7f, the overnight integration terminal-integration-shard0-gate-20261105T060139208Z.log failed the sidebar foreground guard with Explorer/Progman foreground and SetForegroundWindow=False; SHA256 48D006DFD5A6B093FDDF6582941408C1C83E7E845496D5FEEED11970BF8A4526. Cleanup passed. Its wrapper end/exit receipt was unavailable after overnight session-handle loss; failure is established by the retained exception, not an invented exit code. This terminal outcome was not handed back until the morning status reconciliation; that reporting gap is disclosed. Today's explicitly released fresh-availability retry above passed, not an unchanged automatic retry or proof of product innocence.
  • Historical 073a5293 compiled preparation failedCS0009 against a malformed owned generated reference DLL; authorized dotnet build -c Release --no-restore -t:Rebuild -m:1 -nr:false, then exact dotnet build -c Release, passed before its first contract execution. Failure, held DLL and recovered whole-file hash remain retained; root cause is unproved. That recovered build is not confused with today's first-build-green69773 receipt.
  • Hosted80ec4396 real-packaging job127410777808/run42074419755 failed in Winghostty terminal-vt's nested Zig build while unpacking the z2d0.10.0 archive from deps.files.ghostty.org into a temporary directory: ReadFailed, before a versioned Windows artifact existed. Root cause is unproved; no product/provider repair or obsolete-job retry was justified or performed. Retained log terminal-pr959-ci-real-packaging-80ec.log, SHA256 DEDBD7B0F27470D34F8AFAE1A97BEAB106615DA60D9E480FA650A7644376D6FD. New-head packaging must earn its own passing result.

Evidence limits: no raw higher-DPI image/glyph/antialiasing equivalence, actual168/192-monitor proof, general native keyboard/focus parity, real visible maximization or W1-W6 acceptance is claimed. W3 final-unsplit close remains unexecuted here; no speculative close fix. No ledger promotion, broad capture campaign, provider pin change or packaging USER-PATH/scheduler mutation. macOS make test/make check were not run on this Windows host, including after the Tuist release-metadata and remote-folder changes; no local macOS validation is claimed. No new local gates were run merely for the merge SHAs. Required hosted checks at bf7505f remain separate: retained69773 local results, completed1ed5fc4e hosted results and failed/incomplete80ec4396 results are not new-head executions; path-skipped checks are not executions.

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 and others added 10 commits October 30, 2026 01:46
Restore the configured Windows shell detail, source-grounded header metrics, and monitor-bounded twelve-tab workspace sizing while preserving constrained overflow.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Colin Neilens <[email protected]>
TEST-ONLY checkpoint: fractional-DPI geometry and host visibility/work-area regression coverage is UNRUN. No production changes or runtime proof.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Colin Neilens <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Colin Neilens <[email protected]>
Sum individually rounded tab, gap, inset and control dimensions. Add separately scaled visible panels and adjust the native physical client frame before applying the monitor work-area cap.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Colin Neilens <[email protected]>
Reset only the forced-cap fixture to a demonstrably narrower physical window. Cover 1024 and 1920 work widths at all seven DPIs while preserving grow-only product behavior, maximized overflow and exact cap assertions.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Colin Neilens <[email protected]>
Keep requested panel visibility distinct from transient responsive hiding. Last opened panel wins when both cannot fit a full terminal tab and controls; widening restores only requested panels. Cover all 56 viewport/DPI/visibility cases, existing action routes, priority swaps and restoration without changing persisted terminal layout.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Colin Neilens <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Colin Neilens <[email protected]>
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