Skip to content

Conversation

@Nateowami
Copy link
Collaborator

@Nateowami Nateowami commented Oct 22, 2025

It's bugged me that sometimes we have public members that are actually dead code. I asked Copilot to find instances of this, but instead it wrote a script to find them, which worked pretty well, but had a lot of false positives (usually for somewhat understandable reasons; not glaring problems with the script). This PR removes the code that's truly dead.


This change is Reviewable

@Nateowami Nateowami requested a review from Copilot October 22, 2025 13:45
@Nateowami Nateowami added testing not required e2e Run e2e tests for this pull request labels Oct 22, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes unused public members and imports that were identified as dead code across multiple components in the Scripture Forge application. The changes streamline the codebase by eliminating properties, methods, and imports that are no longer referenced.

  • Removes unused getter properties, methods, and class fields
  • Eliminates unused imports (environment)
  • Cleans up both component logic and UI-related helper methods

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
collaborators.component.ts Removed unused getters hasEmailError and totalUsers
suggestions.component.ts Removed unused showHelp property and toggleHelp() method
lynx-insights-panel.component.ts Removed unused getRemainingNodeCount() method
draft-sources.component.ts Removed unused targetLanguageTag getter
draft-generation.component.ts Removed unused issueEmail getter and unused environment import
biblical-terms.component.ts Removed unused selectedReferenceForCaption getter
serval-project.component.ts Removed unused draftSourcesLink getter
permissions-viewer.component.ts Removed unused hasOperation() method
my-projects.component.ts Removed unused currentUserRole() method
connect-project.component.ts Removed unused isBasedOnProjectSet getter and logInWithParatext() method
checking-questions.component.ts Removed unused activeQuestionChapter getter, nextQuestion(), previousQuestion(), and changeQuestion() methods
checking-answers.component.ts Removed unused canShowScriptureInput and hasUserRead getters
chapter-audio-dialog.component.ts Removed unused _editState field, inEditState getter, and assignment to _editState

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.48%. Comparing base (0a7df6b) to head (b16ea8a).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3529      +/-   ##
==========================================
+ Coverage   82.42%   82.48%   +0.06%     
==========================================
  Files         615      615              
  Lines       36948    36914      -34     
  Branches     6045     6033      -12     
==========================================
- Hits        30453    30450       -3     
+ Misses       5597     5579      -18     
+ Partials      898      885      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Nateowami Nateowami removed the e2e Run e2e tests for this pull request label Oct 22, 2025
@Nateowami
Copy link
Collaborator Author

(e2e tests passed on this PR. I've removed the label, as I don't think they need to be re-run if this PR is updated and/or rebased)

Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@RaymondLuong3 reviewed 13 of 13 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Nateowami)

@RaymondLuong3 RaymondLuong3 merged commit 93615cb into master Oct 22, 2025
33 checks passed
@RaymondLuong3 RaymondLuong3 deleted the feature/eliminate-dead-code branch October 22, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants