fix: restore PDF pen capture and overhaul sticky/pens/pages
All checks were successful
CI / Windows build (push) Successful in 9m55s

Reinstall PenCaptureBinding so stylus ink hits again; keep finger Listener translucent under pinch; page-anchor sticky with drag/resize; OneNote pen slots (brush+width+color); blank-note multi-page; default side button to hold-select-text.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-07 02:38:58 +08:00
parent ad9b1b46db
commit 307161f465
16 changed files with 1279 additions and 487 deletions

View File

@@ -122,6 +122,26 @@ void main() {
reopened.dispose();
});
test('schedulePageCountSave persists and restores pageCount', () async {
final repo = await SidecarRepository.open(src, debounce: _fast);
repo.schedulePageCountSave(5);
await repo.flush();
expect(repo.sidecar.pageCount, 5);
repo.dispose();
final reopened = await SidecarRepository.open(src, debounce: _fast);
expect(reopened.sidecar.pageCount, 5);
reopened.dispose();
});
test('notebook open normalizes missing pageCount to 1', () async {
final noteSrc = '${tmpDir.path}/notebook';
final repo =
await SidecarRepository.open(noteSrc, docType: 'notebook', debounce: _fast);
expect(repo.sidecar.pageCount, 1);
repo.dispose();
});
test('removing a highlight persists (un-highlight)', () async {
final repo = await SidecarRepository.open(src, debounce: _fast);
repo.scheduleHighlightSave(0, const [