Skip to content

feat: show starred endpoints on Home regardless of state - #5601

Merged
norman-abramovitz merged 1 commit into
cloudfoundry:developfrom
nabramovitz:norm/feature/home-starred-endpoints
Jul 8, 2026
Merged

feat: show starred endpoints on Home regardless of state#5601
norman-abramovitz merged 1 commit into
cloudfoundry:developfrom
nabramovitz:norm/feature/home-starred-endpoints

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

What

Home previously double-filtered its cards to connected endpoints, so a starred endpoint that went down silently disappeared — absence read as "not favorited" rather than "down". Home can now answer both questions the issue names: "show me my connected endpoints" and "show me my starred endpoints, up or not".

Changes

Which-endpoints control

  • New header segmented control: Favorites | Connected | All (replaces the "Show connected endpoints" checkbox row that lived inside the layout menu — a content filter fused into a presentation menu, with the active mode invisible until opened).
    • Favorites: every starred endpoint (directly, or via starred child entities), any connection state.
    • Connected: every connected endpoint, favorites first (previous behavior).
    • All: every registered endpoint, any state, favorites first.
  • The persisted boolean preference migrates to the three-way mode; the deployment default (homeViewShowFavoritesOnly) keeps its meaning.

Disconnected presentation

  • A shown endpoint that is disconnected renders a Disconnected panel with a Connect button (the endpoints-page connect dialog) — its home card never loads, so no half-loaded or error card. Connecting while the card is on screen swaps the real card in.
  • Token expiry presents as Disconnected only when jetstream cannot mint a fresh session: /pp/v1/info now exposes token_expiry and token_renewable (refresh token present) per connected endpoint. Refresh-capable endpoints (UAA/SSO) renew transparently on use, so their hourly access-token expiry stays harmless — the rule exists for korifi-style pasted tokens (Support Korifi (Cloud Foundry on Kubernetes) as a CF endpoint #5489), which have no refresh and always end in expiry. (The issue text said expired → Disconnected flatly; that would have flapped every idle CF endpoint, hence the renewable gate.)

Sorting

  • Cards order by favorites group → endpoint type (renderPriority) → natural name (cf1 < cf2 < cf10; previously payload map order).
  • A direction icon attached to the segmented control flips the name order, tooltip explains what is sorted; direction never reorders groups or types. Persisted per user with the other Home prefs.
  • A divider separates the endpoint controls from the layout menu, which is back to column presets only.

Card layouts

  • Home cards gain a per-endpoint layout choice (homeCard.linksBelow): kubernetes renders its counts as a horizontal tile row with a Favorites/Shortcuts strip below; CF keeps the classic right-hand sidebar. Kube shortcuts moved to the definition level (like CF); the old in-card conditional shortcuts (Open Terminal / View Dashboard) needed async checks the sync definition hook can't express and remain reachable from the kubernetes pages.
  • Shortcut links wrap inside their column instead of overflowing the card edge.
  • Fixed a card double-render race (ngAfterViewInit + input rebind both creating the card while its lazy chunk import was in flight) — regression spec included.

Testing

  • 27 unit tests across home page, endpoint card, kube card, and dashboard prefs (mode filtering incl. ethereal favorite groups, expiry/renewable presentation, sort tiebreak + direction, pref migration, double-create race).
  • Full gate (lint + unit + production build + backend tests) green locally.
  • Live-verified against a dev stack with 4 CF + 5 kube endpoints: starred+disconnected card, korifi-shape expired token (refresh blanked in DB), renewable expiry staying connected, Connect dialog round-trip, mode switching, sort direction, card layouts at single/two/three-column widths.

Closes #5588

The Home page card list was double-filtered to connected endpoints,
so a starred endpoint that went down disappeared instead of reading
as "down". The mode is now a header segmented control — Favorites |
Connected | All — replacing the checkbox row that fused a content
filter into the layout menu and hid the active mode:

- Favorites: every starred endpoint (directly, or via starred child
  entities) regardless of connection state.
- Connected: every connected endpoint, favorites sorted first.
- All: every registered endpoint, any state, favorites first.

The persisted boolean pref migrates to the new three-way mode.

A shown endpoint that is disconnected renders a Disconnected panel
with a Connect button (the endpoints-page connect dialog) and never
loads its home card — no half-loaded or error card. Connecting while
the card is on screen swaps the real card back in.

An endpoint whose stored token has expired presents as Disconnected
only when jetstream cannot mint a fresh session: /pp/v1/info now
carries token_expiry and token_renewable (refresh token present) per
connected endpoint. Refresh-capable endpoints renew transparently on
use, so their access-token expiry stays harmless — expiry-as-
disconnected matters for korifi-style pasted tokens (cloudfoundry#5489), which
have no refresh and always end in expiry.

Cards sort favorites group, then endpoint type (renderPriority), then
natural name (cf1 < cf2 < cf10). An icon attached to the segmented
control flips the name order (tooltip explains the sort); direction
never reorders groups or types and persists with the other Home
preferences. A divider separates the endpoint controls from the
layout menu, which is back to column presets only.

Home cards gain a per-endpoint layout choice (homeCard.linksBelow):
kubernetes uses a Favorites/Shortcuts strip below its counts (which
now sit in a horizontal tile row, with shortcuts registered at the
definition level like CF); CF keeps the classic right sidebar. The
kube card's conditional Open Terminal / View Dashboard shortcuts
needed async checks the definition hook cannot express and remain
reachable from the kubernetes pages. Shortcut links wrap inside
their column instead of overflowing the card edge.

Closes cloudfoundry#5588

@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.

LGTM - Did Live review

@norman-abramovitz
norman-abramovitz merged commit 1585e4f into cloudfoundry:develop Jul 8, 2026
18 checks passed
@nabramovitz
nabramovitz deleted the norm/feature/home-starred-endpoints branch July 8, 2026 15:16
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.

Home: show starred endpoints regardless of connection state

2 participants