Skip to content

Remove dead code: unused DepthChart and ExecutionPage orphan state - #95

Merged
rogerdigital merged 2 commits into
mainfrom
chore/remove-dead-code
Jul 7, 2026
Merged

rogerdigital merged 2 commits into
mainfrom
chore/remove-dead-code

Conversation

@rogerdigital

Copy link
Copy Markdown
Owner

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-charts time axis (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 a runBulkIncidentAction handler 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-unused bulkUpdateIncidentQueue import.

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 with syncAccountState/syncBindingForm (called from the live loadAccountWorkspace) and the saveState structure 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

  • typecheck — all packages pass
  • web tests: 75 passed
  • build — success
  • pre-push verify — green

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.
@rogerdigital
rogerdigital merged commit f9cfaa9 into main Jul 7, 2026
6 checks passed
@rogerdigital
rogerdigital deleted the chore/remove-dead-code branch July 7, 2026 15:38
rogerdigital added a commit that referenced this pull request Jul 8, 2026
Add regression tests for bugs found in audit passes #92-#95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant