Skip to content

refactor: share cluster stores across resource views - #5

Merged
GT020 merged 9 commits into
mainfrom
store
Nov 6, 2026
Merged

GT020 merged 9 commits into
mainfrom
store

Conversation

@GT020

@GT020 GT020 commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Replaces per-view list/watch subscriptions with a shared per-kind store engine.

What changed

  • One shared store per cluster epoch and resource kind, used by every view.
  • Refcounted watches: first subscriber starts, last subscriber stops; cached data remains.
  • Full typed Kubernetes objects plus table summaries in the store.
  • Store-backed details with a single GET fallback; no per-object detail watches.
  • Kubernetes sendInitialEvents streaming initial state with list fallback.
  • Namespaces and other cluster-scoped kinds bypass the global all-namespaces watch probe.
  • Watch-only updates: polling, poll rates, and poll preferences were removed.
  • Forbidden watch/list responses stop retrying and keep already-listed data.
  • Repository-owned terminal sessions supporting detach/reattach and output replay.
  • Removed the legacy watcher, old summary-only ResourceStore, and boilerplate per-kind subscription wrappers.

Verification

  • cargo clippy --all-targets clean
  • cargo test --bin krusty — 113 passed

GT020 added 9 commits November 3, 2026 17:44
Replace per-view list/watch subscriptions with a shared per-kind store engine, add polling fallback, store-backed details, credential capability probes, and repository-owned terminal sessions. Remove legacy watchers and per-kind subscription wrappers.
Remember watch denials per cluster epoch, start denied kinds in polling, and let cluster-scoped kinds such as Namespaces bypass the global all-namespaces watch probe.
Drop poll preferences, poll-rate UI, and polling fallback. Keep listed data when a watch is denied and retry the watch instead of marking the store failed.
Treat watch and list 403 responses as permanent for the current task so forbidden resources keep their listed data without an automatic retry loop.
# Conflicts:
#	src/models/resources/store.rs
#	src/repository/mod.rs
#	src/repository/resources/detail.rs
#	src/repository/resources/nodes/mod.rs
#	src/repository/resources/pods/mod.rs
#	src/repository/resources/watcher.rs
#	src/repository/watch_prefs.rs
#	src/view_models/resources/cron_jobs/mod.rs
#	src/view_models/resources/endpoints/mod.rs
#	src/view_models/resources/ingresses/mod.rs
#	src/view_models/resources/namespaces/mod.rs
#	src/view_models/resources/node/mod.rs
#	src/view_models/resources/overview.rs
#	src/view_models/resources/persistent_volumes/mod.rs
#	src/view_models/resources/pod_disruption_budgets/mod.rs
#	src/view_models/resources/replication_controllers/mod.rs
#	src/view_models/resources/secrets/mod.rs
#	src/view_models/resources/services/mod.rs
#	src/view_models/resources/storage_classes/mod.rs
@GT020
GT020 merged commit ae4ed20 into main Nov 6, 2026
5 checks passed
GT020 added a commit that referenced this pull request Nov 10, 2026
* perf: optimize watch fetch flow and retained-ui updates

* perf: batch streaming initial events for large lists

* Revert "perf: batch streaming initial events for large lists"

This reverts commit 857d966.

* docs: remove watch and UI comparison notes

* refactor: share cluster stores across resource views

Replace per-view list/watch subscriptions with a shared per-kind store engine, add polling fallback, store-backed details, credential capability probes, and repository-owned terminal sessions. Remove legacy watchers and per-kind subscription wrappers.

* fix: poll immediately when watch is denied

Remember watch denials per cluster epoch, start denied kinds in polling, and let cluster-scoped kinds such as Namespaces bypass the global all-namespaces watch probe.

* refactor: remove polling and keep watch-only stores

Drop poll preferences, poll-rate UI, and polling fallback. Keep listed data when a watch is denied and retry the watch instead of marking the store failed.

* fix: stop retrying forbidden resource watches

Treat watch and list 403 responses as permanent for the current task so forbidden resources keep their listed data without an automatic retry loop.
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