diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3901bf071..e8ed016e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ concurrency: jobs: checkpoint-validation: name: Validate engineering checkpoint - if: ${{ contains(fromJSON('["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1"]'), github.ref_name) }} + if: ${{ contains(fromJSON('["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1","v1.3.2"]'), github.ref_name) }} runs-on: windows-2022 timeout-minutes: 30 steps: @@ -35,7 +35,7 @@ jobs: validate: name: Validate exact release source - if: ${{ !contains(fromJSON('["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1"]'), github.ref_name) }} + if: ${{ !contains(fromJSON('["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1","v1.3.2"]'), github.ref_name) }} runs-on: windows-2022 timeout-minutes: 30 steps: @@ -82,7 +82,7 @@ jobs: test-x64: name: Build and test x64 Release - if: ${{ !contains(fromJSON('["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1"]'), github.ref_name) }} + if: ${{ !contains(fromJSON('["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1","v1.3.2"]'), github.ref_name) }} needs: validate runs-on: windows-2022 timeout-minutes: 240 @@ -102,7 +102,7 @@ jobs: release: name: Build, test, attest, and publish EXE and Portable ZIP - if: ${{ !contains(fromJSON('["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1"]'), github.ref_name) }} + if: ${{ !contains(fromJSON('["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1","v1.3.2"]'), github.ref_name) }} needs: - validate - test-x64 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b1a1a191..df2bdb7d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,51 @@ # Changelog +## 1.3.2 - 2026-08-12 + +Engineering checkpoint for the Pane Search roadmap, Phase 2: search UX and +the scrollbar search overview. Like the earlier checkpoints, this version +marks merged development work only: it is not a published release and +produces no downloadable artifacts; GitHub Latest and WinGet keep pointing +at the stable v1.2.0, and v1.3.0-beta3 remains the newest published +prerelease. + +### Changed + +- Restyled the pane-local search box to the winTerm compact overlay + language: a search glyph leads the input, the `current / total` match + counter sits beside it, and the case-sensitivity, regular-expression, + previous, next, and close controls follow at winTerm chrome density with + theme-aware system brushes, so the box matches dark, light, and + high-contrast themes. The counter keeps the existing localized status + semantics unchanged — `m/n`, "No results", the bounded `999+`/`?` + presentations, and the invalid-regex message — and continues to come from + the search core rather than a second count. In narrow panes the box now + degrades gracefully through width-driven layout states: secondary toggles + collapse first, then the status and the navigation arrows, keeping the + input and the close button usable; hidden toggles retain their state, and + the search itself stays fully functional at any pane width. All controls + keep their existing accessible names, tooltips, and screen-reader + announcements. + +### Added + +- The scrollbar now shows a search overview while search is open: one + right-aligned marker per buffer row containing a match, mapped across the + full scrollback range, with the row of the current match drawn at double + width so it stands out without extra colors or animation. The overview + reuses the existing scrollbar mark bitmap and the existing search results + — the counter stays occurrence-based while the overview deduplicates + same-row matches — and refreshes only through the existing throttled + scrollbar update path on typing, navigation, buffer changes, and close. +- Search overview markers no longer depend on the `showMarksOnScrollbar` + setting: they render whenever search is open, while generic shell and + command marks keep obeying `ShowMarks` (default off) exactly as before. + The two categories share the surface and coexist when both are enabled, + closing search removes only the search markers, and a scrollbar the user + configured to be hidden stays hidden — search then simply runs without + the overview. Split panes keep fully isolated search state, including + their overview markers. + ## 1.3.1 - 2026-08-11 Engineering checkpoint for the Pane Search roadmap, Phase 1: active-pane diff --git a/README.ja.md b/README.ja.md index ea18cf8b0..90f7769af 100644 --- a/README.ja.md +++ b/README.ja.md @@ -38,7 +38,7 @@ Microsoft、Windows、Windows Terminalのロゴも使用していません。 - `winTerm--setup-x64.exe` — 現在のユーザー、または全ユーザーへのインストール用; - `winTerm--portable-x64.zip` — 展開してそのまま実行する用。 -現在のソースバージョンは `1.3.1` で、 +現在のソースバージョンは `1.3.2` で、 最新の安定版リリースは `1.2.0` です。公開されている資産の一覧とチェックサムの全体は、 [最新の公式リリース](https://github.com/HelloThisWorld/winTerm/releases/latest) を参照してください。 @@ -111,8 +111,8 @@ PowerShell 7と、[ビルド手順(英語)](docs/build.md)に記載された .\scripts\winterm\build.ps1 -Configuration Release -Platform x64 -IncludeTests .\scripts\winterm\test.ps1 -Suite Relevant -Configuration Release -Platform x64 .\scripts\winterm\build-unpackaged.ps1 -Configuration Release -Platform x64 -.\scripts\winterm\build-installer.ps1 -Version 1.3.1 -Platform x64 -.\scripts\winterm\build-portable.ps1 -Version 1.3.1 -Platform x64 +.\scripts\winterm\build-installer.ps1 -Version 1.3.2 -Platform x64 +.\scripts\winterm\build-portable.ps1 -Version 1.3.2 -Platform x64 ``` アンパッケージ形式の生成処理では、統合されたリソースインデックスを作るための diff --git a/README.md b/README.md index 6164318b2..957671a0f 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ application downloads are: - `winTerm--setup-x64.exe` — current-user or all-users installation; - `winTerm--portable-x64.zip` — extract and run without installation. -The current source version is `1.3.1`; +The current source version is `1.3.2`; the latest stable release is `1.2.0`. See the [latest official Release](https://github.com/HelloThisWorld/winTerm/releases/latest) for the complete published asset list and checksums. @@ -106,8 +106,8 @@ Use PowerShell 7 and the Microsoft Terminal toolchain described in .\scripts\winterm\build.ps1 -Configuration Release -Platform x64 -IncludeTests .\scripts\winterm\test.ps1 -Suite Relevant -Configuration Release -Platform x64 .\scripts\winterm\build-unpackaged.ps1 -Configuration Release -Platform x64 -.\scripts\winterm\build-installer.ps1 -Version 1.3.1 -Platform x64 -.\scripts\winterm\build-portable.ps1 -Version 1.3.1 -Platform x64 +.\scripts\winterm\build-installer.ps1 -Version 1.3.2 -Platform x64 +.\scripts\winterm\build-portable.ps1 -Version 1.3.2 -Platform x64 ``` The unpackaged generator uses an unsigned MSIX only as an upstream build diff --git a/docs/current-progress.md b/docs/current-progress.md index b68f1ba9c..9175b3c63 100644 --- a/docs/current-progress.md +++ b/docs/current-progress.md @@ -1,47 +1,62 @@ # Current development progress -Last updated: 2026-08-11 +Last updated: 2026-08-12 ## Repository state -- Branch: `feature/v1.3.1-pane-search-phase1`, based on `main` at - `4753fba68` (Japanese README, pull request #43) +- Branch: `feature/v1.3.2-pane-search-phase2`, based on `main` at + `8015963ad` (Pane Search Phase 1 checkpoint, pull request #44) - Microsoft Terminal upstream revision: `1cea42d433253d95c4487a3037db48197b5e72f4` -- Application version: `1.3.1` -- Package/file version: `1.3.1.0` -- PowerShell module version: `1.3.1` with no prerelease suffix +- Application version: `1.3.2` +- Package/file version: `1.3.2.0` +- PowerShell module version: `1.3.2` with no prerelease suffix - Release channel: `stable` (engineering checkpoint; nothing is published) -- Checkpoint tag: `v1.3.1`, listed with the v1.2.x checkpoint tags in the +- Checkpoint tag: `v1.3.2`, listed with the earlier checkpoint tags in the release workflow so a pushed checkpoint tag runs quick validation only and can never produce release artifacts - Current public Latest: `v1.2.0`, the stable Visual Progress release - Newest published prerelease: `v1.3.0-beta3` on the beta channel - Supported target: Windows 11 x64 -`v1.3.1` is an engineering checkpoint, the first of the Pane Search roadmap +`v1.3.2` is an engineering checkpoint, the second of the Pane Search roadmap toward v1.4. Like the v1.2.1 through v1.2.4 Command Timeline checkpoints, it is a source/development version only: no GitHub Release, website slot, or WinGet update is produced, and `/releases/latest` keeps resolving to v1.2.0. ## Pane Search status (v1.4 roadmap) -Phase 1 — active-pane search — is complete in this checkpoint. `Ctrl+F` (and -the retained `Ctrl+Shift+F` alias) opens the existing Microsoft Terminal -search box inside the focused pane only. The implementation reuses the -mature upstream pipeline end to end — `SearchBoxControl`, +- Phase 1 — active-pane search — complete at `1.3.1`. +- Phase 2 — search UX and scrollbar overview — complete at `1.3.2`. +- Phase 3 — performance investigation and hardening — next, at `1.3.3`. +- Final integration — `1.4.0-alpha`, promoted to beta only after manual + user validation. + +Phase 1 made `Ctrl+F` (with the retained `Ctrl+Shift+F` alias) open the +existing Microsoft Terminal search box inside the focused pane only, +reusing the mature upstream pipeline end to end — `SearchBoxControl`, `ControlCore::Search`, `Search`/`TextBuffer::SearchText`, and renderer search highlights — with no second search engine, no index, and no buffer -duplication. Live search on every keystroke highlights all matches across -the pane's scrollback, Enter/Shift+Enter navigate with wrap-around, Esc -clears the state, search-box input never reaches the shell, and each -terminal control keeps its own search state so split panes stay isolated. - -Deferred to later phases: the winTerm-specific search UI redesign and -scrollbar overview markers (Phase 2), and performance work such as -debouncing or large-scrollback optimization (Phase 3). Final integration is -planned as `1.4.0-alpha`, with promotion to beta only after manual user -validation. +duplication. + +Phase 2 turned that functional search into the winTerm search experience. +The search box now follows the winTerm compact overlay language (search +glyph, input, `current / total` counter, case/regex toggles, previous/next, +close, at chrome density with theme-aware system brushes) and degrades +gracefully in narrow panes through width-driven layout states that always +keep the input and close button usable. The scrollbar shows a search +overview while search is open: one right-aligned marker per matching buffer +row across the full scrollback, deduplicating same-row occurrences, with +the current match's row drawn at double width. Search overview markers are +independent of the `ShowMarks` setting (which keeps gating generic shell +marks, default off), coexist with generic marks when both are enabled, +disappear on close, respect a deliberately hidden scrollbar, and refresh +only through the existing throttled scrollbar update path — no timers, no +polling. Split panes keep fully isolated search state, including their +overview markers. + +Deferred to Phase 3: performance work such as debouncing, large-scrollback +optimization, and search-related edge-case hardening. ## Command Timeline status @@ -156,12 +171,10 @@ through pull request #32: ## Next steps -1. Pane Search Phase 2 (`1.3.2`): winTerm-specific search UI and scrollbar - overview markers. -2. Pane Search Phase 3 (`1.3.3`): performance investigation and hardening. -3. Final integration checkpoint `1.4.0-alpha`, then manual user validation +1. Pane Search Phase 3 (`1.3.3`): performance investigation and hardening. +2. Final integration checkpoint `1.4.0-alpha`, then manual user validation before any beta promotion. -4. Collect Command Timeline beta feedback; promote a stable `v1.3.0` only +3. Collect Command Timeline beta feedback; promote a stable `v1.3.0` only after beta testing, which is the point at which Latest, WinGet, and the website stable slot move. diff --git a/docs/user/keyboard-shortcuts.md b/docs/user/keyboard-shortcuts.md index 88cdc9d60..2ddf62ecb 100644 --- a/docs/user/keyboard-shortcuts.md +++ b/docs/user/keyboard-shortcuts.md @@ -35,11 +35,18 @@ Pane movement commands are not available in winTerm 1.1. A legacy custom Search always targets the active pane. The search box opens as an overlay inside that pane without resizing terminal content, and the input field is focused immediately. Typing searches the pane's buffer and scrollback as you -type and highlights every match at once. `Enter` moves to the next match and +type and highlights every match at once, with a `current / total` counter +beside the input. While search is open, the scrollbar shows an overview: +one marker per buffer row containing a match, with the current match's row +drawn wider. The overview appears even when the generic +`showMarksOnScrollbar` setting is off, and it disappears when search +closes; if the scrollbar itself is hidden by configuration, search simply +runs without the overview. `Enter` moves to the next match and `Shift+Enter` to the previous one, wrapping around at either end. `Esc` or the close button dismisses the search box, clears the highlights, and returns focus to the terminal. Text typed into the search box never reaches -the shell. +the shell. In narrow panes the box compacts itself, keeping the input and +close button usable. Both chords are ordinary configurable keybindings. A terminal application that needs a literal `Ctrl+F` keystroke can reclaim it by unbinding the diff --git a/scripts/winterm/package-shell-assets.ps1 b/scripts/winterm/package-shell-assets.ps1 index 86e527a99..e4b336106 100644 --- a/scripts/winterm/package-shell-assets.ps1 +++ b/scripts/winterm/package-shell-assets.ps1 @@ -32,9 +32,9 @@ foreach ($relativePath in $sourceAssets) } $version = Get-Content -LiteralPath (Join-Path $repositoryRoot 'shell\shared\version.json') -Raw | ConvertFrom-Json -if ($version.moduleVersion -ne '1.3.1' -or +if ($version.moduleVersion -ne '1.3.2' -or $version.modulePrerelease -ne '' -or - $version.applicationVersion -ne '1.3.1' -or + $version.applicationVersion -ne '1.3.2' -or $version.protocolVersion -ne 1) { throw 'The winTerm Shell asset version metadata is invalid.' diff --git a/scripts/winterm/test-release-workflow.ps1 b/scripts/winterm/test-release-workflow.ps1 index 951d59a05..192e837b7 100644 --- a/scripts/winterm/test-release-workflow.ps1 +++ b/scripts/winterm/test-release-workflow.ps1 @@ -23,7 +23,7 @@ try "- 'v*'", 'checkpoint-validation:', 'Validate engineering checkpoint', - '["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1"]', + '["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1","v1.3.2"]', 'verify-version.ps1 -RequireTag', 'test.ps1 -Suite Smoke', 'contents: write', @@ -63,7 +63,7 @@ try } } - $checkpointGuard = 'contains(fromJSON(''["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1"]''), github.ref_name)' + $checkpointGuard = 'contains(fromJSON(''["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1","v1.3.2"]''), github.ref_name)' if ([regex]::Matches($workflow, [regex]::Escape($checkpointGuard)).Count -ne 4) { throw 'Release workflow must guard the checkpoint validation and all three full release jobs.' diff --git a/scripts/winterm/test-visual-progress.ps1 b/scripts/winterm/test-visual-progress.ps1 index a2cbdbac8..830d402fa 100644 --- a/scripts/winterm/test-visual-progress.ps1 +++ b/scripts/winterm/test-visual-progress.ps1 @@ -1431,12 +1431,12 @@ try $version = $source.VersionMetadata | ConvertFrom-Json $expectedVersionValues = [ordered]@{ - applicationVersion = '1.3.1' - packageVersion = '1.3.1.0' - moduleVersion = '1.3.1' + applicationVersion = '1.3.2' + packageVersion = '1.3.2.0' + moduleVersion = '1.3.2' modulePrerelease = '' channel = 'stable' - tag = 'v1.3.1' + tag = 'v1.3.2' workspaceSchemaVersion = 2 dockingModelVersion = 1 shellProtocolVersion = 1 @@ -1451,39 +1451,39 @@ try } } $shellVersion = $source.ShellVersion | ConvertFrom-Json - if ($shellVersion.applicationVersion -ne '1.3.1' -or $shellVersion.moduleVersion -ne '1.3.1' -or $shellVersion.protocolVersion -ne 1) + if ($shellVersion.applicationVersion -ne '1.3.2' -or $shellVersion.moduleVersion -ne '1.3.2' -or $shellVersion.protocolVersion -ne 1) { - throw 'Shell version metadata does not match winTerm version 1.3.1 with protocol version 1.' + throw 'Shell version metadata does not match winTerm version 1.3.2 with protocol version 1.' } foreach ($surface in @( - @{ Content = $source.ReleaseMetadata; Value = 'ApplicationVersion{ L"1.3.1" }'; Description = 'About release metadata' }, - @{ Content = $source.PackageManifest; Value = 'Version="1.3.1.0"'; Description = 'MSIX package manifest' }, - @{ Content = $source.HostResource; Value = 'FILEVERSION 1,3,1,0'; Description = 'Terminal host file version' }, - @{ Content = $source.HostResource; Value = '"ProductVersion", "1.3.1\0"'; Description = 'Terminal host display version' }, - @{ Content = $source.ShimResource; Value = 'FILEVERSION 1,3,1,0'; Description = 'Shim file version' }, - @{ Content = $source.ShimResource; Value = '"ProductVersion", "1.3.1\0"'; Description = 'Shim display version' }, + @{ Content = $source.ReleaseMetadata; Value = 'ApplicationVersion{ L"1.3.2" }'; Description = 'About release metadata' }, + @{ Content = $source.PackageManifest; Value = 'Version="1.3.2.0"'; Description = 'MSIX package manifest' }, + @{ Content = $source.HostResource; Value = 'FILEVERSION 1,3,2,0'; Description = 'Terminal host file version' }, + @{ Content = $source.HostResource; Value = '"ProductVersion", "1.3.2\0"'; Description = 'Terminal host display version' }, + @{ Content = $source.ShimResource; Value = 'FILEVERSION 1,3,2,0'; Description = 'Shim file version' }, + @{ Content = $source.ShimResource; Value = '"ProductVersion", "1.3.2\0"'; Description = 'Shim display version' }, @{ Content = $source.CustomProps; Value = '1'; Description = 'Executable major version' }, @{ Content = $source.CustomProps; Value = '3'; Description = 'Executable minor version' }, - @{ Content = $source.ShellModuleManifest; Value = "ModuleVersion = '1.3.1'"; Description = 'PowerShell module manifest' }, - @{ Content = $source.ShellModule; Value = "`$script:WinTermModuleVersion = '1.3.1'"; Description = 'PowerShell module runtime' }, + @{ Content = $source.ShellModuleManifest; Value = "ModuleVersion = '1.3.2'"; Description = 'PowerShell module manifest' }, + @{ Content = $source.ShellModule; Value = "`$script:WinTermModuleVersion = '1.3.2'"; Description = 'PowerShell module runtime' }, @{ Content = $source.PackageShellAssets; Value = "'shell\shared\version.json'"; Description = 'Canonical shell version metadata packaging' }, - @{ Content = $source.WorkspaceSerializer; Value = '"1.3.1"'; Description = 'Workspace application-version fallback' } + @{ Content = $source.WorkspaceSerializer; Value = '"1.3.2"'; Description = 'Workspace application-version fallback' } )) { Assert-Contains $surface.Content $surface.Value $surface.Description } foreach ($required in @( - "applicationVersion -eq '1.3.1'", - "packageVersion -eq '1.3.1.0'", - "moduleVersion -eq '1.3.1'", - "tag -eq 'v1.3.1'", + "applicationVersion -eq '1.3.2'", + "packageVersion -eq '1.3.2.0'", + "moduleVersion -eq '1.3.2'", + "tag -eq 'v1.3.2'", "Workspace Schema version remains 2", "Docking Model version remains 1", "Shell Protocol version remains 1", "Theme Schema remains at version 1" )) { - Assert-Contains $source.VerifyVersion $required 'Authoritative v1.3.1 version validation surface' + Assert-Contains $source.VerifyVersion $required 'Authoritative v1.3.2 version validation surface' } $testBinary = Join-Path $root "bin\$Platform\$Configuration\UnitTests_SettingsModel\SettingsModel.Unit.Tests.dll" diff --git a/scripts/winterm/test.ps1 b/scripts/winterm/test.ps1 index d431df885..8e9e96f3c 100644 --- a/scripts/winterm/test.ps1 +++ b/scripts/winterm/test.ps1 @@ -292,7 +292,7 @@ function Test-ShellExperienceFoundations } $manifest = Import-PowerShellDataFile -LiteralPath $moduleManifest - if ($manifest.ModuleVersion -ne '1.3.1' -or + if ($manifest.ModuleVersion -ne '1.3.2' -or $manifest.PrivateData.PSData.Prerelease -ne '' -or $manifest.PowerShellVersion -ne '5.1') { diff --git a/scripts/winterm/verify-branding.ps1 b/scripts/winterm/verify-branding.ps1 index 898c53164..6c1cb17d4 100644 --- a/scripts/winterm/verify-branding.ps1 +++ b/scripts/winterm/verify-branding.ps1 @@ -126,7 +126,7 @@ function Test-Manifest Test-Requirement -Condition ($null -ne $identity -and $identity.Name -eq 'HelloThisWorld.winTerm') -Message "$Path uses package identity HelloThisWorld.winTerm" Test-Requirement -Condition ($null -ne $identity -and $identity.Name -notmatch '^Microsoft\.') -Message "$Path does not use a Microsoft package name" Test-Requirement -Condition ($null -ne $identity -and $identity.Publisher -ceq $ExpectedPublisher) -Message "$Path uses the expected non-Microsoft publisher" - Test-Requirement -Condition ($null -ne $identity -and $identity.Version -eq '1.3.1.0') -Message "$Path uses package version 1.3.1.0" + Test-Requirement -Condition ($null -ne $identity -and $identity.Version -eq '1.3.2.0') -Message "$Path uses package version 1.3.2.0" Test-Requirement -Condition ($null -ne $properties -and $properties.DisplayName -eq 'winTerm') -Message "$Path package display name is winTerm" Test-Requirement -Condition ($null -ne $application -and $application.Id -eq 'winTerm') -Message "$Path application ID is winTerm" Test-Requirement -Condition ($null -ne $visualElements -and $visualElements.DisplayName -eq 'winTerm') -Message "$Path application display name is winTerm" diff --git a/scripts/winterm/verify-version.ps1 b/scripts/winterm/verify-version.ps1 index 17d2c5d28..ec1fa3fb0 100644 --- a/scripts/winterm/verify-version.ps1 +++ b/scripts/winterm/verify-version.ps1 @@ -49,9 +49,9 @@ try $versionPath = Join-Path $repositoryRoot 'src\winterm\Branding\version.json' $version = Get-Content -LiteralPath $versionPath -Raw | ConvertFrom-Json - Assert-Condition ($version.applicationVersion -eq '1.3.1') 'Application version is 1.3.1' - Assert-Condition ($version.packageVersion -eq '1.3.1.0') 'Package version is 1.3.1.0' - Assert-Condition ($version.moduleVersion -eq '1.3.1') 'PowerShell module version is 1.3.1' + Assert-Condition ($version.applicationVersion -eq '1.3.2') 'Application version is 1.3.2' + Assert-Condition ($version.packageVersion -eq '1.3.2.0') 'Package version is 1.3.2.0' + Assert-Condition ($version.moduleVersion -eq '1.3.2') 'PowerShell module version is 1.3.2' Assert-Condition ($version.modulePrerelease -eq '') 'PowerShell module has no prerelease suffix' # The release workflow treats any channel other than 'stable' as a @@ -66,7 +66,7 @@ try Assert-Condition ($version.packageVersion -match '^\d+\.\d+\.\d+\.\d+$') 'Package version stays a four-part numeric version' Assert-Condition ($version.moduleVersion -match '^\d+\.\d+\.\d+$') 'PowerShell module version stays numeric' - Assert-Condition ($version.tag -eq 'v1.3.1') 'Engineering checkpoint tag is v1.3.1' + Assert-Condition ($version.tag -eq 'v1.3.2') 'Engineering checkpoint tag is v1.3.2' Assert-Condition ($version.workspaceSchemaVersion -eq 2) 'Workspace Schema version remains 2' Assert-Condition ($version.dockingModelVersion -eq 1) 'Docking Model version remains 1' Assert-Condition ($version.shellProtocolVersion -eq 1) 'Shell Protocol version remains 1' @@ -90,7 +90,7 @@ try $moduleManifest = Import-PowerShellDataFile -LiteralPath (Join-Path $repositoryRoot 'shell\powershell\winTerm.Shell\winTerm.Shell.psd1') Assert-Condition ($moduleManifest.ModuleVersion.ToString() -eq $version.moduleVersion) 'PowerShell manifest version matches release metadata' Assert-Condition ($moduleManifest.PrivateData.PSData.Prerelease -eq $version.modulePrerelease) 'PowerShell manifest prerelease matches release metadata' - Assert-Condition ((Get-Text 'shell\powershell\winTerm.Shell\winTerm.Shell.psm1').Contains("`$script:WinTermModuleVersion = '1.3.1'")) 'PowerShell module runtime version matches release metadata' + Assert-Condition ((Get-Text 'shell\powershell\winTerm.Shell\winTerm.Shell.psm1').Contains("`$script:WinTermModuleVersion = '1.3.2'")) 'PowerShell module runtime version matches release metadata' $shellVersion = Get-Text 'shell\shared\version.json' | ConvertFrom-Json Assert-Condition ($shellVersion.applicationVersion -eq $version.applicationVersion) 'Shell asset application version matches release metadata' @@ -98,7 +98,7 @@ try Assert-Condition ($shellVersion.protocolVersion -eq $version.shellProtocolVersion) 'Shell asset protocol version matches release metadata' $releaseHeader = Get-Text 'src\winterm\Branding\ReleaseMetadata.h' - Assert-Condition ($releaseHeader.Contains('ApplicationVersion{ L"1.3.1" }')) 'About metadata application version is 1.3.1' + Assert-Condition ($releaseHeader.Contains('ApplicationVersion{ L"1.3.2" }')) 'About metadata application version is 1.3.2' Assert-Condition ($releaseHeader.Contains('ReleaseChannel{ L"Stable" }')) 'About metadata channel is Stable' Assert-Condition ($releaseHeader.Contains($version.microsoftTerminalUpstreamRevision)) 'About metadata contains the Microsoft Terminal upstream revision' Assert-Condition ($releaseHeader.Contains('WorkspaceSchemaVersion{ 2 }')) 'About metadata contains Workspace Schema version 2' @@ -129,14 +129,14 @@ try Assert-Condition ((Get-Text 'src\winterm\Workspaces\Model\WorkspaceDescriptor.h').Contains('WorkspaceSchemaVersion{ 2 }')) 'Workspace model remains at Schema version 2' Assert-Condition ((Get-Text 'src\winterm\Workspaces\Model\WorkspaceDescriptor.h').Contains('DockingModelVersion{ 1 }')) 'Workspace model remains at Docking version 1' - Assert-Condition ((Get-Text 'src\winterm\Workspaces\Model\WorkspaceDescriptor.h').Contains('applicationVersion{ "1.3.1" }')) 'Workspace model application-version fallback is 1.3.1' + Assert-Condition ((Get-Text 'src\winterm\Workspaces\Model\WorkspaceDescriptor.h').Contains('applicationVersion{ "1.3.2" }')) 'Workspace model application-version fallback is 1.3.2' Assert-Condition ((Get-Text 'src\winterm\Shell\Protocol\ShellIntegrationProtocol.h').Contains('ShellProtocolVersion{ 1 }')) 'Shell protocol remains at version 1' Assert-Condition ((Get-Text 'src\winterm\Appearance\Themes\ThemeDescriptor.h').Contains('CurrentThemeSchemaVersion{ 1 }')) 'Theme Schema remains at version 1' - Assert-Condition ((Get-Text 'src\winterm\Workspaces\Persistence\WorkspaceSerializer.cpp').Contains('"1.3.1"')) 'Workspace serializer application-version fallback is 1.3.1' + Assert-Condition ((Get-Text 'src\winterm\Workspaces\Persistence\WorkspaceSerializer.cpp').Contains('"1.3.2"')) 'Workspace serializer application-version fallback is 1.3.2' $releaseWorkflow = Get-Text '.github\workflows\release.yml' Assert-Condition ($releaseWorkflow.Contains("- 'v*'")) 'Release workflow accepts version tags through a generic guarded trigger' - Assert-Condition ($releaseWorkflow.Contains('["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1"]')) 'Release workflow identifies engineering checkpoint tags' + Assert-Condition ($releaseWorkflow.Contains('["v1.2.1","v1.2.2","v1.2.3","v1.2.4","v1.3.1","v1.3.2"]')) 'Release workflow identifies engineering checkpoint tags' Assert-Condition ($releaseWorkflow.Contains('checkpoint-validation:')) 'Release workflow retains quick validation for checkpoint tags' Assert-Condition ($releaseWorkflow.Contains("`$expectedTag = `"v`$(`$metadata.applicationVersion)`"")) 'Release workflow derives the expected tag from version.json' Assert-Condition ($releaseWorkflow.Contains("`$metadata.tag -cne `$expectedTag")) 'Release workflow rejects a version metadata tag mismatch' @@ -187,7 +187,7 @@ try if ($RequireTag) { $tag = (& git describe --tags --exact-match 2>$null).Trim() - Assert-Condition ($LASTEXITCODE -eq 0 -and $tag -eq $version.tag) 'Checked-out commit is exactly tagged v1.3.1' + Assert-Condition ($LASTEXITCODE -eq 0 -and $tag -eq $version.tag) 'Checked-out commit is exactly tagged v1.3.2' } Write-Host 'winTerm version consistency verification passed.' -ForegroundColor Green diff --git a/shell/powershell/winTerm.Shell/winTerm.Shell.psd1 b/shell/powershell/winTerm.Shell/winTerm.Shell.psd1 index 707764b87..058eb6016 100644 --- a/shell/powershell/winTerm.Shell/winTerm.Shell.psd1 +++ b/shell/powershell/winTerm.Shell/winTerm.Shell.psd1 @@ -1,6 +1,6 @@ @{ RootModule = 'winTerm.Shell.psm1' - ModuleVersion = '1.3.1' + ModuleVersion = '1.3.2' GUID = 'f65cd8f4-5d25-4a2a-a0d4-58df1ab3dc5a' Author = 'winTerm contributors' CompanyName = 'winTerm' diff --git a/shell/powershell/winTerm.Shell/winTerm.Shell.psm1 b/shell/powershell/winTerm.Shell/winTerm.Shell.psm1 index c6bc71434..4c3203be6 100644 --- a/shell/powershell/winTerm.Shell/winTerm.Shell.psm1 +++ b/shell/powershell/winTerm.Shell/winTerm.Shell.psm1 @@ -3,7 +3,7 @@ Set-StrictMode -Version Latest -$script:WinTermModuleVersion = '1.3.1' +$script:WinTermModuleVersion = '1.3.2' $script:WinTermProtocolVersion = 1 $script:WinTermIntegrationEnabled = $false $script:WinTermPromptWrapped = $false diff --git a/shell/shared/version.json b/shell/shared/version.json index beff553c0..ce69cc10e 100644 --- a/shell/shared/version.json +++ b/shell/shared/version.json @@ -1,6 +1,6 @@ { - "applicationVersion": "1.3.1", - "moduleVersion": "1.3.1", + "applicationVersion": "1.3.2", + "moduleVersion": "1.3.2", "modulePrerelease": "", "protocolVersion": 1 } diff --git a/src/cascadia/CascadiaPackage/Package-winTerm.appxmanifest b/src/cascadia/CascadiaPackage/Package-winTerm.appxmanifest index c2972cd7a..dbb70f0e6 100644 --- a/src/cascadia/CascadiaPackage/Package-winTerm.appxmanifest +++ b/src/cascadia/CascadiaPackage/Package-winTerm.appxmanifest @@ -18,7 +18,7 @@ + Version="1.3.2.0" /> winTerm diff --git a/src/cascadia/TerminalControl/ControlCore.cpp b/src/cascadia/TerminalControl/ControlCore.cpp index 9f23f9338..43588d720 100644 --- a/src/cascadia/TerminalControl/ControlCore.cpp +++ b/src/cascadia/TerminalControl/ControlCore.cpp @@ -2268,6 +2268,21 @@ namespace winrt::Microsoft::Terminal::Control::implementation return _searcher.Results(); } + // Returns the buffer row of the currently focused search match, or -1 + // when there is no current match. The searcher stays the source of truth + // for the focused index; this only projects it onto a row for the + // scrollbar overview. + til::CoordType ControlCore::SearchCurrentMatchRow() const noexcept + { + const auto index = _searcher.CurrentMatch(); + const auto& results = _searcher.Results(); + if (index >= 0 && gsl::narrow_cast(index) < results.size()) + { + return til::at(results, gsl::narrow_cast(index)).start.y; + } + return -1; + } + void ControlCore::ClearSearch() { const auto lock = _terminal->LockForWriting(); diff --git a/src/cascadia/TerminalControl/ControlCore.h b/src/cascadia/TerminalControl/ControlCore.h index e24c5e2ee..0ca53887a 100644 --- a/src/cascadia/TerminalControl/ControlCore.h +++ b/src/cascadia/TerminalControl/ControlCore.h @@ -255,6 +255,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation SearchResults Search(const SearchRequest& request); const std::vector& SearchResultRows() const noexcept; + til::CoordType SearchCurrentMatchRow() const noexcept; void ClearSearch(); void LeftClickOnTerminal(const til::point terminalPosition, diff --git a/src/cascadia/TerminalControl/SearchBoxControl.cpp b/src/cascadia/TerminalControl/SearchBoxControl.cpp index d37a94358..5d0fdb9f2 100644 --- a/src/cascadia/TerminalControl/SearchBoxControl.cpp +++ b/src/cascadia/TerminalControl/SearchBoxControl.cpp @@ -238,6 +238,34 @@ namespace winrt::Microsoft::Terminal::Control::implementation bool SearchBoxControl::RegularExpression() { return RegexButton().IsChecked().GetBoolean(); + } + + // Method Description: + // - Adapts the layout to the width the hosting pane can offer. Narrow + // panes drop secondary controls so the input and the close button stay + // usable; see SearchUxHelpers.h for the thresholds. + // Arguments: + // - availableWidth: the hosting pane's width in DIPs + void SearchBoxControl::SetAvailableWidth(const double availableWidth) + { + _ApplyLayoutState(winTerm::Control::SearchUx::SearchBoxLayoutStateForWidth(availableWidth)); + } + + void SearchBoxControl::_ApplyLayoutState(const winTerm::Control::SearchUx::SearchBoxLayoutState state) + { + if (state == _layoutState) + { + return; + } + _layoutState = state; + VisualStateManager::GoToState(*this, winrt::hstring{ winTerm::Control::SearchUx::SearchBoxLayoutStateName(state) }, false); + + // The layout states change the control's desired size, so the clip + // rect and the slide-animation start point must follow. + if (_initialized) + { + _UpdateSizeDependents(); + } } // Method Description: diff --git a/src/cascadia/TerminalControl/SearchBoxControl.h b/src/cascadia/TerminalControl/SearchBoxControl.h index 57fd319de..47de9fbb8 100644 --- a/src/cascadia/TerminalControl/SearchBoxControl.h +++ b/src/cascadia/TerminalControl/SearchBoxControl.h @@ -16,6 +16,7 @@ Author(s): #pragma once #include "SearchBoxControl.g.h" +#include "SearchUxHelpers.h" namespace winrt::Microsoft::Terminal::Control::implementation { @@ -40,6 +41,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation bool GoForward(); bool CaseSensitive(); bool RegularExpression(); + void SetAvailableWidth(double availableWidth); void SetFocusOnTextbox(); void PopulateTextbox(const winrt::hstring& text); bool ContainsFocus(); @@ -69,8 +71,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation winrt::Windows::UI::Xaml::FrameworkElement::Loaded_revoker _initialLoadedRevoker; bool _initialized = false; std::function _initializedCallback; + winTerm::Control::SearchUx::SearchBoxLayoutState _layoutState = winTerm::Control::SearchUx::SearchBoxLayoutState::Normal; void _Initialize(); + void _ApplyLayoutState(winTerm::Control::SearchUx::SearchBoxLayoutState state); void _UpdateSizeDependents(); void _ContentClipRect(const winrt::Windows::Foundation::Rect& rect); void _OpenAnimationStartPoint(double y); diff --git a/src/cascadia/TerminalControl/SearchBoxControl.xaml b/src/cascadia/TerminalControl/SearchBoxControl.xaml index 9bbb3541b..dc55dde6e 100644 --- a/src/cascadia/TerminalControl/SearchBoxControl.xaml +++ b/src/cascadia/TerminalControl/SearchBoxControl.xaml @@ -175,25 +175,54 @@ - - + + + - + + + + + + + + + + + + + + FontSize="12" + Foreground="{ThemeResource SystemControlForegroundBaseMediumHighBrush}" + TextAlignment="Center" /> + + + + + + + + @@ -237,33 +295,12 @@ Style="{ThemeResource FontIconStyle}" /> - - - - - - - -