Skip to content

Fixed-frame TUI and inline menu chrome - #7

Closed
jasonkneen wants to merge 5 commits into
Trampoline-AI:mainfrom
jasonkneen:feature/tui-improvements
Closed

Fixed-frame TUI and inline menu chrome#7
jasonkneen wants to merge 5 commits into
Trampoline-AI:mainfrom
jasonkneen:feature/tui-improvements

Conversation

@jasonkneen

Copy link
Copy Markdown
Contributor

Introduce a fixed header + bottom input frame for the terminal UI and add an InlineMenuChrome to render inline selection menus inside that frame. Key changes:

  • Add InlineMenuChrome dataclass and propagate a menu_chrome parameter through onboarding interactive prompts to allow custom menu framing and styling.
  • Enhance menu application to support optional framing, cursor positioning, and merging of prompt styles when a chrome is provided.
  • Rework TerminalFractalApp to use a fixed-frame prompt session: add a fixed header, transcript window, rounded input frame, and logic to lift completion floats out of the fixed input.
  • Implement live-mode helpers to pin/reset the terminal scroll region, render a static running frame, and capture command output into the fixed transcript area.
  • Replace the old footer/prompt behavior with a more compact prompt icon (with optional nerd-font), context level bar, and improved slash-command completion reservation.
  • Update onboarding flows to accept and forward menu_chrome so configuration/setup menus render inside the fixed frame.
  • Update and expand tests to cover prompt icon behavior, fixed-frame layout, transcript retention, pinned running frame behavior, and various prompt/menu interactions.

These changes improve UX in terminal environments by keeping the prompt and header stable, allowing inline configuration menus, and preserving command output in a transcript area.

Introduce a fixed header + bottom input frame for the terminal UI and add an InlineMenuChrome to render inline selection menus inside that frame. Key changes:

- Add InlineMenuChrome dataclass and propagate a menu_chrome parameter through onboarding interactive prompts to allow custom menu framing and styling.
- Enhance menu application to support optional framing, cursor positioning, and merging of prompt styles when a chrome is provided.
- Rework TerminalFractalApp to use a fixed-frame prompt session: add a fixed header, transcript window, rounded input frame, and logic to lift completion floats out of the fixed input.
- Implement live-mode helpers to pin/reset the terminal scroll region, render a static running frame, and capture command output into the fixed transcript area.
- Replace the old footer/prompt behavior with a more compact prompt icon (with optional nerd-font), context level bar, and improved slash-command completion reservation.
- Update onboarding flows to accept and forward menu_chrome so configuration/setup menus render inside the fixed frame.
- Update and expand tests to cover prompt icon behavior, fixed-frame layout, transcript retention, pinned running frame behavior, and various prompt/menu interactions.

These changes improve UX in terminal environments by keeping the prompt and header stable, allowing inline configuration menus, and preserving command output in a transcript area.
Copilot AI review requested due to automatic review settings June 25, 2026 14:46
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.01262% with 38 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/fractal/tui/app.py 90.96% 27 Missing ⚠️
src/fractal/onboarding.py 38.88% 11 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors Fractal’s terminal UI to use a fixed top header and a fixed bottom input frame, and introduces “inline menu chrome” so interactive selection menus (onboarding/config/session selection) can render inside that fixed frame without disrupting the layout.

Changes:

  • Added a fixed-frame PromptSession layout (header + transcript window + rounded input frame) and logic to lift completion menu floats out of the fixed input area.
  • Added InlineMenuChrome and threaded a menu_chrome parameter through interactive onboarding/setup prompts, including style merging and optional full-screen framing.
  • Expanded TUI tests to cover prompt icon behavior, transcript retention, fixed-frame layout expectations, and inline session selection for /sessions and /resume.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/fractal/tui/app.py Implements fixed-frame prompt layout, transcript capture, prompt icon/title rendering, and inline session selection/resume flows.
src/fractal/onboarding.py Adds InlineMenuChrome and updates inline menu rendering to support framing, cursor positioning, and style merging.
tests/test_tui.py Updates/adds tests for fixed-frame layout, prompt/user message rendering, transcript retention, and menu interactions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/fractal/tui/app.py
Comment thread src/fractal/tui/app.py
Comment on lines 963 to 966
async def handle_provider_command(self, rest: str) -> bool:
if rest.strip():
self.console.print(Text("usage: /provider", style="yellow"))
self._print_command_output(Text("usage: /provider", style="yellow"))
return True
Comment thread src/fractal/onboarding.py

@magix022 magix022 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is not close to being ready for merge, it breaks most of the text rendering in the TUI. Needs human review, an AI can't verify TUI rendering.

@magix022 magix022 closed this Jul 3, 2026
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.

3 participants