Skip to content

fix: correctly handle wrapping and disabled skips in LinearPrompt#1614

Merged
Karanjot786 merged 1 commit into
Karanjot786:mainfrom
pradeep0153:fix/1609-linearprompt-wrap-bug
Jun 21, 2026
Merged

fix: correctly handle wrapping and disabled skips in LinearPrompt#1614
Karanjot786 merged 1 commit into
Karanjot786:mainfrom
pradeep0153:fix/1609-linearprompt-wrap-bug

Conversation

@pradeep0153

Copy link
Copy Markdown
Contributor

Replaces the non-wrapping linear loops with circular do...while loops in LinearPrompt navigation. This correctly handles wrapping back to the end of the list and successfully skips disabled items at the boundaries without jumping over valid options. Resolves #1609.

@pradeep0153 pradeep0153 requested a review from Karanjot786 as a code owner June 19, 2026 04:39
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@pradeep0153, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 27 minutes and 31 seconds. Learn how PR review limits work.

To continue reviewing without waiting, enable usage-based billing in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 719a3f8e-7090-42ed-b796-8a6f318c90d5

📥 Commits

Reviewing files that changed from the base of the PR and between 550e9c6 and 828fd3e.

📒 Files selected for processing (1)
  • packages/ui/src/LinearPrompt.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added needs-star PR author has not starred the repo. area:ui @termuijs/ui and removed needs-star PR author has not starred the repo. labels Jun 19, 2026
@github-actions

Copy link
Copy Markdown

Hi @pradeep0153 👋

Star this repo before your PR merges.

Why? GSSoC 2026 contributors who star get priority review and points credit. After you star, push any commit (or re-run this check). The needs-star label lifts automatically.

Thanks for your contribution to TermUI.

@github-actions github-actions Bot added the type:bug +10 pts. Bug fix. label Jun 19, 2026
@Karanjot786 Karanjot786 merged commit 597a162 into Karanjot786:main Jun 21, 2026
4 of 5 checks passed
@Karanjot786 Karanjot786 added gssoc:approved Approved PR. Earns +50 base points. level:beginner +20 pts. Entry-level task. quality:clean x 1.2 multiplier. Clean implementation. labels Jun 21, 2026
Karanjot786 added a commit that referenced this pull request Jun 21, 2026
selectNext/selectPrev wrapped circularly after #1614, causing markDirty
to fire at list boundaries and breaking 6 tests. Switch to clamping:
stop at first/last enabled option, no-op (no markDirty) when blocked.

Co-authored-by: Karanjot786 <karanjots801@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ui @termuijs/ui gssoc:approved Approved PR. Earns +50 base points. level:beginner +20 pts. Entry-level task. quality:clean x 1.2 multiplier. Clean implementation. type:bug +10 pts. Bug fix.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LinearPrompt incorrectly skips valid options when moving backward at the wrap boundary

2 participants