fix(tutorial): keep input bar mounted and focused during command entry - #66
Merged
nschimme merged 1 commit intoSep 21, 2026
Conversation
Prevent the tutorial prompt bar from unmounting <input> when output overflows, ensuring continuous keyboard focus when entering commands like `look` and `exits`. Display a non-blocking floating overlay toast when content overflows.
Contributor
Reviewer's GuideThe tutorial player now preserves a continuously mounted command input while output is paged, adding a transitional floating overflow toast for navigation and updating tests to verify the input remains accessible after submitting a command. Sequence diagram for continuous tutorial command input focussequenceDiagram
actor User
participant Input as CommandInput
participant Player as TutorialPlayer
participant Toast as OverflowToast
User->>Input: submit()
Input->>Player: @keydown.enter
Player-->>Input: keep mounted and focused
Player->>Toast: show when isScrollOverflowActive && !isScrolling
User->>Toast: click
Toast->>Player: pageForward(true)
Player-->>Input: remain available for next command
Flow diagram for tutorial prompt and overflow statesflowchart TD
A["Tutorial prompt rendered"] --> B{"Chapter complete?"}
B -->|Yes| C["Show completion button"]
B -->|No| D["Keep command input mounted"]
D --> E{"Output overflow active and not scrolling?"}
E -->|Yes| F["Show floating overflow toast"]
E -->|No| G["Show input without toast"]
F --> H["pageForward(true)"]
H --> D
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevent the tutorial prompt bar from unmounting when output overflows, ensuring continuous keyboard focus when entering commands like
lookandexits. Display a non-blocking floating overlay toast when content overflows.Summary by Sourcery
Preserve continuous tutorial command entry by keeping the input bar mounted and presenting overflow paging as a floating toast.
Bug Fixes:
Enhancements:
Tests: