Skip to content

Clean up unused methods and helpers in common config services, storage, and assert utils #9195

Closed

Description

@aglinxinyuan

Task Summary

In frontend/src/app/common/:

  1. user-config.service.ts: Drop unread getDict() getter and private dictionaryChangedSubject which has zero observers or external subscriptions.
  2. gui-config.service.ts: Drop uncalled source(name: ConfigSource) method which was superseded by memoized configuration getters.
  3. storage.ts: Drop uncalled localRemoveObject and sessionRemoveObject utility functions.
  4. assert.ts: Drop uncalled assert function.
  5. Adjust corresponding unit tests in .spec.ts files to reflect the removed methods.

This is a pure refactor with no behavior change.

Task Type

  • Refactor / Cleanup

Activity

  1. github-actions commented on Oct 27, 2026

    @github-actions
    Contributor

    👋 Thanks for opening this issue, @aglinxinyuan!

    It looks like the issue description doesn't quite follow our template yet:

    • This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.

    Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.

    You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow.

  2. sunny-kavixo commented on Nov 11, 2026

    @sunny-kavixo
    Contributor

    Hi maintainers! I'd like to take this cleanup task. I'll verify that the listed helpers are genuinely unused, remove only dead code, update affected unit tests, and run relevant frontend checks. I'll keep the change strictly behavior-preserving.

  3. aglinxinyuan commented on Nov 12, 2026

    @aglinxinyuan
    ContributorAuthor

    @sunny-kavixo thanks — go ahead. Comment /take on its own (exactly that) to assign the issue to yourself.

    The list is shorter than the description says, because two items have already landed: dictionaryChangedSubject in #8817, and localRemoveObject / sessionRemoveObject in #9256. What's left is UserConfigService.getDict(), GuiConfigService.source() and assert in assert.ts — on main each is called only from its own spec.

    One note on the specs: user-config.service.spec.ts reads getDict() to check that the cached dictionary follows fetch, set, delete, login and logout. Let's keep that coverage through behavior we can still observe — e.g. delete() sends a request only for a key in the cache — rather than dropping those cases.

  4. sunny-kavixo commented on Nov 14, 2026

    @sunny-kavixo
    Contributor

    /take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions