#1007·obscura

Media-query change listeners and reduced-motion emulation do not update

Author: AntonioRossiCreated Sep 17, 2026Updated Sep 17, 2026
Labelsbug

Before you start

  • I searched existing issues and this is not a duplicate.
  • I tested against the latest release or main.
  • This is not a security vulnerability (those go through SECURITY.md, not a public issue).

obscura version or commit

4b7028830222175ca812a5caef04f9d802e64c23 (upstream main, checked 2026-09-17)

OS and architecture

Linux x86_64, isolated Docker native engine; Playwright over CDP

How are you using obscura?

CLI (fetch / serve / scrape / mcp)

Affected area

JavaScript or DOM behavior

Build variant

Render-enabled (official default archive or --features render)

Stealth mode

None

Reproduction

Build with --features render,stealth; run obscura serve --stealth. In Playwright, use a context viewport of 1280x720 and navigate to a simple data:text/html page.

javascript
await page.evaluate(() => {
  window.changes = [];
  window.q = matchMedia('(min-width: 1280px) and (min-height: 720px)');
  q.addEventListener('change', e => changes.push(e.matches));
});
await page.setViewportSize({width:1000,height:700});
await page.waitForTimeout(30);
await page.setViewportSize({width:1280,height:720});
await page.waitForTimeout(30);
console.log(await page.evaluate(() => changes));
await page.emulateMedia({reducedMotion:'reduce'});
console.log(await page.evaluate(() => matchMedia('(prefers-reduced-motion: reduce)').matches));

I reproduced these independently of our MCP gateway. I am preparing focused native fixes in our downstream fork and will keep contribution validation separate from deployment validation. AI assisted with this reproduction and proposed implementation.

Expected behavior

The change listener receives [false, true]. Reduced-motion emulation makes the reduce query true and no-preference false; matching CSS rules should follow the same preference.

Actual behavior

changes is []; .matches itself tracks resized dimensions. emulateMedia succeeds but the reduced-motion query stays false. The source has empty MediaQueryList listener methods and no Emulation.setEmulatedMedia handler.

Rendering details

No response

Does headless Chrome behave the same?

I did not check

Logs

bash