feat(notifications): add overlay notifications with position config (#110)

This commit is contained in:
2026-06-10 22:46:52 -07:00
committed by GitHub
parent c09d009a3e
commit 7be1843c41
177 changed files with 7524 additions and 440 deletions
@@ -10,6 +10,7 @@ import {
resolveDesiredOverlayInteractive,
resolveForegroundSuppressionWithGrace,
shouldSuppressPointerInteractionForForegroundWindow,
shouldPrimeLinuxOverlayInteractionFromMeasurement,
tickLinuxOverlayPointerInteraction,
} from './linux-overlay-pointer-interaction';
@@ -136,6 +137,59 @@ test('resolveDesiredOverlayInteractive: hit-tests separate subtitle bars without
);
});
test('shouldPrimeLinuxOverlayInteractionFromMeasurement primes input from first measured rect', () => {
assert.equal(
shouldPrimeLinuxOverlayInteractionFromMeasurement({
getVisibleOverlayVisible: () => true,
getMainWindow: () => ({
isDestroyed: () => false,
isVisible: () => true,
getBounds: () => BOUNDS,
}),
getSubtitleMeasurement: () => ({
...MEASUREMENT,
interactiveRects: [{ x: 900, y: 900, width: 320, height: 80 }],
}),
shouldSuspend: () => false,
shouldSuppressInteraction: () => false,
}),
true,
);
});
test('shouldPrimeLinuxOverlayInteractionFromMeasurement skips hidden or empty startup surfaces', () => {
assert.equal(
shouldPrimeLinuxOverlayInteractionFromMeasurement({
getVisibleOverlayVisible: () => true,
getMainWindow: () => ({
isDestroyed: () => false,
isVisible: () => false,
getBounds: () => BOUNDS,
}),
getSubtitleMeasurement: () => MEASUREMENT,
shouldSuspend: () => false,
}),
false,
);
assert.equal(
shouldPrimeLinuxOverlayInteractionFromMeasurement({
getVisibleOverlayVisible: () => true,
getMainWindow: () => ({
isDestroyed: () => false,
isVisible: () => true,
getBounds: () => BOUNDS,
}),
getSubtitleMeasurement: () => ({
viewport: MEASUREMENT.viewport,
contentRect: null,
interactiveRects: [],
}),
shouldSuspend: () => false,
}),
false,
);
});
test('mapOverlayMeasurementForPointerInteraction preserves renderer interactive rects', () => {
const mapped = mapOverlayMeasurementForPointerInteraction({
layer: 'visible',