feat: unified shell, diagnostics pack, native Office, sticky board
All checks were successful
CI / Windows build (push) Successful in 14m22s
All checks were successful
CI / Windows build (push) Successful in 14m22s
Make Surface remote debugging and classroom workflows viable: always-on structured logs with one-click zip export, a single AppShell chrome, OOXML PPTX/DOCX annotation without LibreOffice, and a first-class sticky board. Also drop spike/legacy ink widgets and tighten pen feel (predictor, PenInfoHistory, page-tile layer). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
28
test/stroke_predictor_test.dart
Normal file
28
test/stroke_predictor_test.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:badnote/editor/engine/stroke_predictor.dart';
|
||||
|
||||
void main() {
|
||||
test('StrokePredictor projects ahead when velocity is high', () {
|
||||
final p = StrokePredictor(lookaheadMs: 16);
|
||||
final t0 = DateTime.utc(2026, 1, 1, 0, 0, 0, 0);
|
||||
expect(p.observe(const Offset(0, 0), 0.5, at: t0), isNull);
|
||||
final tip = p.observe(
|
||||
const Offset(10, 0),
|
||||
0.5,
|
||||
at: t0.add(const Duration(milliseconds: 8)),
|
||||
);
|
||||
// 10px / 8ms ≈ 1250 px/s → 16ms lookahead ≈ 20px ahead
|
||||
expect(tip, isNotNull);
|
||||
expect(tip!.offset.dx, greaterThan(10));
|
||||
});
|
||||
|
||||
test('StrokePredictor resets cleanly', () {
|
||||
final p = StrokePredictor();
|
||||
p.observe(const Offset(0, 0), 0.4);
|
||||
p.reset();
|
||||
expect(p.observe(const Offset(1, 1), 0.4), isNull);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user