Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

refactor: eliminate 20 redundant field aliases in Main.java - #130

Merged
sauravbhattacharya001 merged 1 commit into
masterfrom
refactor/eliminate-category-field-aliases
Mar 28, 2026
Merged

sauravbhattacharya001 merged 1 commit into
masterfrom
refactor/eliminate-category-field-aliases

Conversation

@sauravbhattacharya001

Copy link
Copy Markdown
Owner

Summary

Removes 20+ redundant instance field declarations and their aliasing assignments from \Main.java.

Problem

\initializeCategoryPanel()\ created a well-structured \CategoryRow[]\ array but then immediately aliased every component back to individual fields (\showFriend, \ riendDurThreshold, \ rShowParam, \ rHpanel, etc. × 5 categories = 25 aliases).

These fields were only consumed by \currentThresholds()\ and \isEdgeTypeVisible(), creating unnecessary indirection.

Changes

  • \currentThresholds()\ and \isEdgeTypeVisible()\ now read directly from \categoryRows[]\
  • Removed 20 dead field declarations (sliders, checkboxes, buttons, panels)
  • Converted 7 timeline button fields to local variables (only used in \initializeTimeLine())
  • Removed the 30-line aliasing block in \initializeCategoryPanel()\

Net: -63 lines, zero behavioral change.

The initializeCategoryPanel() method created CategoryRow[] but then
aliased every component back to 20+ individual instance fields
(showFriend, friendDurThreshold, frShowParam, frHpanel, etc.).

These fields were only consumed by currentThresholds() and
isEdgeTypeVisible(), which now read directly from categoryRows[].

Also converted 7 timeline button fields to local variables since
they were only used within initializeTimeLine().

Net reduction: 63 lines of dead field declarations and aliasing code.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added visualization Graph visualization and UI size/m labels Mar 27, 2026
@sauravbhattacharya001
sauravbhattacharya001 merged commit 51214f1 into master Mar 28, 2026
4 of 8 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size/m visualization Graph visualization and UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant