Skip to content

[Task]: Lazy-load inactive ModelSettings side panels #19674

Description

@DeJeune

Task Type

Refactor

Context

src/renderer/pages/settings/ModelSettings/ModelSettings.tsx statically imports the full TranslateSettings and TopicNamingSettings panels. These panels are only used after the matching sidebar selection, and are unreachable in onboarding because showSettingsButton={false}. This violates bundle-dynamic-imports and bundle-conditional.

Normal model settings and onboarding therefore load translation-language management, preference hooks, and panel dependencies that are usually closed and sometimes impossible to open.

Definition of Done

  • Lazy-load TranslateSettings and TopicNamingSettings only for the active panel.
  • Ensure showSettingsButton={false} does not load either panel module.
  • Preserve panel navigation and close behavior.
  • Add or update focused tests for conditional panel loading where behavior changes.

References

  • Code: src/renderer/pages/settings/ModelSettings/ModelSettings.tsx
  • Code: src/renderer/windows/main/onboarding/OnboardingPage.tsx
  • Rules: bundle-dynamic-imports, bundle-conditional

This task is not reserved for the core team. Community contributions are welcome — if you would like to pick it up, leave a comment before you start so we can avoid duplicated work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Dev TeamOpened by a Cherry Studio team memberinternal-teamInternal team request, initiative, or implementation task

    Type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions