Skip to content

Apps SDK: Widget HTML caching or locked causes stale UI and broken assets; requires approval cycle for UI updates #206

@Varun-M-G-AX

Description

@Varun-M-G-AX

Summary

We are facing issues with UI updates and asset loading in ChatGPT Apps SDK due to how widget HTML templates are cached. This leads to broken UI or stale UI and forces us into repeated app resubmission/approval cycles for UI-only changes.


Problem

  1. The widget template (ui://widget/*.html) appears to be cached by ChatGPT and treated as a snapshot.

  2. The HTML template loads external JS/CSS bundles using <script src> and <link>.

  3. After a new deployment:

    • Cached HTML continues to reference old asset URLs (e.g., hashed files).
    • If those assets are no longer available → UI breaks.
  4. Even when assets are retained, UI changes are not reflected until:

    • A new app version is submitted and approved, or
    • The app/session is manually refreshed.

Impact

  • Broken UI when old assets are removed or replaced
  • Stale UI when assets are retained
  • Slow iteration due to mandatory approval cycle for UI changes
  • Difficult to maintain production stability without CDN-like asset retention

What We Tried

1. Hashed assets (default build)

  • Example: catalog-13s7.js
  • Result: Cached HTML points to old hashes → missing asset errors

2. CDN / asset retention

  • Keeping old hashed assets available

  • Result:

    • Prevents breakage
    • Does NOT solve stale UI
    • Adds infra complexity

3. Inline assets (JS + CSS inside HTML)

  • Result:

    • Prevents breakage (self-contained HTML)
    • UI still stale until refresh or new version

4. Versioned template URI

ui://widget/catalog-v2.html
  • Result:

    • Forces fresh HTML load
  • Issue:

    • Requires new app submission and approval for every UI change

Current Understanding

From documentation and behavior:

  • Template URI acts as a cache key
  • HTML is treated as a static resource
  • ChatGPT does not re-fetch updated HTML dynamically
  • Asset URLs referenced in HTML must remain valid

Key Limitation

There is currently no way to:

  • Update UI without submitting a new app version

  • Invalidate or refresh cached HTML templates

  • Safely iterate on UI without either:

    • approval delays, or
    • maintaining all historical assets

Questions

  1. Is there a recommended way to update widget UI without requiring app resubmission and approval?
  2. Are there plans to support template cache invalidation or dynamic refresh?
  3. What is the officially recommended production strategy for handling asset versioning and caching?
  4. Is inline HTML considered an acceptable long-term pattern, or should external assets always be used?

Expected Outcome

We are looking for guidance or platform support to enable:

  • Faster UI iteration cycles
  • Safe deployments without breaking existing sessions
  • Clear best practices for asset hosting and caching

Thanks for your help — this is currently a blocker for production iteration.

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