dify/web/app/components/billing
yyh 72b96ba972
refactor(web): remove mutateCurrentWorkspace from AppContext, use service-layer invalidation hook
The previous implementation stored query invalidation logic (mutateCurrentWorkspace) and
isFetching state (isValidatingCurrentWorkspace) in React Context, causing QuotaPanel to
flash a loading spinner on every settings tab switch due to a useEffect calling
invalidateQueries on mount. This violated separation of concerns and React best practices.

- Remove mutateCurrentWorkspace and isValidatingCurrentWorkspace from AppContext
- Add useInvalidateCurrentWorkspace hook in service layer (consistent with project pattern)
- Remove redundant useEffect + invalidateQueries in ModelProviderPage
- QuotaPanel now derives loading from !currentWorkspace.id instead of external prop
- Update custom-web-app-brand to use the new service-layer hook
2026-02-09 18:32:15 +08:00
..
annotation-full test: add comprehensive tests (#31649) 2026-01-29 11:16:26 +08:00
apps-full-in-dialog refactor(web): remove mutateCurrentWorkspace from AppContext, use service-layer invalidation hook 2026-02-09 18:32:15 +08:00
billing-page test: add comprehensive tests (#31649) 2026-01-29 11:16:26 +08:00
header-billing-btn chore: remove useless __esModule (#30366) 2025-12-30 15:37:16 +08:00
partner-stack chore: remove useless __esModule (#30366) 2025-12-30 15:37:16 +08:00
plan feat: Human Input Node (#32060) 2026-02-09 14:57:23 +08:00
plan-upgrade-modal chore: remove useless __esModule (#30366) 2025-12-30 15:37:16 +08:00
pricing test: add comprehensive tests (#31649) 2026-01-29 11:16:26 +08:00
priority-label refactor(i18n): use JSON with flattened key and namespace (#30114) 2025-12-29 14:52:32 +08:00
progress-bar feat: enhance ProgressBar and UsageInfo for storage mode (#31273) 2026-01-21 14:04:33 +08:00
trigger-events-limit-modal chore: remove useless __esModule (#30366) 2025-12-30 15:37:16 +08:00
upgrade-btn refactor(i18n): use JSON with flattened key and namespace (#30114) 2025-12-29 14:52:32 +08:00
usage-info feat: enhance ProgressBar and UsageInfo for storage mode (#31273) 2026-01-21 14:04:33 +08:00
utils feat: Human Input Node (#32060) 2026-02-09 14:57:23 +08:00
vector-space-full feat: enhance ProgressBar and UsageInfo for storage mode (#31273) 2026-01-21 14:04:33 +08:00
config.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
type.ts feat: Human Input Node (#32060) 2026-02-09 14:57:23 +08:00