Skip to content

Commit 7407472

Browse files
fix: center page navigation and lock sidebar width
1 parent 4dd5209 commit 7407472

28 files changed

Lines changed: 177 additions & 378 deletions

.ai/OpenNotes.Tests/EditorNavigationSourceTests.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# OpenNotes.Tests/EditorNavigationSourceTests.cs
22
> Last updated: 2026-08-24 | Protection: STANDARD
33
4+
> 2026-08-25 RED/GREEN: new contracts require a fixed 184-DIP expanded sidebar, 38-DIP collapse/auto-collapse, no resize surface/provider/handlers, and a centered `PageJumpGroup` toolbar overlay with a reserved action-row footprint. The focused slice failed against the pre-change implementation; the live STA layout now also proves the page-jump center matches the floating toolbar center within one DIP.
5+
46
## Purpose
57

68
Wave4 source and WPF contract tests for the compact page jump and custom document navigation rail.

.ai/OpenNotes.Tests/EditorToolbarVisualSourceTests.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# OpenNotes.Tests/EditorToolbarVisualSourceTests.cs
22
> Last updated: 2026-08-23 (Wave 3 P2 theme-token TDD RED/GREEN source contract) | Protection: STANDARD
33
4+
> 2026-08-25 RED/GREEN: toolbar polish rejects the obsolete resize style/metadata and requires a fixed sidebar plus centered page-jump overlay markers while retaining localized tooltips and existing icon contracts. The focused 23-test class passes.
5+
46
## Purpose
57

68
Source-level contracts for the Wave 3 editor toolbar affordance repair. These tests protect the visible toolbar boundary without requiring a WPF desktop session: obsolete Fit/preset/Ink Analysis entry points must be absent, laser and highlighter visuals must be vector-backed, shape/highlighter popup choices must expose real previews, and toolbar metadata must remain localizable and stable.

.ai/OpenNotes.Tests/ProductInfoTests.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Verify the visible OpenNotes brand while protecting the Caelum data-directory an
77

88
## Open Threads / Resume Context
99

10+
- **Status:** GREEN (5.2.2 navigation layout patch)
11+
- The visible-version assertion expects `5.2.2`; all compatibility assertions remain unchanged.
1012
- **Status:** complete (5.2.1 hotfix release)
1113
- Advance only the visible-version contract to `5.2.1`; keep every compatibility assertion.
1214
- **Status:** complete (5.2.0 release)
@@ -24,6 +26,7 @@ Verify the visible OpenNotes brand while protecting the Caelum data-directory an
2426

2527
| Date | Change | Author |
2628
|---|---|---|
29+
| 2026-08-25 | Advanced the RED visible-version assertion to 5.2.2 without changing compatibility contracts. | Codex |
2730
| 2026-08-25 | Updated the visible-version assertion to 5.2.1 for the large-PDF crash hotfix. | Codex |
2831
| 2026-08-24 | Updated the visible-version assertion to 5.2.0 without changing compatibility contracts. | Codex |
2932
| 2026-08-24 | Updated the visible-version assertion to 5.1.0 without changing compatibility contracts. | Codex |

.ai/OpenNotes.csproj.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# OpenNotes.csproj
22
> Last updated: 2026-08-24(5.0.0 release metadata) | Protection: STANDARD
33
4+
> 2026-08-25 GREEN: package/assembly/file/informational metadata are 5.2.2/5.2.2.0 for the fixed-sidebar and centered-page-navigation patch; `RootNamespace=Caelum` and all storage/package compatibility identities are preserved.
5+
46
## Purpose
57

68
The build definition for the OpenNotes desktop application. The file name, assembly name, solution display name, release workflow and installer executable are OpenNotes; the `Caelum` root namespace remains only to preserve compiled XAML/type compatibility.

.ai/PROJECT_CONTEXT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ WPF (.NET 8) PDF 笔记应用,正式产品和工作区名称为 **OpenNotes**
4747
5. **单窗口 Frame 标签架构**(MainWindow `List<AppTab> _tabs` + Frame.Navigate)。
4848

4949
## Current Work
50+
- 2026-08-25: OpenNotes 5.2.2 navigation-layout patch is GREEN. The expanded document sidebar is fixed at 184 DIPs with no resize surface/provider and retains 38-DIP explicit/narrow collapse; the unchanged one-based page navigator is a centered toolbar overlay with a reserved action-row footprint. Runtime STA geometry is centered within one DIP. Release tests pass 286/286, build has 0 errors, i18n passes 293/480/0, and all version surfaces match 5.2.2/5.2.2.0. The user's 50.04-MiB, 1,353-page PDF opened in the 5.2.2 Release executable, committed page 2, and stayed alive about three minutes; the generic smoke stopped only on its generated-fixture outline-ID assumption and cleaned isolated data. Next: commit/push/tag, published installer upgrade, and launch.
5051
- 2026-08-25: OpenNotes 5.2.1 large-PDF crash hotfix is ready for release. Windows event 1026 tied the user's 5.2.0 crash to `DocumentOperationSession.Capture` reading a CTS disposed by `Cancel` during the load/autosave transition. RED reproduced the exact `ObjectDisposedException`; GREEN keeps the inactive CTS cancelled until `Begin`/`Dispose` retires it. Release tests pass 286/286, Release build has 0 errors, i18n passes 294 entries/482 calls/0 hard-coded strings, and the user's 50.04 MiB/1,353-page textbook opened and survived a 90-second hold across the 60-second autosave tick without a .NET crash. The large document's private memory settled near 1.42 GiB; this hotfix fixes the evidenced termination without changing PDF/render/save architecture. Next: commit/push main, tag/push `v5.2.1`, and verify both GitHub Release assets.
5152
- 2026-08-24: OpenNotes 5.2.0 source is ready for release at the user's request. The complete current toolbar/sidebar/shape and page-template worktree is aligned across project/ProductInfo/AppX/installer/test metadata while preserving legacy Caelum/WindowsNotesApp identities. Fresh Release build passes with 0 errors, Release tests pass 277/277, i18n passes 294 entries/484 calls/0 hard-coded strings, version surfaces match 5.2.0/5.2.0.0, and diff check exits 0 with known line-ending notices. Next: commit and push `main`, push annotated `v5.2.0`, then verify the tag-driven GitHub Release and both assets.
5253
- 2026-08-24: Screenshot-driven editor toolbar/shape polish is complete. The sidebar right edge and transparent 32-DIP resize target render no vertical line; top-bar actions use one 18-DIP owner-foreground Lucide treatment with separate pen/highlighter color bars; a rounded themed WPF ToolTip template displays the existing localized EN/ZH/FR names; and the shape popup is a checkmark-free 3×3 catalog with Triangle, Diamond, Parallelogram, Pentagon and Hexagon added to the ordinary ink/undo/save pipeline. RED/GREEN focused coverage passes 29/29, combined editor coverage 58/58, the full suite 277/277, Debug build 0 errors (2 existing NU1701 warnings), i18n 294 entries/484 calls/0 hard-coded strings, diff check exits 0, and offscreen WPF previews confirm the final chrome/popup layout.

.ai/Package.appxmanifest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Declares the compatible Windows package identity and release version.
1313

1414
## Current Status
1515

16+
- Version is `5.2.2.0`; identity and publisher compatibility values stay unchanged.
1617
- Version is `5.2.1.0`; identity and publisher compatibility values stay unchanged.
1718
- Version is `5.2.0.0`; identity and publisher compatibility values are unchanged.
1819
- Version is `5.1.2.0`; identity and publisher compatibility values are unchanged.

.ai/Pages/EditorPage.Utilities.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Pages/EditorPage.Utilities.cs(合并说明:含 EditorPage.Selectable.cs)
22

3+
> 2026-08-25 GREEN: removed the retired sidebar-resize tooltip/UIA metadata calls; collapse/expand, toolbar-overflow, bookmark, and page-jump metadata remain unchanged.
4+
35
> V5.1.2 localized bookmark content is rebuilt from checked state with a Lucide bookmark instead of text stars.
46
> The obsolete Content-property localization observer was removed because rebuilding the visual from that observer recursively re-entered itself; language refresh already calls the localized rebuild directly.
57
> Last updated: 2026-08-24(Wave6 transient/Sticky localization refresh plus Wave4 sidebar/page-jump UIA evidence green; foreground/device visual boundary remains external) | Protection: STANDARD

.ai/Pages/EditorPage.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
> V5.1.2 dynamic page controls, bookmarks and notifications use Lucide vectors; PenOnly remains PenLine.
44
5+
## Fixed sidebar / centered page navigation (2026-08-25) — GREEN
6+
7+
- Remove the sidebar resize thumb, range automation peer, resize handlers and resize-only width state. Expanded width is fixed at 184 DIPs; explicit and narrow-window collapse remains 38 DIPs and expands back to 184.
8+
- Keep the toolbar action row horizontally scrollable, reserve a transparent 150-DIP slot after the ruler action, and host the unchanged `PageJumpGroup` in a centered overlay sibling so action order no longer shifts the page number.
9+
- Preserve page-jump one-based editing, previous/next commands, page count, localization, and existing AutomationIds.
10+
- STA layout evidence proves the page navigator center matches the floating toolbar center within one DIP. The user's 50.04-MiB, 1,353-page PDF opened in the 5.2.2 Release executable, accepted a page-2 jump, and remained alive for about three minutes; the generic smoke then stopped only because the textbook's real outline does not expose its synthetic fallback `Outline.Page.2` fixture ID.
11+
512
## Wave6 async stale-operation P2 (2026-08-24) — audit continuation
613

714
Version History, sidebar/page context, PDF structural/context operations, search,

.ai/Services/LocalizationService.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Services/LocalizationService.cs
22
> Last updated: 2026-08-24(Wave4 review-follow-up + Wave5 backdrop labels verified; parent Wave4 bookkeeping remains in progress) | Protection: STANDARD
33
4+
> 2026-08-25 GREEN: removed `Editor.SidebarResize` with the retired resize affordance; i18n passes 293 catalog entries / 480 calls / 0 hard-coded visible strings.
5+
46
## Purpose
57

68
Central catalog for English, Simplified Chinese, and French UI strings and culture switching.

.ai/Services/ProductInfo.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Single source of truth for the visible OpenNotes brand and the compatibility ide
1212
- `LegacyAppxIdentity`: `WindowsNotesApp`
1313
- `RepositoryUrl`: `https://github.com/Learnmore-smart/Windows-Notes`
1414
- `WebsiteUrl`: `https://learnmore-smart.github.io/Windows-Notes/`
15-
- `Version`: `5.2.1`
15+
- `Version`: `5.2.2`
1616
- `Description`: localized through `LocalizationService.Get("Product.Description")`
1717

1818
## Important Notes / NEVER Change
@@ -25,6 +25,8 @@ Single source of truth for the visible OpenNotes brand and the compatibility ide
2525

2626
## Open Threads / Resume Context
2727

28+
- **Status:** verified (5.2.2 navigation layout patch)
29+
- Only the visible version advances to `5.2.2`; compatibility names, data root and URLs remain unchanged.
2830
- **Status:** ready_for_release (5.2.1 large-PDF crash hotfix)
2931
- Only the visible version advances to `5.2.1`; compatibility names, data root
3032
and URLs remain unchanged.
@@ -47,3 +49,4 @@ Single source of truth for the visible OpenNotes brand and the compatibility ide
4749
- 2026-08-24: Bumped the visible version to `5.1.2` for the application-wide Lucide icon release.
4850
- 2026-08-24: Bumped the visible version to `5.2.0` for the toolbar, shapes and page-template feature release.
4951
- 2026-08-25: Bumped the visible version to `5.2.1` for the large-PDF session-lifecycle crash hotfix.
52+
- 2026-08-25: Bumped the visible version to `5.2.2` for the fixed sidebar and centered page navigator patch.

0 commit comments

Comments
 (0)