Skip to content

Studio tests: stub stt-context when mic-target loads the voice settings store - #17293

Merged
danielhanchen merged 1 commit into
mainfrom
fix/mic-target-test-stt-context-stub
Nov 9, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/mic-target-test-stt-context-stub

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

main is red in the frontend unit tests (Frontend build + bundle sanity and Frontend unit tests (Windows)) since #16976 merged:

# Error: no stub for import "./stt-context" in .../features/settings/stores/voice-settings-store.ts
not ok 888 - tests/mic-target.test.ts

#15810 (merged at 15:43 UTC) moved the voice context settings into stores/stt-context.ts and made voice-settings-store.ts import it. #16976 (merged about an hour later) added tests/mic-target.test.ts, which loads that store through loadWithStubs with a stub list written before that import existed. loadWithStubs throws on any unstubbed import, so the whole file fails at load, and every PR based on current main inherits the red. #16976's own code is fine; only its test's stub list is out of date.

The fix passes the real stt-context module, the same way voice-settings-storage-sync.test.ts already does after #15810.

Changes

  • studio/frontend/tests/mic-target.test.ts: add "./stt-context": sttContext to the store's stubs.

Testing

  • node --test tests/mic-target.test.ts: 20 passed. On main the same file fails to load (0 passed, 1 failed).
  • npm test (whole frontend unit suite): 15450 tests, 0 failed.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T18:04:15.238491Z 6364965 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 6364965c13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 0f6c2e5 into main Nov 9, 2026
@danielhanchen
danielhanchen deleted the fix/mic-target-test-stt-context-stub branch November 9, 2026 18:09
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 9, 2026
…de pauses its blur (software compositing) (unslothai#17308)

## Problem

With Glass under software compositing (no GPU, the case the unslothai#17007
motion pause targets), scrolling the Settings dialog still costs about
3x to 4.5x the default look. The see-through Settings pane is not
scrolled by the compositor: every scroll frame re-rasters the whole pane
(raster 2 ms on the default look vs 384 ms on Liquid 3D in a trace).
Removing blur, shadows, background images or filters, even all together,
does not fix it; giving the pane its own scrolling layer does.

The API monitor panel also fades in and out through a script animation,
which fires no CSS animation events, so the motion pause never saw it
and its blur was recomputed on every fade frame.

## Change

- `index.css`: `html[data-glass][data-glass-motion]
[data-settings-main-scroll] { will-change: scroll-position; }` gives the
Settings content pane its own composited scroll layer. Only with Glass
under software compositing (`data-glass-motion` is only set when the
page has no GPU renderer); GPU users and the default look are untouched.
- `settings-dialog.tsx`: `data-settings-main-scroll` on the content
pane's scroller.
- `glass-motion.ts`: `holdGlassMotion(el, ms)` reaches the running pause
controller (a no-op when the pause is not running; stopping the
controller clears it).
- `api-monitor-overlay.tsx`: the panel's animation start and complete
callbacks hold the pause for the fade.

Trade-off: under Glass with software compositing, text in the Settings
pane may lose subpixel antialiasing (grayscale instead), as text on any
composited scroll layer does. Headless Linux already renders grayscale,
so the screenshots below cannot show it.

## Results

Long-chat gate harness, Chromium software compositing, 40 turns, Glass
cost as a multiple of the default look. 3 rotated runs per arm, `main`
measured twice (A/A):

| Area | Look | main (both arms) | this PR |
| --- | --- | --- | --- |
| Settings scroll | Liquid | 2.7x to 3.2x | 1.4x to 1.9x |
| Settings scroll | Liquid 3D | 3.3x to 4.5x | 1.4x to 2.0x |
| API monitor | Liquid / Liquid 3D | 2.0x to 2.9x | 2.0x to 2.8x |
| Typing, thread scroll, Settings tabs | all | unchanged (inside the A/A
spread) | |

The API monitor hold engages (Liquid 3D compositor time 306 to 394 ms ->
190 to 230 ms per open and close), but its gate ratio stays inside the
A/A spread.

## Tests

- `tests/glass-motion.test.ts`: two new tests for `holdGlassMotion` and
the API monitor wiring.
- Full long-chat gate passes on this branch. `tsc --noEmit` clean.
Frontend node suite: everything passes except `mic-target` (fixed on
main by unslothai#17293) and a KaTeX test that only fails with a symlinked
`node_modules` (same on main).
- Look at rest: Settings differs from main by at most 3/255 (two main
runs differ by up to 67/255); the API monitor panel is pixel identical
and is never left paused at rest.
- Not measured: Windows and real devices.

## Look

Left: main. Right: this PR. Liquid 3D, software compositing, at rest.

![Settings scrolled, Liquid 3D, main vs this
PR](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/17308/settings_pair_small-ce3147444301.png)

![API monitor, Liquid 3D, main vs this
PR](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/17308/api_monitor_pair_small-6f533d875a54.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant