[codex] structure Electron theme source errors - #3294
Merged
Merged
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/contractscorrectly uses a named import for the whole package. - File order: Canonical order preserved — imports, error/predicate declarations,
Context.Servicetag with inline interface,make, thenlayer(Layer.succeed). - Error modeling:
ElectronThemeSetSourceErrorusesSchema.TaggedErrorClasswith structured attributes. The variablesourcefield provides domain context, andcausepreserves the immediate underlying failure (required, since every construction wraps a real failure).Schema.Defect()is used only forcause; the tag plussourceidentify the failure structurally, which is the allowed pattern. - Message derivation:
messageis derived solely from the stablesourceattribute and does not stringifycause(the test even assertsnotInclude(error.message, cause.message)). - Predicate:
isElectronThemeSetSourceErroris exported directly asSchema.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/kindfield. - 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
Loading