openk8s 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,7 +12,7 @@ openk8s is a keyboard-driven TUI for browsing and managing Kubernetes clusters,
12
12
 
13
13
  | Tool | Required | Notes |
14
14
  |------|----------|-------|
15
- | [kubectl](https://kubernetes.io/docs/tasks/tools/) | yes | Must be configured with a valid kubeconfig |
15
+ | [kubectl](https://kubernetes.io/docs/tasks/tools/) | yes | >= 1.36.1, must be configured with a valid kubeconfig |
16
16
  | [helm](https://helm.sh/) | no | Enables HelmRelease management |
17
17
  | [bun](https://bun.sh/) | yes | Required at runtime to execute the app |
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openk8s",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A terminal UI for Kubernetes",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -94,7 +94,18 @@ export function reducer(state: AppState, action: AppAction): AppState {
94
94
  selectedKind: action.selectedKind,
95
95
  };
96
96
  case "setSelectedKind":
97
- return { ...state, selectedKind: action.kind, resourceFilter: "", selectedResourceNames: [] };
97
+ return {
98
+ ...state,
99
+ selectedKind: action.kind,
100
+ resourceFilter: "",
101
+ selectedResourceNames: [],
102
+ resources: [],
103
+ resourcesStatus: "loading",
104
+ selectedResourceDetail: undefined,
105
+ selectedResourceDetailStatus: "idle",
106
+ events: [],
107
+ eventsStatus: "idle",
108
+ };
98
109
  case "setResourcesStatus":
99
110
  return { ...state, resourcesStatus: action.status };
100
111
  case "setResources":
@@ -43,17 +43,16 @@ export function ResourceRows({
43
43
 
44
44
  return (
45
45
  <scrollbox ref={scrollRef} onMouseDown={onActivate} style={{ flexGrow: 1 }}>
46
- {resources.length === 0 ? (
46
+ {status === "loading" ? (
47
+ <text fg={TEXT_SUBTLE} attributes={TextAttributes.DIM}>
48
+ {"\u27F3 Refreshing..."}
49
+ </text>
50
+ ) : resources.length === 0 ? (
47
51
  <text fg={TEXT_SUBTLE} attributes={TextAttributes.DIM}>
48
52
  {resourceEmptyState(status, filter)}
49
53
  </text>
50
54
  ) : (
51
55
  <box style={{ flexDirection: "column", width: "100%" }}>
52
- {status === "loading" ? (
53
- <text fg={TEXT_SUBTLE} attributes={TextAttributes.DIM}>
54
- {"\u27F3 Refreshing..."}
55
- </text>
56
- ) : null}
57
56
  {resources.map((resource) => {
58
57
  const selected = resource.ref.name === selectedName;
59
58
  const marked = selectedNames.includes(resource.ref.name);
@@ -166,8 +166,6 @@ export function useDataFetching(
166
166
  state.kubectlAvailable,
167
167
  clusterPollTick,
168
168
  manualRefreshNonce,
169
- state.activeNamespace,
170
- state.selectedKind,
171
169
  ]);
172
170
 
173
171
  // Load the resource list. Bug-fix: removed state.resources.length and state.selectedResourceName