Skip to content

fix(options): defer typed spinbox updates - #519

Merged
kmnhan merged 1 commit into
mainfrom
agent/fix-settings-spinbox-input
Jul 29, 2026
Merged

fix(options): defer typed spinbox updates#519
kmnhan merged 1 commit into
mainfrom
agent/fix-settings-spinbox-input

Conversation

@kmnhan

@kmnhan kmnhan commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Defer typed numeric settings changes until the user presses Enter or moves focus.
  • Apply the rule to direct and nested spin boxes at the shared settings dialog seam.
  • Add a regression test that checks every settings spin box.

Root cause

The settings dialog saved each valueChanged signal and then refreshed all controls. Qt keyboard tracking emitted this signal after each typed character. The refresh interrupted entry before the user could type the complete value.

User impact

Users can type complete ktool and other numeric settings values. Spin-box buttons, arrow keys, and mouse-wheel changes still apply immediately.

Validation

  • uv run ruff format --check src/erlab/interactive/_options/ui.py tests/interactive/test_options.py
  • uv run ruff check src/erlab/interactive/_options/ui.py tests/interactive/test_options.py
  • QT_QPA_PLATFORM=offscreen uv run pytest -q tests/interactive/test_options.py with PyQt6: 61 passed
  • QT_API=pyside6 QT_QPA_PLATFORM=offscreen uv run pytest -q tests/interactive/test_options.py: 61 passed
  • git diff --check

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.65%. Comparing base (fb81071) to head (6b973ee).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #519   +/-   ##
=======================================
  Coverage   91.65%   91.65%           
=======================================
  Files         247      247           
  Lines       94783    94787    +4     
  Branches    15882    15884    +2     
=======================================
+ Hits        86875    86881    +6     
+ Misses       4590     4589    -1     
+ Partials     3318     3317    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@kmnhan
kmnhan marked this pull request as ready for review July 29, 2026 07:50
@kmnhan
kmnhan merged commit 80f37e6 into main Jul 29, 2026
25 of 26 checks passed
@kmnhan
kmnhan deleted the agent/fix-settings-spinbox-input branch July 29, 2026 07:51
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