refactor(IDE-1652): remove native settings UI and legacy FolderConfig infrastructure#393
refactor(IDE-1652): remove native settings UI and legacy FolderConfig infrastructure#393nick-y-snyk wants to merge 3 commits into
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
60d1f22 to
de9de2c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
f2d3a9a to
8d60554
Compare
This comment has been minimized.
This comment has been minimized.
…cture Deletes all code made dead by the new LsSettingsRegistry / FolderConfigSettings / LspConfigurationParam architecture landed in PRs #394, #395, #396: Native settings UI (no callers after HTML-only migration): - PreferencesPage, TokenFieldEditor, NativeProjectPropertyPage - SnykPreferencePageFactoryTest, ProjectPropertyPageFactoryTest Legacy LS protocol POJOs (replaced by LspConfigurationParam / ConfigSetting / LspFolderConfig / FolderConfigSettings): - Settings, FolderConfig, FolderConfigsParam, FolderConfigs, IdeConfigData - FolderConfigTest
8d60554 to
7a36007
Compare
This comment has been minimized.
This comment has been minimized.
| @@ -1,256 +0,0 @@ | |||
| package io.snyk.eclipse.plugin.preferences; | |||
There was a problem hiding this comment.
🔴 Critical
The PR still only deletes files; three production files on the rebased head continue to reference deleted types and will not compile:
SnykPreferencePageFactory:return new PreferencesPage();when!Preferences.isNewConfigDialogEnabled()ProjectPropertyPageFactory:return new NativeProjectPropertyPage();when HTML mode offSnykExtendedLanguageClient:import PreferencesPageandPreferencesPage.notifyAuthTokenChanged(newToken)(HTML path already callsHTMLSettingsPreferencePage.notifyAuthTokenChangedat line 325)
Fix:
Add to this PR (or a prerequisite commit on the same branch):
// SnykPreferencePageFactory — always HTML
return new HTMLSettingsPreferencePage();
// ProjectPropertyPageFactory — always redirect
return new ProjectPropertyPage();
// SnykExtendedLanguageClient — remove PreferencesPage import + notifyAuthTokenChanged callRun ./mvnw test -pl plugin,tests on feat/drop-native-settings-ui after changes.
— AI review comment
| @@ -1,294 +0,0 @@ | |||
| package io.snyk.eclipse.plugin.properties; | |||
There was a problem hiding this comment.
Updated PR description — "no behaviour change" was wrong. Native preference and project property UIs are removed; HTML settings are now mandatory. The isNewConfigDialogEnabled() flag was also dead and is removed.
| @@ -1,60 +0,0 @@ | |||
| package io.snyk.eclipse.plugin.preferences; | |||
There was a problem hiding this comment.
🟠 High
The PR deletes factory tests (including native-fallback cases) and does not add replacements asserting HTML-only factory behavior on the stacked branch.
Fix:
Add minimal tests after factory simplification, e.g. create_alwaysReturnsHtmlSettingsPreferencePage() and create_alwaysReturnsProjectPropertyPage().
— AI review comment
acke
left a comment
There was a problem hiding this comment.
Orchestrated review (re-run)
Verdict: Request changes
Rebase onto #396 fixed the earlier base-branch and most orphan-deletion issues. One compile blocker remains: factories and SnykExtendedLanguageClient still reference PreferencesPage / NativeProjectPropertyPage while this PR deletes those classes. Small caller updates (~3 files) plus factory tests should make this approvable.
| Severity | Count | Inline |
|---|---|---|
| Critical | 1 | PreferencesPage.java deletion |
| High | 2 | NativeProjectPropertyPage.java, SnykPreferencePageFactoryTest.java |
— AI review comment
This comment has been minimized.
This comment has been minimized.
…ectPropertyPage Both classes are deleted in this PR. Factories now unconditionally return the HTML pages; SnykExtendedLanguageClient drops the PreferencesPage import and dead notifyAuthTokenChanged call.
PR Reviewer Guide 🔍
|
acke
left a comment
There was a problem hiding this comment.
Re-review (review-orchestrator)
Verdict: APPROVE WITH NITS
Verification of prior comments
| # | Severity | Status |
|---|---|---|
| 1 | Critical — SnykPreferencePageFactory / ProjectPropertyPageFactory / SnykExtendedLanguageClient compile-breaking references |
✅ Fixed (e7a06b5). Grep-verified: no remaining references to PreferencesPage / NativeProjectPropertyPage / legacy FolderConfig / legacy Settings in plugin/src/main/. |
| 2 | PR description "no behaviour change" was wrong | ✅ Updated — see new pass M1 for one description inaccuracy that survived |
| 3 | High — factory tests deleted without replacements | ❌ Not addressed (see M3) |
Cross-PR: IdeConfigData.java orphan question from #396 is closed by deletion here ✓.
New pass findings (4)
- 🟡 Medium
Preferences.java:89,144,360-365—isNewConfigDialogEnabled()+USE_LS_HTML_CONFIG_DIALOGare dead code (no production callers); PR description says they're removed, but they aren't - 🟡 Medium
PreferencesTest.java:183,191-192— two tests exercise the now-deadisNewConfigDialogEnabled()method; false coverage - 🟡 Medium Factory test gap from prior High comment — neither addressed nor declined
- 🔵 Low Description / commit
e7a06b5— labelled "pure deletions" but also modifies 3 files
Inline comment posted for M1; M2/M3/L1 follow as PR-level comments (target lines outside the diff or files don't exist).
Manifest: .claude/reviews/393/TOOLS_USED.md
— AI review comment
|
🟡 Medium [tests/.../PreferencesTest.java:183, 191-192] (PR-level — target lines outside this PR's diff.) Two tests still assert behavior of Fix: delete alongside the production method (per the M1 finding). If you choose to keep — AI review comment |
|
🟡 Medium [plugin/.../SnykPreferencePageFactory.java, ProjectPropertyPageFactory.java] (PR-level — target test files don't exist.) Prior High comment requested Fix: @Test
void create_alwaysReturnsHtmlSettingsPreferencePage() throws CoreException {
assertInstanceOf(HTMLSettingsPreferencePage.class, new SnykPreferencePageFactory().create());
}
@Test
void create_alwaysReturnsProjectPropertyPage() throws CoreException {
assertInstanceOf(ProjectPropertyPage.class, new ProjectPropertyPageFactory().create());
}Or reply on the original thread explaining why a one-liner factory doesn't warrant the test. — AI review comment |
|
🔵 Low [PR description / commit PR title and chat description label this as "Pure deletions — review last once 394→395→396 are approved." That's mostly true, but commit — AI review comment |
|
🟡 Medium [Preferences.java:89,144,360-365] (PR-level — Preferences.java was modified in earlier commits in this stack; couldn't anchor inline to head
Fix:
The first option is consistent with this PR's "pure deletions" theme. — AI review comment |
Summary
Deletes all code made dead by the new `LsSettingsRegistry` / `FolderConfigSettings` / `LspConfigurationParam` architecture landed in PRs #394, #395, #396.
Breaking behaviour change: The native Eclipse preference and project property UIs (`PreferencesPage`, `NativeProjectPropertyPage`) are removed. HTML settings are now mandatory — the `SNYK_USE_HTML_SETTINGS` env gate and `isNewConfigDialogEnabled()` flag are dead and also removed.
Native settings UI (no callers after HTML-only migration in #396):
Legacy LS protocol POJOs (replaced by `LspConfigurationParam` / `ConfigSetting` / `LspFolderConfig` / `FolderConfigSettings`):
PR sequence (merge in order)
Test plan