Skip to content

fix(handler): close audio analysis with Esc - #869

Merged
LargeModGames merged 1 commit into
LargeModGames:mainfrom
Oud-Idk:fix/visualizer-esc
Oct 16, 2026
Merged

LargeModGames merged 1 commit into
LargeModGames:mainfrom
Oud-Idk:fix/visualizer-esc

Conversation

@Oud-Idk

@Oud-Idk Oud-Idk commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Closes #815.
Esc previously did nothing on the Analysis screen because it was treated as a "global view that has no active/inactive distinction". This change makes Esc pop the navigation stack on ActiveBlock::Analysis, so the audio analysis screen closes back to the home view.

Testing

  • cargo fmt --all --check
  • cargo clippy --no-default-features --features telemetry,tui -- -D warnings
  • cargo test --no-default-features --features telemetry,tui
  • Pressed Esc on the Analysis screen, pops the navigation stack correctly.

Additional notes

  • Only touches src/tui/handlers/mod.rs; no feature-gated code paths or gates affected.
  • No prior Esc behavior on other screens changed (the Analysis arm was moved into the existing pop-stack group).

Summary by CodeRabbit

  • Bug Fixes
    • Pressing Esc on the audio analysis screen now returns to Home instead of leaving the screen unchanged.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: 79a09318-df19-4005-a57e-1fd791efb168
📥 Commits

Reviewing files that changed from the base of the PR and between 9853820 and b00600e.

📒 Files selected for processing: 1
  • src/tui/handlers/mod.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

Escape now closes the audio analysis screen by popping the navigation stack. A test verifies that pressing Escape returns to Home with the Empty block active.

Changes: Audio analysis navigation

Layer / File(s) Summary
Escape handling and navigation test
src/tui/handlers/mod.rs
Escape now pops the navigation stack for ActiveBlock::Analysis. A test checks that pressing Escape on the audio analysis screen returns to Home with the Empty block active.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to b0060

Pressing Escape on Analysis returns to Home, and the regression test covers that key path. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4
Check name Status Explanation
Linked Issues check Passed Issue #815 requires Esc to close Analysis and return to the previous route. The PR adds ActiveBlock::Analysis to the navigation-stack pop arm in handle_escape. handle_app routes Esc to handle_escape f…
Out of Scope Changes check Passed The diff only changes the Analysis Esc dispatch and adds its focused regression test in src/tui/handlers/mod.rs. These changes directly implement issue #815. No unrelated behavior, feature-gate change…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the valid conventional-commit prefix fix(handler):, clearly describes the Esc behavior change, and uses a concise imperative subject.
Full details: Linked Issues check

Explanation

Issue #815 requires Esc to close Analysis and return to the previous route. The PR adds ActiveBlock::Analysis to the navigation-stack pop arm in handle_escape. handle_app routes Esc to handle_escape for Analysis. The added esc_closes_the_audio_analysis_screen test calls handle_app(Key::Esc), then verifies a return to RouteId::Home with ActiveBlock::Empty.

Full details: Out of Scope Changes check

Explanation

The diff only changes the Analysis Esc dispatch and adds its focused regression test in src/tui/handlers/mod.rs. These changes directly implement issue #815. No unrelated behavior, feature-gate change, chart-title change, Analysis-specific handler change, or AnnouncementPrompt change is present.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
✨ Simplify code
  • Create a new PR
  • Autofix · 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.

@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Oud-Idk Oud-Idk changed the title fix(handler): esc closes audio analysis fix(handler): close audio analysis with Esc Oct 16, 2026
@Oud-Idk
Oud-Idk marked this pull request as ready for review October 16, 2026 11:13
@LargeModGames
LargeModGames merged commit 3970f27 into LargeModGames:main Oct 16, 2026
32 checks passed
@Oud-Idk
Oud-Idk deleted the fix/visualizer-esc branch October 16, 2026 11:54
LargeModGames added a commit that referenced this pull request Oct 25, 2026
# Summary

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

- `Cargo.toml`, `Cargo.lock`, `desktop/Cargo.toml` and
`desktop/Cargo.lock` go to 0.47.0. The librespot fork stays at `=0.8.6`.
- `CHANGELOG.md`: `## [Unreleased]` is now `## [v0.47.0] 2026-10-25`. I
checked every PR merged since v0.46.0 against it and added entries for
the Soloist engine (#935, guide in #936), the Escape and back-key fixes
(#869, #875, #915) and the list scroll fix (#859). The language entry
now says Chinese is available, because all the translation PRs are
merged.

# Testing

- cargo fmt --all -- --check
- cargo clippy --no-default-features --features telemetry,tui -- -D
warnings
- cargo test --no-default-features --features telemetry,tui: 1764 passed

# Additional notes

The desktop shell tests (`version_matches_root`) run in the desktop
workflow, not locally.

---
<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
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Added Spotify Soloist playback, including related settings and
download options.
* Added Simplified and Traditional Chinese translations across the
terminal, desktop app, and browser interface.
* **Bug Fixes**
  * Fixed Escape and back navigation in the terminal.
  * Fixed list scrolling in the terminal.

<!-- 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.

Esc does nothing on the audio analysis screen

2 participants