Skip to content

fix(home): restore favorite/recent display-name auto-refresh (signal-native) - #5426

Merged
norman-abramovitz merged 5 commits into
cloudfoundry:developfrom
nabramovitz:fix/favorite-recent-name-refresh
Jun 6, 2026
Merged

fix(home): restore favorite/recent display-name auto-refresh (signal-native)#5426
norman-abramovitz merged 5 commits into
cloudfoundry:developfrom
nabramovitz:fix/favorite-recent-name-refresh

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Summary

Restores the favorite/recent display-name auto-refresh that was lost when the ngrx requestData engine was removed — renaming an app/org/space/endpoint in CF now updates its favorite and recent cards again, signal-natively.

  • New FreshEntityNameService (core) resolves a favorite/recent's freshly-fetched name from the per-endpoint signal stores: EndpointDataService.apps()/orgs()/spaces() via EndpointDataRegistry.peek() (CF entities) and EndpointsSignalService.endpoints() (endpoints). Returns null when no fresh data is loaded.
  • favorites-meta-card renders freshName ?? storedName and persists a corrected name via UserFavoritesDataService.updateMetadata on a delta.
  • recent-entities writes corrected names back through RecentlyVisitedDataService.set; the display updates via the existing state pipeline.
  • Signal-native: no central driver (the old pattern that broke), no new store. Uses the side-effect-free peek(), so names refresh wherever the endpoint's data has been loaded (e.g. the home page); elsewhere the last-known name is shown.

Scope is the full favoritable/recent set — applications, organizations, spaces, and endpoints.

Test Plan

  • Unit tests (vitest): FreshEntityNameService (7), favorites-meta-card (6), recent-entities (3); full core project 648 pass.
  • make check gate green (lint + production build + all frontend/backend suites).
  • Manual: favorite an app/org/space, rename it in CF, reload Home → favorite + recents show the new name; hard-reload → name persists.

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basic testing and LGTM

@norman-abramovitz
norman-abramovitz merged commit a8154db into cloudfoundry:develop Jun 6, 2026
12 checks passed
@nabramovitz
nabramovitz deleted the fix/favorite-recent-name-refresh branch June 6, 2026 16:09
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.

2 participants