- What: `SessionController.ensure_workers` 现在把 `on_reset_applied=self.note_reset_applied` 交给两个 worker,并在控制器上补回 `note_reset_applied()`(转发给记录通道的 `recording.note_reset`)。窗口侧保留 `_on_reset_applied` 作为一层转发——tests 通过它 模拟设备确认。 - Fix: 这是一个真实缺陷,不是重构副作用。请求路径一直是通的(`_on_reset` → worker.reset()),确认路径却从来没有人接:worker 的 `on_reset_applied` 默认 None, 于是设备回报的 frame_id / mono_t 被丢掉,`recording.note_reset` 不会执行, `_drain_reset_events()` 也永远没有事件可发。后果是真机上按「清零」只会看到「指令已发出」, 录制里不会留下 zeroing 事件(`session.json` 的 events 少一条),而 test_ui_smoke 里那条 `test_a_zeroing_is_recorded_only_after_the_worker_confirms_it` 之所以一直是绿的,是因为 它自己把 `stuck.on_reset_applied = window._on_reset_applied` 手工接上了——测试补上了 产品缺的那根线。 - What: 新增 apps/studio/tests/test_session_controller.py:8 个用例直接驱动控制器 (假 worker、假记录通道)——清零确认与标定确认都会到达记录、两个 worker 都挂上记录 sink 与三维 sink、detach_sinks 会摘掉、一次运行从 connecting 到 running 到 idle 的 相位与遥测(结束后旧遥测不可读、session id 递增)、connecting 时停止会被如实告知、 慢连接提示只说一次、丢帧批次只报一次、采集率短少必须有实测值才判定且一会话只说一次。 - Why: 记录要说真话。清零在实验里是一个事件("这一刻起力被归零"),设备既然回报了 它就应当进入记录;把接线补在控制器(A2 搬进来的那个所有者)而不是窗口里,也让 "谁在跑、报了什么"这条链路只有一个所有者。 - Verification: pytest shared/tests apps/studio/tests(offscreen)644 passed / 0 failed / 15 skipped(原 636 + 新增 8);apps/studio/tools/ui_check.py 587 项检查 0 失败; .repro/locale_check.py 0 缺失。真机上的验收仍未做(本机没有设备), 已知边界:SDK worker 的 `_on_reset_applied` 只在 `sensor.reset()` 返回后调用, 异常路径本来就不会报告确认——这一点没有改动。 - Not in this change: 不改变 `_on_reset` 的请求语义与状态栏文案;`_drain_reset_events` 仍在窗口(它只是把事件变成一行状态)。
orisys-app
Desktop applications that consume the Orisys SDK.
| App | Status |
|---|---|
apps/studio |
Scaffold shell (theme / locale / prefs / logging) |
apps/internal |
Stub for future calibration & automated testing |
Layout
shared/— common paths, prefs, theme, i18n, loggingapps/studio/config/— locales, default prefs, editablesensors/copiesapps/studio/outputs/— generated logs and calibration exports (gitignored)build/— Windows PyInstaller packaging (build/studio/build.ps1)
Run (studio shell)
cd D:\repo\orisys-app
python -m pip install -e .\shared -e .\apps\studio
python .\apps\studio\run.py
Or without install:
$env:PYTHONPATH = "D:\repo\orisys-app\shared\src;D:\repo\orisys-app\apps\studio\src"
python D:\repo\orisys-app\apps\studio\run.py
Local orisys SDK
orisys_app_shared.force imports orisys.calibration at module scope, so the
studio app cannot start against an SDK build that predates that module
(the published 0.5.2 wheel does not include it). When working from a repo
checkout, install the SDK from source instead of from an index:
python -m pip install .\..\orisys-sdk # same checkout that built this app
If a pip build is blocked by the environment, the equivalent manual install is
to copy orisys-sdk/src/orisys/**/*.py over site-packages/orisys/ and delete
the stale __init__.cp310-win_amd64.pyd (an extension module shadows the
package __init__.py, which hides sibling modules such as calibration.py).
Verifying UI changes
Both tools render the real main window with the offscreen Qt platform — no display, camera or sensor hardware required:
python .\apps\studio\tools\ui_check.py # layout/theme assertions
python .\apps\studio\tools\ui_snapshot.py --theme light --demo `
--sensor finger --panels cal,3d --size 1600x900 --out shot.png
ui_check.py needs only the runtime dependencies. The pytest suite in
shared/tests and apps/studio/tests covers the same ground plus locale and
preference-schema parity:
pip install pytest
python -m pytest
On Windows the offscreen platform finds no fonts unless QT_QPA_FONTDIR points
at C:\Windows\Fonts; both tools set it automatically.
ui_check.py also runs the palette rules (WCAG contrast, colour separation,
ramp monotonicity) that guard the brand tokens; see
apps/studio/docs/ui-palette.md for the
colour system, its relationship to the UI design spec, and every deliberate
deviation from it.
ui_check.py includes a record channel section as well; see
apps/studio/docs/record-channel.md for
why recording and calibration sampling no longer hang off the UI refresh timer,
and for the data-reliability fixes that came with it.
Branding
Window / EXE icon: shared/resources/branding/logo.png
Top bar / About: shared/resources/branding/logo_topbar.png
Dark mode is the default. Logos currently sit on a black tile; a transparent (or light) variant may be needed for polished light mode later.
Versioning
- Studio app version (
orisys_studio.__version__) — shown in Help → About and used for releases. - Shared package version (
orisys_app_shared.__version__) — internal library version. - Shared API (
orisys_app_shared.API_VERSION) — compatibility tag. Studio declaresREQUIRES_SHARED_API; startup logs a warning on mismatch.
Deferred
Run/Stop pipeline, arrow/force plots, units, calibration capture, Open3D finger mesh, sync-from-wheel for config/sensors, PyInstaller packaging, and the internal app.