dosubot[bot] commented on issue #36053:
URL: https://github.com/apache/superset/issues/36053#issuecomment-3520381866

   <!-- Answer -->
   In Superset, the filter state cache for dashboards is managed entirely by 
the frontend. The backend just returns whatever filter state the frontend last 
sent—it doesn't add properties like "name" itself. The reason you don't see the 
"name" property on the first API call is that the frontend doesn't include it 
in the initial filter state payload; it only appears after you interact with 
the filters, which triggers the frontend to update the payload and include 
"name" at that point.
   
   If you want "name" to always be present in the filter state from the start, 
the frontend code needs to explicitly add it when constructing the initial 
filter state before sending it to the backend. Right now, this doesn't happen 
by default during initialization—only after a filter change or update. There's 
no backend or automatic cache warm-up that will fix this; it has to be handled 
in the frontend logic that assembles and publishes the filter state (see the 
FilterBar component and related state management code for where this happens) 
[source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx#L80-L383).
   
   So, to "warm up" the cache with the "name" property, you'd need to ensure 
the frontend includes "name" in the filter state payload right from the 
start—likely by modifying the logic that builds the initial filter state object 
before it's sent to the backend. If you need a code pointer or example for 
where to inject this, let me know!
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/5a1937eb-a5bb-46c2-90fe-a7f93a1faf62?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/5a1937eb-a5bb-46c2-90fe-a7f93a1faf62?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/5a1937eb-a5bb-46c2-90fe-a7f93a1faf62?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/5a1937eb-a5bb-46c2-90fe-a7f93a1faf62?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/5a1937eb-a5bb-46c2-90fe-a7f93a1faf62?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/5a1937eb-a5bb-46c2-90fe-a7f93a1faf62?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/5a1937eb-a5bb-46c2-90fe-a7f93a1faf62?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36053)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to