Skip to content

fix: validate screen timeout and correct 0s (never) hint (#41) - #42

Merged
sickkick merged 1 commit into
mainfrom
cursor/fix-screen-timeout-validation-5d38
Aug 9, 2026
Merged

fix: validate screen timeout and correct 0s (never) hint (#41)#42
sickkick merged 1 commit into
mainfrom
cursor/fix-screen-timeout-validation-5d38

Conversation

@sickkick

@sickkick sickkick commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes #41 (revised root cause).

The Display settings hint incorrectly suggested 0s (never) for screen_timeout. The Android Management API rejects non-positive durations (screenTimeout must be set to a duration greater than 0). Format-only validation would still accept 0s.

This change:

  • Validates positive Duration strings (220s, 60s, etc.) in the Display options step and set_kiosk_policy service
  • Omits screenTimeout from the policy body when mode is SCREEN_TIMEOUT_USER_CHOICE (required by Google)
  • Removes the incorrect 0s (never) wording from UI strings, service docs, and README
  • Surfaces a clear form error instead of a generic apply failure / API 400

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
Open in Web Open in Cursor 

Reject non-positive/malformed screen_timeout values locally, omit
screenTimeout for SCREEN_TIMEOUT_USER_CHOICE, and correct docs that
incorrectly suggested 0s means never.

Co-authored-by: Michael Shaffer <sickkick40@gmail.com>
@sickkick
sickkick marked this pull request as ready for review August 9, 2026 16:58
@cursor

cursor Bot commented Aug 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@sickkick
sickkick merged commit 9663ad4 into main Aug 9, 2026
3 checks passed
@sickkick
sickkick deleted the cursor/fix-screen-timeout-validation-5d38 branch August 9, 2026 17:03
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.

Display policy: "Timeout duration" text field has no client-side format validation

1 participant