[reflex-xy] Expose a typed on_error event and visible failure state
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, python
Research direction
Start with python/reflex_xy/assets/XYChart.jsx, especially the static failure paths, socket setup, and onErr handler, then inspect the public prop surface in python/reflex_xy/component.py. Run the existing unit and browser tests before changing behavior; done means static and live failures emit the documented ErrorEvent, recoverable failures retain the last good view, and terminal mount failures show an accessible fallback without duplicate notifications.
Written by the indexing model from the issue text.
Description
Summary
Reflex applications cannot observe chart failures through the component API. Static fetch/decode/render failures and live transport/protocol failures are reduced to console output, while terminal mount failures can leave a blank chart region with no accessible status or retry guidance.
Audited at commit 99eda6d.
Current behavior
- Static asset failures are caught and only
console.warn(XYChart.jsx). - Namespace connection errors are debug-only (socket setup).
- Server
errenvelopes only warn and optionally resubscribe (onErr). - The public Reflex component exposes point, selection, view, animation, and hover handlers but no
on_errorhandler (component.py).
As a result, an application cannot log/measure failures, show its own fallback, distinguish retryable from terminal errors, or test failure behavior without inspecting the browser console.
Proposed direction
Add on_error with an exported versioned ErrorEvent TypedDict. The envelope should include a stable error code, mode/stage, chart identity, recoverability, and a safe message. Keep the last good view during recoverable refresh failures; render an accessible fallback for a terminal initial-mount failure.
Acceptance criteria
-
reflex_xy.chart(..., on_error=...)is a supported, documented component prop. -
reflex_xy.ErrorEventexactly describes a versioned runtime envelope with at least code, mode/stage, identity, recoverability, and message. - Static HTTP, frame decode, and initial render failures dispatch
on_error. - Live connection, server
err, incompatible protocol/payload, and view-construction failures dispatchon_error. - Recoverable refresh failures preserve the last good chart while reporting the error.
- Terminal initial-mount failures render a concise accessible fallback (for example
role="alert") rather than an unexplained blank region. - Retry/resync does not flood handlers with duplicate identical errors; recovery can be observed or clears the visible error state.
- Unit and browser tests cover at least one static and one live failure.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 76
- Avg merge
- 1h 25m
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reflex-dev/xy
-
Skip finite/log visibility scans when zone maps already prove all-finite on linear axesMay be free again A pull request for this issue was closed without being merged. Openneeds investigate performance
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
reflex-dev/xy#169 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
reflex-dev/xy#523 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
reflex-dev/xy#516 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
reflex-dev/xy#512 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
reflex-dev/xy#511 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
enhancement good first issue Stellar Wave trivial
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
StellarCanary/ProtocolCanary-Fixtures#258 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
IBM/ai-atlas-nexus#295 ·
Maintainers usually reply within 6 days
-
github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Hochfrequenz/aibap.mcp#578 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mishraprafful/multihull#150 ·
Maintainers usually reply within 1 day