Skip to content

[codex] Preserve desktop asset probe failures#3373

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/desktop-asset-errors
Jun 20, 2026
Merged

[codex] Preserve desktop asset probe failures#3373
juliusmarminge merged 1 commit into
mainfrom
codex/desktop-asset-errors

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Desktop asset lookup no longer treats filesystem probe failures as missing files. The service now returns a structured error with the requested filename, candidate path, and exact underlying cause, while keeping a stable message independent of cause text.

Also exports make to match the single-file service convention.

Validation:

  • vp test apps/desktop/src/app/DesktopAssets.test.ts
  • vp check
  • vp run typecheck

Note

Medium Risk
Startup paths that load iconPaths can now fail on I/O errors instead of continuing with no icon; callers must handle DesktopAssetProbeError where they previously assumed infallible resolution.

Overview
Desktop asset resolution no longer treats FileSystem.exists failures as “file not found.” resolveResourcePath and Darwin dev dock icon probing now fail with a new DesktopAssetProbeError that carries the requested filename, the candidate path, and the original cause, while exposing a stable user-facing message that does not leak cause text.

The DesktopAssets service typing is updated so these paths can error with DesktopAssetProbeError, and make is exported to align with other single-file Effect services. A unit test asserts the error shape and message behavior when a probe fails (e.g. permission denied).

Reviewed by Cursor Bugbot for commit 36d521d. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Preserve filesystem errors in DesktopAssets.resolveResourcePath as DesktopAssetProbeError

  • Introduces DesktopAssetProbeError, a structured tagged error carrying fileName, candidatePath, and the original filesystem cause, with a stable message format.
  • Changes resolveResourcePath and resolveIconPath to fail with DesktopAssetProbeError on filesystem errors instead of silently treating them as non-existence (previously via orElseSucceed(() => false)).
  • Adds a test in DesktopAssets.test.ts verifying the error preserves all fields and does not leak the cause in the message.
  • Risk: DesktopAssets.make can now fail during initialization if any icon probe encounters a filesystem error, and resolveResourcePath callers must now handle DesktopAssetProbeError in the error channel.

Macroscope summarized 36d521d.

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 28c513c3-f148-4491-809c-15931ef8a28c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/desktop-asset-errors

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

This PR improves error handling by preserving filesystem probe failures instead of silently swallowing them. The change is small, well-tested, and limited to desktop asset resolution with no broader side effects.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge juliusmarminge merged commit 61aade9 into main Jun 20, 2026
16 checks passed
@juliusmarminge juliusmarminge deleted the codex/desktop-asset-errors branch June 20, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant