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:
36
test/diagnostics_test.dart
Normal file
36
test/diagnostics_test.dart
Normal file
@@ -0,0 +1,36 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:badnote/diagnostics/badnote_log.dart';
|
||||
import 'package:badnote/diagnostics/pen_event_ring.dart';
|
||||
import 'package:badnote/diagnostics/frame_sampler.dart';
|
||||
|
||||
void main() {
|
||||
test('PenEventRing retains recent events', () {
|
||||
final ring = PenEventRing.instance;
|
||||
ring.clear();
|
||||
ring.recordArbiter(
|
||||
activeCount: 1,
|
||||
deviceKind: 'stylus',
|
||||
draw: true,
|
||||
fingerDrawing: false,
|
||||
);
|
||||
expect(ring.recent(), isNotEmpty);
|
||||
expect(ring.toJsonList().first['decision'], 'draw');
|
||||
});
|
||||
|
||||
test('FrameSampler flags over-budget frames', () {
|
||||
FrameSampler.instance.reset();
|
||||
FrameSampler.instance.record('test', 8);
|
||||
FrameSampler.instance.record('slow', 30);
|
||||
expect(FrameSampler.instance.overBudget, 1);
|
||||
expect(FrameSampler.instance.summary()['total'], 2);
|
||||
});
|
||||
|
||||
test('BadNoteLog ring accepts entries without start', () {
|
||||
BadNoteLog.instance.info(LogSubsystem.diag, 'unit_test_ping');
|
||||
expect(
|
||||
BadNoteLog.instance.snapshotRing().any((e) => e['msg'] == 'unit_test_ping'),
|
||||
isTrue,
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user