Repository navigation
Remove dead code: unused DepthChart and ExecutionPage orphan state - #95
Merged
Merged
Conversation
DepthChart had zero references across the repo (not exported from the charts barrel, not imported anywhere) and contained real design flaws — it rebuilt the entire chart instance on every data tick instead of using series.setData, and passed price values as the lightweight-charts time axis (which requires strict ascending order). Since it is dead code, removing it is safer than leaving a misleading broken component for future contributors to wire up. The MarketPage "depth chart" panel already renders a CSS-based depth visualization.
ExecutionPage declared planBusyAction, planMessage, incidentBusyAction, incidentMessage, and incidentNoteDraft, plus a runBulkIncidentAction handler that wrote to the incident pair. None of these were ever read by JSX and the handler was never bound — the real plan/incident interactions live in child components (ExecutionPlanDetailPanel, IncidentTriagePanel, BulkQueueActionsPanel) which own their own state. Removing the orphaned state and the now-unused bulkUpdateIncidentQueue import.
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
Removes two confirmed dead-code areas identified in the third-pass audit. Each removal was verified by tracing call sites before deletion — no live behavior is changed.
Changes
DepthChart component (deleted)
Zero references anywhere in the repo (not in the charts barrel export, not imported by any page). It also contained real design flaws: rebuilding the whole chart instance on every tick instead of
series.setData, and using price values as the lightweight-chartstimeaxis (which requires strict ascending order). MarketPage's "depth chart" panel already uses a CSS-based visualization. Deleting is safer than leaving a broken, tempting component.ExecutionPage orphan state
Five state variables (
planBusyAction,planMessage,incidentBusyAction,incidentMessage,incidentNoteDraft) and arunBulkIncidentActionhandler were declared but never read by JSX and never bound to any callback. The real plan/incident interactions live in child components that own their own state. Removed the orphaned state, handler, and the now-unusedbulkUpdateIncidentQueueimport.Not addressed (deliberately)
SettingsPage also has form state (
profileForm,accessForm,bindingForm) whose handlers are never bound because JSX uses inline callbacks. However that code is entangled withsyncAccountState/syncBindingForm(called from the liveloadAccountWorkspace) and thesaveStatestructure written by inline callbacks. Cleaning it up is a small refactor, not dead-code deletion, and is left for separate work to keep this PR's scope tight and low-risk.Verification
verify— green