Skip to content

feat: Align conditional rendering with conditional fetching #19967

@rozatoo

Description

@rozatoo

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

Many features are conditionally rendered by validating user enabled features or global config, but some of these are fetched from the backend regardless of permissions. This produces http errors which are avoidable. These request cause, although small, load on the backend, and are additionally then logged as failed requests in Open Telemetry, causing noise.

Calls where this is the case (when that feature is disabled):

  • Channels: Are called onMount and cause an 401 each load
  • API Keys: Are called when users navigate to Settings > Account and causes a 404 each time

Desired Solution you'd like

If a feature is deemed unavailable, and the frontend does not render the components, don't try to fetch the data for the component. No changes of backend validation needed.

Alternatives Considered

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions