Skip to content

Inconsistent empty-namespace handling in section view fetching causes wrong API requests and cache/key divergence #2906

@adityathebe

Description

@adityathebe

In src/pages/views/hooks/useAggregatedViewVariables.ts, the section query function fetches with section.namespace || "default" while the React Query key uses section.namespace and sectionData map keys use ${section.namespace ?? ""}:${section.name}; ViewContent then looks up with empty-string fallback. This creates a mismatch where sections with missing namespace are represented as "" in keys/lookups but fetched as "default" in /api/view/{namespace}/{name} paths, causing incorrect namespace requests for views not in default, plus duplicate or missed cache behavior/invalidation due to "" vs "default" key divergence for the same logical section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions