Skip to content

Restore the pointer-speed schema minimum a JSDoc typo dropped - #1353

Merged
lujjjh merged 1 commit into
linearmouse:mainfrom
YuriNachos:fix/pointer-speed-schema-minimum
Aug 11, 2026
Merged

lujjjh merged 1 commit into
linearmouse:mainfrom
YuriNachos:fix/pointer-speed-schema-minimum

Conversation

@YuriNachos

Copy link
Copy Markdown
Contributor

Summary

Scheme.Pointer.speed clamps to 0 ... 1 in the Swift runtime (Scheme.Speed.range), but the JSON-schema tag documenting the lower bound was misspelled @minimal instead of @minimum. ts-json-schema-generator silently dropped an unknown tag, so the published Documentation/Configuration.json admitted negative speeds while the runtime rejected them.

Root Cause

Documentation/Configuration.d.ts line ~422: @minimal 0 → the generator emits minimum only for @minimum; @minimal is ignored, so the lower bound never reached the schema.

Changes

  • Documentation/Configuration.d.ts: @minimal 0 -> @minimum 0.
  • Documentation/Configuration.json: regenerated (the pre-commit hook does this from the .d.ts source of truth).
  • LinearMouseUnitTests/Model/ConfigurationSchemaTests.swift: new ConfigurationSchemaTests pinning both Pointer.speed bounds (minimum == 0, maximum == 1) as a regression guard, so the schema cannot silently drift from the runtime clamp again.

Verification

make configure clean lint test XCODEBUILD_ARGS="CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= DEVELOPMENT_TEAM=":

  • swiftformat --lint . — no new violations vs main
  • swiftlint . — 0 serious
  • New ConfigurationSchemaTests/testPointerSpeedDeclaresBothBounds passes

The Pointer.speed JSDoc tag was spelled @minimal instead of @Minimum, so the
JSON-schema generator (ts-json-schema-generator) silently dropped the lower
bound: the published Configuration.json admitted negative speeds while the
Swift runtime clamps to Scheme.Speed.range 0...1 and rejected them. Fixing the
tag restores minimum: 0 alongside the existing maximum: 1, so the schema keeps
tracking the runtime clamp.

Co-authored-by: Claude <[email protected]>
@lujjjh
lujjjh merged commit 9843332 into linearmouse:main Aug 11, 2026
1 check passed
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