Skip to content

[codex] structure Electron theme source errors - #3294

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

juliusmarminge merged 1 commit into
mainfrom
codex/desktop-electron-theme-errors

[codex] structure Electron theme source errors

c1ea123
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Effect Service Conventions succeeded Jun 20, 2026 in 38s

Effect service review: All clear

All clear

Details

Note

Your check run agent prompt is: .macroscope/check-run-agents/effect-service-conventions.md
More information about how Check Run Agents work can be found in our Help Center.

Reviewed the changes to apps/desktop/src/electron/ElectronTheme.ts and apps/desktop/src/electron/ElectronTheme.test.ts against the Effect service conventions. No violations found.

Key points verified:

  • Imports: Effect modules use namespace subpath imports (import * as Schema from "effect/Schema"); @t3tools/contracts correctly uses a named import for the whole package.
  • File order: Canonical order preserved — imports, error/predicate declarations, Context.Service tag with inline interface, make, then layer (Layer.succeed).
  • Error modeling: ElectronThemeSetSourceError uses Schema.TaggedErrorClass with structured attributes. The variable source field provides domain context, and cause preserves the immediate underlying failure (required, since every construction wraps a real failure). Schema.Defect() is used only for cause; the tag plus source identify the failure structurally, which is the allowed pattern.
  • Message derivation: message is derived solely from the stable source attribute and does not stringify cause (the test even asserts notInclude(error.message, cause.message)).
  • Predicate: isElectronThemeSetSourceError is exported directly as Schema.is(...), not a private constant wrapped by a redundant function.
  • No redundant discriminator: A single precise error tag is used without an added singleton operation/reason/kind field.
  • Tests: The behavior change (theme set failures now produce a typed error) is covered by a focused test that uses a test layer rather than mocking core business logic.

The agent made no additional tool calls beyond your initial Check Run Agent prompt.


Agent Credits: 23 credits