Skip to content

Keep current options when a provider passes undefined - #3

Merged
enaboapps merged 1 commit into
mainfrom
fix-undefined-options
Oct 9, 2026
Merged

enaboapps merged 1 commit into
mainfrom
fix-undefined-options

Conversation

@enaboapps

Copy link
Copy Markdown
Contributor

ScanProvider forwards every option field to setOptions, including ones the app left undefined. setOptions spread them over the current options, so an explicitly manual controller was reset to the automatic default and its clock started. Switchify Remote's Jest suite hung on exit because of it.

  • setOptions now ignores undefined values.
  • There is a regression test, and the version is bumped to 0.3.1.

Validation

  • npm test: 62 tests pass.

🤖 Generated with Claude Code

- ScanProvider forwards every option field, including undefined ones, and setOptions spread them over the current options. That reset a manual controller to automatic and started its clock; undefined now means unchanged

- Bump to 0.3.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@enaboapps
enaboapps merged commit ae1db07 into main Oct 9, 2026
2 checks passed
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] Safe to merge; no blocking or non-blocking findings remain.

T-Rex evidence

Evidence from the check

  • This exact five-test source was executed unchanged against the parent and PR revisions, checking real provider effects, option values, clock activity, and rendered highlights.

Evidence from the check

  • This executed Python runner created an isolated parent-source checkout, reused installed dependencies, and captured both comparison runs plus focused supporting tests without altering tracked source.

Command output from the check

  • Running the authored tests against the parent revision produced five failures and recorded automatic:true with a running clock after omitted provider options, reproducing the behavior the PR fixes.

Command output from the check

  • Running the same authored tests against the PR passed all five tests and recorded preserved manual mode, accepted false and zero values, and working explicit automatic updates, contradicting the failure hypothesis.

Command output from the check

  • The existing options, controller, and DOM suites passed all 26 tests and the tracked diff check passed, supporting the narrow result without source modifications.

View artifacts

Summary

setOptions now skips undefined fields while applying defined values. The package version becomes 0.3.1.

  • Undefined options leave the controller’s current settings in place.

Reviews (1) · Last reviewed commit: "Keep current options when a provider pas..." · Reviewed by Greptile

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.

2 participants