Repository navigation
fix: surface errors to UI instead of console.error - #141
Merged
Merged
Conversation
BerryUIKI
force-pushed
the
feat/error-surfacing
branch
from
August 19, 2026 02:34
4bba80b to
74cebec
Compare
- useOptions: expose mutation error for delete/update so the table can render a visible failure banner - useGooseAnalysis: propagate run errors via mutation.error - ShadowAnalysis: show error state with retry instead of silent logging
BerryUIKI
force-pushed
the
feat/error-surfacing
branch
from
August 19, 2026 03:36
74cebec to
11d8fd7
Compare
NoviUIKI
approved these changes
Aug 19, 2026
NoviUIKI
left a comment
Collaborator
There was a problem hiding this comment.
Review summary — PR #141
Verdict: ✅ Approve
Solid error-handling cleanup. I verified every mutation whose console.error was removed, and all in-use ones have their errors surfaced in the UI (typecheck passes).
Critical
- None.
Important
- None.
Suggestions (non-blocking)
- Four hooks are now dead code in useOptions.ts:
useDeleteOptionChain,useCalculateOptionPrice,useCalculateIV, anduseUpdateOptionStrategyhave no consumers. Removing theirconsole.erroris harmless, but consider deleting or wiring them up in a follow-up so dead code doesn't linger. - No test for the new
validationErrorpath. A small test onuseGooseShadowAnalysis(or the component) covering "no workspace → validation error state" would lock in the behavior this PR introduces. - Minor:
validationErroris a plain boolean. If more validation branches appear later, a string reason would give more informative UI.
Strengths
- Replaces hook-level
console.errorwith per-invocation/state-based error surfacing — the idiomatic React Query pattern. Errors no longer vanish into the console. - Verified surfacing per mutation:
useFetchOptionChain→ call-siteonError→ErrorStateinOptionsPage;useCalculateGreeks→ banner inGreeksCalculator;useCreateOptionStrategy/useDeleteOptionStrategy→ErrorStateinOptionStrategyPanel;useDeleteOptionContract→ banner inOptionContractTable;useStartShadowAnalysis→ErrorStateinShadowAnalysis. ShadowAnalysisnow shows a proper "select a workspace" error state instead of a silentconsole.error, and the error auto-clears once a workspace is selected (theuseEffectonworkspaceId).
Verification
tsc --noEmit(apps/desktop): passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace silent console.error calls with UI-visible error handling (task #3).
Changes