feat(settings): Extract settings interfaces#3216
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR moves settings-related TypeScript types into ChangesSettings type module extraction and import migration
Estimated code review effort: 2 (Simple) | ~15 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@server/interfaces/settings.ts`:
- Around line 108-117: Remove the duplicate ProxySettings declaration in
settings.ts so only one interface remains; keep the canonical ProxySettings
definition and delete the repeated identical copy to avoid dead duplicate code
and unintended interface merging. Use the ProxySettings symbol in the settings
interface block to locate both declarations and ensure any references still
point to the single remaining interface.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 44a0478a-5b94-4117-9019-f422d2800e32
📒 Files selected for processing (65)
server/api/metadata.tsserver/api/plexapi.tsserver/api/servarr/base.tsserver/api/tautulli.tsserver/entity/UserSettings.tsserver/interfaces/api/plexInterfaces.tsserver/interfaces/api/userSettingsInterfaces.tsserver/interfaces/settings.tsserver/job/schedule.tsserver/lib/availabilitySync.test.tsserver/lib/availabilitySync.tsserver/lib/email/index.tsserver/lib/notifications/agents/agent.tsserver/lib/notifications/agents/discord.tsserver/lib/notifications/agents/email.tsserver/lib/notifications/agents/gotify.tsserver/lib/notifications/agents/ntfy.tsserver/lib/notifications/agents/pushbullet.tsserver/lib/notifications/agents/pushover.tsserver/lib/notifications/agents/slack.tsserver/lib/notifications/agents/telegram.tsserver/lib/notifications/agents/webhook.tsserver/lib/notifications/agents/webpush.tsserver/lib/scanners/jellyfin/index.tsserver/lib/scanners/jellyfin/jellyfin.test.tsserver/lib/scanners/plex/index.tsserver/lib/scanners/radarr/index.tsserver/lib/scanners/radarr/radarr.test.tsserver/lib/scanners/sonarr/index.tsserver/lib/scanners/sonarr/sonarr.test.tsserver/lib/settings/index.tsserver/lib/settings/migrations/0001_migrate_hostname.tsserver/lib/settings/migrations/0002_migrate_apitokens.tsserver/lib/settings/migrations/0003_emby_media_server_type.tsserver/lib/settings/migrations/0004_migrate_region_setting.tsserver/lib/settings/migrations/0005_migrate_network_settings.tsserver/lib/settings/migrations/0006_remove_lunasea.tsserver/lib/settings/migrations/0007_migrate_arr_tags.tsserver/lib/settings/migrations/0008_migrate_blacklist_to_blocklist.tsserver/lib/settings/migrator.tsserver/routes/settings/index.tsserver/routes/settings/metadata.tsserver/routes/settings/radarr.tsserver/routes/settings/sonarr.tsserver/utils/customProxyAgent.test.tsserver/utils/customProxyAgent.tsserver/utils/restartFlag.tssrc/components/LanguageSelector/index.tsxsrc/components/ManageSlideOver/index.tsxsrc/components/RegionSelector/index.tsxsrc/components/Selector/CertificationSelector.tsxsrc/components/Settings/Notifications/NotificationsNtfy/index.tsxsrc/components/Settings/OverrideRule/OverrideRuleModal.tsxsrc/components/Settings/OverrideRule/OverrideRuleTiles.tsxsrc/components/Settings/RadarrModal/index.tsxsrc/components/Settings/SettingsJellyfin.tsxsrc/components/Settings/SettingsJobsCache/index.tsxsrc/components/Settings/SettingsMain/index.tsxsrc/components/Settings/SettingsNetwork/index.tsxsrc/components/Settings/SettingsPlex.tsxsrc/components/Settings/SettingsServices.tsxsrc/components/Settings/SettingsUsers/index.tsxsrc/components/Settings/SonarrModal/index.tsxsrc/components/Setup/index.tsxsrc/hooks/useUser.ts
gauthier-th
left a comment
There was a problem hiding this comment.
This increases maintainability and makes importing a settings interface in the client possible because the old settings file includes node only imports like
fs/promises.
I'm not sure to understand that. We were already importing types from server/lib/settings and it's fine?
|
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
Description
This PR extracts all the settings interfaces currently maintained in
server/lib/settings/index.tstoserver/interfaces/settings.ts. This increases maintainability and makes importing a settings interface in the client possible because the old settings file includes node only imports likefs/promises.This also is a prerequisite and result of splitting #1608 (see #1608 (comment)).
How Has This Been Tested?
As this only includes structural changes and does not touch any logic only sporadic testing was done:
Screenshots / Logs (if applicable)
Nothing changed for a user. The app still looks exactly the same and doesn't log anything else then before.
Checklist:
pnpm buildpnpm i18n:extractSummary by CodeRabbit