Skip to content

fix(tui): place the search cursor from the computed input layout - #706

Merged
LargeModGames merged 1 commit into
LargeModGames:mainfrom
WaterWhisperer:fix-search-cursor-layout
Oct 5, 2026
Merged

LargeModGames merged 1 commit into
LargeModGames:mainfrom
WaterWhisperer:fix-search-cursor-layout

Conversation

@WaterWhisperer

@WaterWhisperer WaterWhisperer commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix search cursor placement when the playbar is on top, the sidebar is on the right, or the terminal uses the compact layout.

Fixes #662

Testing

  • cargo test --no-default-features --features telemetry,tui runner::tests
  • cargo fmt --all -- --check
  • cargo clippy --no-default-features --features telemetry,tui -- -D warnings

Additional notes


💬 Questions or want to chat with other contributors? Join the spotatui Discord.

Summary by CodeRabbit

  • Bug Fixes
    • The search cursor now stays correctly positioned within the input area as the layout changes, including on narrow screens and when sidebars are hidden.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: LargeModGames/spotatui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae0a5e81-c86e-4898-807f-d6f55f8f05ea
📥 Commits

Reviewing files that changed from the base of the PR and between 6e4d3a6 and 15c80cc.

📒 Files selected for processing (1)
  • src/tui/runner.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The search cursor now uses the input area computed by the main layout. It remains hidden when that area is unavailable or too small. Tests cover alternate layouts, narrow terminals, and a hidden sidebar.

Changes

Search cursor positioning

Layer / File(s) Summary
Layout-aware cursor positioning and tests
src/tui/runner.rs
frame_cursor_position uses the computed input rectangle instead of a shared margin. Tests cover top playbar and right sidebar layouts, a narrow terminal, and an unavailable input area.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 15c80

The cursor follows the search input across the covered layouts and is omitted when no usable input area exists; no merge-blocking issue is established.


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive For #662, frame_cursor_position now uses the computed input rectangle and hides the cursor when the input area is absent or too small. The updated test and three new layout tests cover the visible p… Provide the result of cargo test --no-default-features --features telemetry,tui to establish whether the full TUI test suite passes.
✅ 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 uses the allowed fix prefix with the tui scope. It concisely describes the main change: positioning the search cursor from the computed input layout.
Out of Scope Changes check ✅ Passed The diff changes only cursor placement in src/tui/runner.rs and adds regression tests for the layouts described in #662. These changes support the linked issue and introduce no demonstrated unrelate…
Full details: Linked Issues check

Explanation

For #662, frame_cursor_position now uses the computed input rectangle and hides the cursor when the input area is absent or too small. The updated test and three new layout tests cover the visible prefix, top playbar, right sidebar, narrow layout, and hidden sidebar. The PR description reports the filtered runner::tests command, formatting, and Clippy, but does not establish that the full TUI test suite passes as #662 requires.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
✨ Simplify code
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@LargeModGames
LargeModGames merged commit c9c1c17 into LargeModGames:main Oct 5, 2026
30 checks passed
@WaterWhisperer
WaterWhisperer deleted the fix-search-cursor-layout branch October 6, 2026 05:24
LargeModGames added a commit that referenced this pull request Oct 11, 2026
# Summary

Version bump and changelog for v0.44.0. No application code changes.

- `Cargo.toml` and `Cargo.lock` go to 0.44.0, and `SECURITY.md` names
0.44 as the supported version.
- `CHANGELOG.md`: `## [Unreleased]` is now `## [v0.44.0] 2026-10-12`. I
checked every PR merged since v0.43.0 against it and added 24 entries
that were missing, for #524, #569, #570, #574, #593, #618, #623, #624,
#651, #652, #656, #675, #684, #700, #701, #706, #707, #709, #718, #719,
#722, #730, #741 and #742.
- Five older entries blamed the Web API, Development Mode or the token
refresh, which #752 removed. They now describe what a v0.44 user sees.
The #752 entry also says that related artists are empty for now.
- The agent plugin goes to 0.2.0 (both manifests and the marketplace
entry), because its skill now lists the ten new MCP tools.
- README and `docs/roadmap.md`: rspotify is only models and ids now,
`--debug` logs every Spotify request, recommendations work again, and
related artists come back empty.
- The `spotatui.wiki` submodule moves to the commit that replaces the
client-id setup with the pairing login.

# Testing

- `cargo update -p spotatui --offline`, then `cargo metadata --locked`:
ok
- `cargo check --locked`: ok (`Checking spotatui v0.44.0`)

# Additional notes

This is the first release without a client id. Every Spotify user logs
in once more with the pairing code, and Spotify in spotatui needs
Premium.

---
<sub>💬 Questions or want to chat with other contributors? Join the
[spotatui Discord](https://spotatui.com/discord).</sub>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Search and sort playlists using loaded tracks, play playlists
randomly, and browse artist albums across pages.
* Spotify sessions now support HTTP proxies; listening parties stay
connected with keep-alives.
* **Improvements**
* Playback handoffs, polling, and slow Spotify operations have been
adjusted for smoother playback.
* Skipped downloads can be canceled, and AI DJ/MCP playback can continue
when off-screen.
* **Bug Fixes**
* Fixed issues with theme color startup, key handling, focus navigation,
cursor placement, playlist sorting, and Qobuz retries.
* **Documentation**
  * Updated installation, keybinding, and Spotify guidance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

Search cursor lands outside the search box with playbar top or sidebar right

2 participants