Skip to content

Conversation

@eranco74
Copy link
Collaborator

@eranco74 eranco74 commented Dec 2, 2025

This fix Prevents the failure to display large cluster and event lists by imposing a 10-item limit via the system prompt.

'There are 13 clusters available. Showing the first 10 below. Would you
  like to filter this list by name, status, or another property, or do you want to
  see the next 10 clusters?

  eran

  - ID: 985c0181-081e-4e89-9a6a-77713c6b8010

  - Openshift version: 4.20.3

  - Status: pending-for-input
...

Summary by CodeRabbit

  • New Features

    • Added multi-step internal paging for cluster and event lists: show the first 10 items then offer "next 10" slices on demand (without re-querying), retain full list for paging, and provide clear truncation messages with total counts and filter/view options.
    • Hosts lists remain fully displayed (no truncation).
  • Chores

    • Minor formatting/content cleanup in guidance text.

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 2, 2025

@eranco74: This pull request references MGMT-22329 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.21.0" version, but no target version was set.

In response to this:

…list display with client-side paging

Prevents the failure to display large cluster and event lists by imposing a 10-item limit via the system prompt.

'There are 13 clusters available. Showing the first 10 below. Would you
 like to filter this list by name, status, or another property, or do you want to
 see the next 10 clusters?

 eran

 - ID: 985c0181-081e-4e89-9a6a-77713c6b8010

 - Openshift version: 4.20.3

 - Status: pending-for-input
...

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.

@openshift-ci openshift-ci bot requested review from carbonin and keitwb December 2, 2025 14:07
@openshift-ci
Copy link

openshift-ci bot commented Dec 2, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eranco74

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai
Copy link

coderabbitai bot commented Dec 2, 2025

Walkthrough

Updated template.yaml system prompt: replaced prior Direct Display rule with "Direct Display of List Outputs & Cluster/Event List Paging", adding retention of full cluster/event lists when >10 items, initial 10-item display with truncation messaging, internal next-slice paging, and unchanged host-list behavior; removed an extraneous blank line.

Changes

Cohort / File(s) Summary
System Prompt Configuration
template.yaml
Replaced "Direct Display of List Outputs" with "Direct Display of List Outputs & Cluster/Event List Paging". Added: retain complete clusters/events lists when >10 items, show full list if ≤10 or first 10 otherwise, explicit truncation messaging with total count and prompts to filter or view next 10, internal paging using retained list for subsequent "next" requests without re-calling tools, and guidance to offer further actions only after display. Removed an extraneous blank line before "General Proactive Principles".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify paging thresholds and retention wording in template.yaml
  • Confirm example prompts for clusters/events are clear and not conflicting with other prompt directives
  • Check host-list rule (no truncation) remains intact and unambiguous

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • carbonin
  • keitwb
  • maorfr

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the system prompt to implement client-side paging for large cluster and event lists.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ab642e8 and 84bb5e1.

📒 Files selected for processing (1)
  • template.yaml (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot added the approved label Dec 2, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 2, 2025

@eranco74: This pull request references MGMT-22329 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.21.0" version, but no target version was set.

In response to this:

This fix Prevents the failure to display large cluster and event lists by imposing a 10-item limit via the system prompt.

'There are 13 clusters available. Showing the first 10 below. Would you
 like to filter this list by name, status, or another property, or do you want to
 see the next 10 clusters?

 eran

 - ID: 985c0181-081e-4e89-9a6a-77713c6b8010

 - Openshift version: 4.20.3

 - Status: pending-for-input
...

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.

@eranco74 eranco74 changed the title MGMT-22329: (fix) Update system prompt to handle large cluster/event … MGMT-22329: (fix) Update system prompt to handle large cluster/event list display with client-side paging Dec 2, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 2, 2025

@eranco74: This pull request references MGMT-22329 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.21.0" version, but no target version was set.

In response to this:

This fix Prevents the failure to display large cluster and event lists by imposing a 10-item limit via the system prompt.

'There are 13 clusters available. Showing the first 10 below. Would you
 like to filter this list by name, status, or another property, or do you want to
 see the next 10 clusters?

 eran

 - ID: 985c0181-081e-4e89-9a6a-77713c6b8010

 - Openshift version: 4.20.3

 - Status: pending-for-input
...

Summary by CodeRabbit

  • New Features
  • Implemented pagination for cluster and event lists. Lists exceeding 10 items now display the first 10 initially, with options to view subsequent items on demand for improved performance and readability.

✏️ Tip: You can customize this high-level summary in your review settings.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21c9b92 and ab642e8.

📒 Files selected for processing (1)
  • template.yaml (1 hunks)
🔇 Additional comments (2)
template.yaml (2)

247-262: Paging logic is clear, but relies on context retention across turns.

The new paging directive (lines 247–262) introduces a sound strategy for handling large cluster/event lists. The rules are explicit: retain the full list, show the first 10, offer filtering or next-page options, and use the retained list for subsequent slices without re-invoking the tool.

This assumes the chat context persists across multiple turns. In typical conversations this is fine, but if the context window fills and old messages are trimmed, the retained list may be lost and the tool would need to be called again. The prompt does not address this edge case. Consider whether this is acceptable for the expected usage pattern, or whether additional guidance is needed (e.g., "if the full list is no longer in context, call the tool again").


242-262: Paging examples are clear and actionable.

The truncation response examples (lines 257–258) for clusters and events are well-structured and give the AI explicit phrasing to follow. The distinction between host lists (no truncation) and cluster/event lists (paging) is also clear.

…list display with client-side paging

Prevents the failure to display large cluster and event lists by imposing a 10-item limit via the system prompt.

Signed-off-by: Eran Cohen <[email protected]>
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 2, 2025

@eranco74: This pull request references MGMT-22329 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.21.0" version, but no target version was set.

In response to this:

This fix Prevents the failure to display large cluster and event lists by imposing a 10-item limit via the system prompt.

'There are 13 clusters available. Showing the first 10 below. Would you
 like to filter this list by name, status, or another property, or do you want to
 see the next 10 clusters?

 eran

 - ID: 985c0181-081e-4e89-9a6a-77713c6b8010

 - Openshift version: 4.20.3

 - Status: pending-for-input
...

Summary by CodeRabbit

  • New Features

  • Added multi-step internal paging for cluster and event lists: show the first 10 items then offer "next 10" slices on demand (without re-querying), retain full list for paging, and provide clear truncation messages with total counts and filter/view options.

  • Hosts lists remain fully displayed (no truncation).

  • Chores

  • Minor formatting/content cleanup in guidance text.

✏️ Tip: You can customize this high-level summary in your review settings.

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.

@openshift-ci
Copy link

openshift-ci bot commented Dec 2, 2025

@eranco74: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/eval-test 84bb5e1 link false /test eval-test

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@carbonin
Copy link
Collaborator

carbonin commented Dec 3, 2025

So I think this is fine, but can we test it?

Also is there any benefit or precedent for doing some kind of paging on the MCP server side?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants