Skip to content

fix(newsletters): remove dead code reintroduced by stale merge base - #1202

Merged
dealako merged 1 commit into
mainfrom
fix/LFXV2-2386-dead-newsletter-code
Jul 27, 2026
Merged

fix(newsletters): remove dead code reintroduced by stale merge base#1202
dealako merged 1 commit into
mainfrom
fix/LFXV2-2386-dead-newsletter-code

Conversation

@dealako

@dealako dealako commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Fixes the release build break in run https://github.com/linuxfoundation/lfx-self-serve/actions/runs/30282716458 (TS2339: Property 'bodyPersistable' does not exist).

Root cause: PR #1198 ("dashboards: trend indicators") squash-merged from a branch cut before the #1133 revert (#1200) landed on main. Its squash diff against a stale merge base reintroduced two orphaned helper methods — missingDraftRequirements and formatMissing — into newsletter-manage.component.ts. Neither is called anywhere; missingDraftRequirements references bodyPersistable(), a signal that only existed as part of the (now-reverted) block-composer feature from #1133.

Fix: deletes both dead methods. Verified yarn check-types and yarn workspace lfx-one-ui build:production both pass locally.

No other files were affected by the same stale-merge-base issue (checked full diff between the revert commit and current main tip).

Refs: LFXV2-2386

missingDraftRequirements and formatMissing were reintroduced onto main
by PR #1198's squash merge, whose branch predated the #1133 revert.
Neither method is called anywhere, and missingDraftRequirements
referenced bodyPersistable, a signal that no longer exists post-revert
- breaking the release build (TS2339).

Refs: LFXV2-2386
Signed-off-by: David Deal <ddeal@linuxfoundation.org>
@dealako
dealako requested a review from a team as a code owner July 27, 2026 16:25
Copilot AI review requested due to automatic review settings July 27, 2026 16:25
@dealako dealako added the ai-assisted A task or activity that was supported by AI, such as CoPilot, ChatGPT, or other AI technology. label Jul 27, 2026
@cursor

cursor Bot commented Jul 27, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Deletion-only cleanup with no behavior change; only removes dead code that blocked the build.

Overview
Fixes a release build failure (TS2339: Property 'bodyPersistable' does not exist) by deleting orphaned code in newsletter-manage.component.ts.

The PR removes missingDraftRequirements and formatMissing, which were not called anywhere. missingDraftRequirements still referenced bodyPersistable(), a signal from the reverted block-composer work, so the file no longer compiles. Draft gating continues to use the existing canSaveDraft / bodyFilled computed signals unchanged.

Reviewed by Cursor Bugbot for commit 93e56fa. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 15dc05f5-4d08-4abc-a594-86bbd484b300

📥 Commits

Reviewing files that changed from the base of the PR and between a8f7591 and 93e56fa.

📒 Files selected for processing (1)
  • apps/lfx-one/src/app/modules/newsletters/newsletter-manage/newsletter-manage.component.ts
💤 Files with no reviewable changes (1)
  • apps/lfx-one/src/app/modules/newsletters/newsletter-manage/newsletter-manage.component.ts

Walkthrough

Removes two private helper methods that computed and formatted missing newsletter draft requirements. No replacement logic or public declarations were added.

Changes

Newsletter helper removal

Layer / File(s) Summary
Remove draft validation helpers
apps/lfx-one/src/app/modules/newsletters/newsletter-manage/newsletter-manage.component.ts
Deletes the private missingDraftRequirements() and formatMissing() methods; goToList now follows the preceding audience email logic.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: removing dead newsletter code reintroduced by a stale merge base.
Description check ✅ Passed The description directly explains the dead-code removal, root cause, and verification steps for the affected component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/LFXV2-2386-dead-newsletter-code

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes stale newsletter helper methods that caused the release build’s TS2339 failure.

Changes:

  • Deletes two unused draft-validation helpers.
  • Removes the orphaned bodyPersistable() reference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MRashad26 MRashad26 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code standards review: all clean. Pure dead-code removal — two unreachable private methods deleted, no logic changes, no new patterns introduced. Approving.

@dealako
dealako merged commit 9d640e4 into main Jul 27, 2026
13 checks passed
@dealako
dealako deleted the fix/LFXV2-2386-dead-newsletter-code branch July 27, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted A task or activity that was supported by AI, such as CoPilot, ChatGPT, or other AI technology.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants