Skip to content

Surface a clear error when pixlet is not installed#4

Open
jwjordan wants to merge 1 commit into
nsluke:mainfrom
jwjordan:pixlet-missing-diagnostic
Open

Surface a clear error when pixlet is not installed#4
jwjordan wants to merge 1 commit into
nsluke:mainfrom
jwjordan:pixlet-missing-diagnostic

Conversation

@jwjordan

Copy link
Copy Markdown

Problem

A push to a Tidbyt/Tronbyt device requires the pixlet CLI to render the .star layout into a webp — and this is true even for the Tronbyt direct-HTTP push path, since that path still renders locally before POSTing the image. When pixlet isn't installed, TidbytManager.runPixlet() returns false before rendering, so the push silently fails and the user only sees a generic message:

  • Menu bar: Tidbyt push failed
  • Settings: Push failed — check token, device ID, and server URL

Neither hints that the actual cause is a missing dependency. I hit this with a correctly-configured Tronbyt server (device ID, server URL, and token all set) — pushes failed with no actionable signal until I traced it to pixlet not being on the machine. Once pixlet was installed, the exact render→POST chain succeeded (HTTP 200 "WebP received.") with no other changes.

Changes

  • Extract pixlet path resolution into TidbytManager.pixletPath / isPixletInstalled, de-duplicating the candidate-path lookup that previously lived inline in runPixlet().
  • Menu bar: when a push fails and pixlet is absent, show pixlet not installed — see github.com/tidbyt/pixlet instead of the generic error.
  • Settings: on a failed push show the brew install command, and add a proactive warning row in the Tidbyt section whenever pixlet is missing (mirrors the existing OAuth status-row pattern).

No behavior change when pixlet is installed.

Testing

  • xcodebuild ... build succeeds.
  • xcodebuild ... test — existing ClaudiusTests suite passes (** TEST SUCCEEDED **).
  • Verified the live menu/Settings copy by running the app against a real Tronbyt server.

🤖 Generated with Claude Code

Tidbyt/Tronbyt pushes require the pixlet CLI to render the .star layout
into a webp — including the Tronbyt direct-HTTP path. When pixlet is
missing, runPixlet() bailed out before rendering and the push silently
failed, surfacing only a generic "Tidbyt push failed" (menu) or
"Push failed — check token, device ID, and server URL" (Settings).
That gives no hint that the real problem is a missing dependency.

- Extract pixlet path resolution into TidbytManager.pixletPath /
  isPixletInstalled (de-duplicates the candidate-path lookup).
- Menu bar: show "pixlet not installed — see github.com/tidbyt/pixlet"
  when a push fails and pixlet is absent.
- Settings: show the brew install command on a failed push, and a
  proactive warning row in the Tidbyt section when pixlet is missing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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