COO-1725: fix: Troubleshooting panel cannot focus on node URLs.#224
COO-1725: fix: Troubleshooting panel cannot focus on node URLs.#224alanconway wants to merge 1 commit intoopenshift:mainfrom
Conversation
alanconway
commented
Mar 16, 2026
- Prefer core resources when matching paths to resources.
- Avoid showing an "Empty Query" while a search is in progress.
|
@alanconway: This pull request references COO-1725 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdjusts Korrel8rPanel mount/fetch logic and focus/tooltip behavior; enhances k8s.findResource to accept G Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
311c1f3 to
0588c9c
Compare
|
/cc @PeterYurkovich |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@web/src/korrel8r/k8s.ts`:
- Around line 186-198: The code path claims to handle plain Kind but only
handles G~V~K and resource path; add a plain-Kind lookup before the
resource-path loop: after const [g,v,k] = resource.split('~') and when k is
falsy, attempt to match resource against cached model kinds (e.g., iterate
getCachedResources()?.models and compare resource to m.kind, using
case-insensitive match) and return a core model first (m.apiGroup falsy) or the
first matched model; if no kind match, then proceed with the existing
m.path-based logic and existing preference for core models; use existing helpers
findGVK and getCachedResources to locate models.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2f38c716-54e5-4aa0-a2a2-587e983c2396
📒 Files selected for processing (5)
web/src/__tests__/all-domains.spec.tsweb/src/components/Korrel8rPanel.tsxweb/src/hooks/useDomains.tsxweb/src/korrel8r/all-domains.tsweb/src/korrel8r/k8s.ts
💤 Files with no reviewable changes (2)
- web/src/tests/all-domains.spec.ts
- web/src/korrel8r/all-domains.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- web/src/hooks/useDomains.tsx
0588c9c to
ce5c076
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@web/src/components/Korrel8rPanel.tsx`:
- Around line 74-86: The effect that seeds the initial result should only run
once on mount to avoid overwriting user actions: replace the current
multi-dependency React.useEffect with a guarded-once pattern (e.g., add an
initializedRef via useRef(false) and an initialLocationQueryRef =
useRef(locationQuery) or similar) and inside the effect check
initializedRef.current before running the logic, set initializedRef.current =
true after dispatching, and stop including reactive deps like search?.queryStr
or result so the dispatchSearch/dispatchResult call only happens on the first
render; keep references to defaultSearch, locationQuery (captured once),
dispatchSearch and dispatchResult to locate where to apply this change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ef67ea93-2b22-4529-b923-7bdf6d58caba
📒 Files selected for processing (5)
web/src/__tests__/all-domains.spec.tsweb/src/components/Korrel8rPanel.tsxweb/src/hooks/useDomains.tsxweb/src/korrel8r/all-domains.tsweb/src/korrel8r/k8s.ts
💤 Files with no reviewable changes (2)
- web/src/korrel8r/all-domains.ts
- web/src/tests/all-domains.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- web/src/hooks/useDomains.tsx
- web/src/korrel8r/k8s.ts
- Prefer core resources when matching paths to resources. - Avoid showing an "Empty Query" while a search is in progress. - Enable focus button if result is an error. - Merge all-domains into useDomains - simpler & more readable.
ce5c076 to
991005e
Compare
|
@alanconway: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alanconway, jgbernalp The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |