Skip to content

Ignore stale asynchronous cost estimates - #1884

Open
matthewpenkala wants to merge 1 commit into
storytold:mainfrom
matthewpenkala:contrib/fix-cost-estimate-freshness
Open

Ignore stale asynchronous cost estimates#1884
matthewpenkala wants to merge 1 commit into
storytold:mainfrom
matthewpenkala:contrib/fix-cost-estimate-freshness

Conversation

@matthewpenkala

Copy link
Copy Markdown

Summary

  • Centralize asynchronous estimate request sequencing in a shared lifecycle helper.
  • Make only the newest image, video, or splat estimate authoritative.
  • Clear obsolete credits immediately when replacement work begins or a selection becomes ineligible.
  • Reset loading and quote state on unmount, missing/unsupported models, endpoint failures, and non-success responses.
  • Re-estimate when a same-ID model receives refreshed catalog capabilities.

Why

An older network response could arrive after a newer selection and overwrite the current quote. Several early-return and error paths could also leave stale credits or loading state visible.

Validation

  • Focused lifecycle suite: 27/27 passed.
  • Coverage includes out-of-order responses, selection removal, same-ID capability refresh, unmount, error, and inactive-page transitions.
  • git diff --check and contribution-scope scans pass.

Origin and scope

This change was isolated from a broader downstream integration and reduced to a generic, self-contained upstream contribution. Private deployment/release-specific material and artifacts are intentionally excluded.

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

👷 Deploy request for artcraft-webapp pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit e0ed898

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for storyteller-docs ready!

Name Link
🔨 Latest commit e0ed898
🔍 Latest deploy log https://app.netlify.com/projects/storyteller-docs/deploys/6a7b93729acda400077943b8
😎 Deploy Preview https://deploy-preview-1884--storyteller-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for artcraft-dashboard ready!

Name Link
🔨 Latest commit e0ed898
🔍 Latest deploy log https://app.netlify.com/projects/artcraft-dashboard/deploys/6a7b93723ee07100082b50ba
😎 Deploy Preview https://deploy-preview-1884--artcraft-dashboard.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@matthewpenkala

Copy link
Copy Markdown
Author

@bflatastic When you have bandwidth, would you mind reviewing this and the complementary aspect-default change in #1885? These are the two small shared-consumer prerequisites before I rebase draft #1892. I rechecked both against current main after #1904: they remain patch-unique, mergeable, green, and the intervening upstream changes touch disjoint files. I am intentionally holding the dependent series until these land or receive maintainer direction.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant