Skip to content

fix: show inventory of the selected resource - #619

Merged
nklmilojevic merged 1 commit into
mainfrom
fix/618-selected-resource-inventory
Sep 16, 2026
Merged

nklmilojevic merged 1 commit into
mainfrom
fix/618-selected-resource-inventory

Conversation

@nklmilojevic

Copy link
Copy Markdown
Owner

The GitOps view showed the owner's inventory when the selected resource had a Flux owner label. Read .status.inventory.entries and spec.kubeConfig from the selected resource so that Managed resources shows the resources it manages.

Add a regression test that opens the view through the command input and refreshes it through the keyboard. The test checks the selected inventory, navigation with a remote parent, and removal of old entries when inventory is absent. Update the feature documentation.

Validation: just check passed, including formatting, clippy, and tests.

Closes #618

The GitOps report read inventory from the owner, so a selected Kustomization showed resources managed by its parent. Read inventory from the selected resource on open and refresh.

Closes #618
@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown

Greptile Summary

The PR corrects the GitOps Managed resources section to use the freshly read selected resource rather than its resolved Flux owner.

  • Reads .status.inventory.entries and spec.kubeConfig from the selected resource.
  • Adds regression coverage for opening, refreshing, navigation, and clearing stale inventory entries.
  • Updates the feature documentation to describe the selected-resource behavior.

Confidence Score: 5/5

The PR appears safe to merge, with the implementation, regression coverage, and documentation aligned on selected-resource inventory behavior.

No actionable failures remain; the changed lookup uses the same freshly fetched selected object for both initial display and refresh, while existing inventory parsing continues to handle remote configuration and absent entries.

Important Files Changed
Filename Overview
src/app/gitops.rs Switches inventory findings from the resolved Flux owner to the freshly read selected resource.
src/app/tests.rs Adds regression coverage for selected inventory, remote-parent navigation, refresh, and absent inventory.
docs/features.md Updates GitOps inventory documentation to match selected-resource semantics.

Reviews (1): Last reviewed commit: "fix: show inventory of the selected reso..." | Re-trigger Greptile

@nklmilojevic
nklmilojevic merged commit 23101ef into main Sep 16, 2026
4 checks passed
@nklmilojevic
nklmilojevic deleted the fix/618-selected-resource-inventory branch September 16, 2026 14:51
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.

bug: Flux inventory (managed resources) shows inventory of Owner, not selected resource

1 participant