Skip to content

feat: device settings apply --appearance=light|dark - #421

Open
gmegidish wants to merge 1 commit into
mainfrom
feat/settings-appearance
Open

gmegidish wants to merge 1 commit into
mainfrom
feat/settings-appearance

Conversation

@gmegidish

@gmegidish gmegidish commented Sep 14, 2026

Copy link
Copy Markdown
Member

Summary

  • mobilecli device settings apply --appearance=light|dark, plus appearance on the device.settings.apply RPC (now documented in docs/openrpc.json)
  • Android: adb shell cmd uimode night yes|no
  • iOS / simulator: DeviceKit device.settings.apply (needs feat: device.settings.apply with light/dark appearance devicekit-ios#78)
  • remote devices: forwarded over RPC
  • the settings command starts the agent only when appearance is requested; animations stay agent-free

Test plan

Summary by CodeRabbit

  • New Features
    • Added support for setting device appearance to light or dark.
    • Added the --appearance option to device settings commands.
    • Appearance settings are supported across Android, iOS, simulator, and remote devices.
    • Invalid appearance values are rejected, and unsupported devices are skipped safely.

Switches the system appearance. Android uses 'cmd uimode night',
iOS and simulators go through DeviceKit's device.settings.apply,
remote devices forward the RPC. Starts the agent only when appearance
is requested, since animations remain plain adb.
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: f510abaf-e8ba-48e1-aa47-3fdbcd7481db

📥 Commits

Reviewing files that changed from the base of the PR and between f714858 and f2dee92.

⛔ Files ignored due to path filters (1)
  • docs/openrpc.json is excluded by !docs/**
📒 Files selected for processing (10)
  • cli/device.go
  • commands/settings.go
  • devices/android.go
  • devices/appearance_test.go
  • devices/common.go
  • devices/devicekit/appearance.go
  • devices/ios.go
  • devices/remote.go
  • devices/simulator.go
  • server/server.go

Included review availability: 2 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

The PR adds optional light and dark appearance settings to CLI and server requests. The command validates and applies the setting through platform-specific device implementations, including Android ADB and DeviceKit RPC paths.

Changes

Appearance settings

Layer / File(s) Summary
Appearance input contracts
cli/device.go, server/server.go
The CLI exposes --appearance. The server accepts light or dark and forwards the value to the settings command.
Command validation and device selection
commands/settings.go
The command uses agent-aware lookup for appearance requests, validates values, skips unsupported devices, and returns application errors.
Device appearance adapters
devices/common.go, devices/android.go, devices/devicekit/appearance.go, devices/ios.go, devices/remote.go, devices/simulator.go, devices/appearance_test.go
Devices implement AppearanceConfigurable. Android applies night mode through ADB. Other devices forward the setting through DeviceKit or the settings RPC. Tests verify interface implementations.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: hakanor

Merge Risk: ⚪ Minimal · up to f2dee

The appearance setting flow has no supported merge-blocking issue.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 10 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: support for the device settings apply --appearance option with light and dark values.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/settings-appearance

Comment @coderabbitai help to get the list of available commands.

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