Composer position: Flow - #200
Merged
Merged
Conversation
Flow places the prompt and input right after the newest output inside NMSh's document, like a conventional terminal, while keeping NMSh's editor, highlighting, suggestions and structured execution. ScreenPlan gains a Flow stack: transcript sized to its rows, then the gap or live activity, the composer, and menus below the input. The PTY keeps the full capacity so output growth never resizes the shell. When scrolled back, the composer scrolls with the document and is clipped at the screen edge; the history viewport resolves against the following capacity (the new ScreenPlan.viewportRows), so a small scroll never snaps back to the bottom. Editing while scrolled back returns to the newest output in Flow; scrolling and mouse movement alone do not. Panels pin to the bottom edge. Composer position gains Flow in Config, and the palette toggle cycles Bottom, Top and Flow. Bottom and Top are unchanged.
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.
Closes #132
Behavior
Design
planScreengains a Flow stack.ScreenPlan.viewportRowsis the height the history viewport resolves and scrolls by. It's the transcript height for Bottom and Top, and the following capacity in Flow. Without it, a small scroll-back would grow the transcript region into the composer's rows and immediately snap back to the bottom.planFrameresolves Flow's scroll position against that capacity and plans fromviewStart. Every viewport resolve/scroll site usesviewportRows, while slicing uses the region height.Decisions (flagged in planning)
Tests
tests/flowComposer.test.ts: plan placement and growth, menus below, activity, a scrolled-back document (nudged and paged) with fixed PTY/viewport rows, panels, and narrow terminals with long input across follow and scrolled-back states.git diff --checkare clean. The full suite passed 580/580 in the last two local runs.Limitations