add step navigation buttons in xray.#300
Conversation
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Global Variable Usage Reduces Readability ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| src/agentlab/analyze/agent_xray.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
src/agentlab/analyze/agent_xray.py
Outdated
| def format_step_indicator(step_id): | ||
| global info | ||
| if not step_id or not info.exp_result or not info.exp_result.steps_info: | ||
| return "Step 0/0" |
There was a problem hiding this comment.
Global Variable Usage Reduces Readability 
Tell me more
What is the issue?
The function uses a global variable which makes the code harder to understand and maintain.
Why this matters
Global state makes code flow harder to follow and increases the likelihood of bugs when the global state changes unexpectedly.
Suggested change ∙ Feature Preview
def format_step_indicator(step_id: StepId, info: Info) -> str:
if not step_id or not info.exp_result or not info.exp_result.steps_info:
return "Step 0/0"Provide feedback to improve future suggestions
💬 Looking for more details? Reply to this comment to chat with Korbit.
recursix
left a comment
There was a problem hiding this comment.
Can you validate that the shortcut shit -> and shift <- still works for next/prev. Or is it cmd -> cmd <-. If they still work, can you add indication around these new buttons that this is the shortcut.
8b08c1f to
54a729c
Compare
Adds step navigation buttons and fix keyboard shortcuts.
Description by Korbit AI
What change is being made?
Add a keyboard shortcut and UI navigation for stepping through xray results by introducing Granadio head content with a step navigation bar (Previous/Next buttons and a step indicator) and corresponding navigation handlers.
Why are these changes being made?
Enhance user navigation by enabling quick step-by-step traversal using Ctrl/Cmd + Arrow keys and by providing visible step context through a step indicator and dedicated navigation buttons. This streamlines reviewing multi-step results without relying solely on other UI controls.