Skip to content

feat(tui): adapt config list table layout - #18

Merged
wangxingjun778 merged 2 commits into
mainfrom
feat/core_loop
Jul 16, 2026
Merged

feat(tui): adapt config list table layout#18
wangxingjun778 merged 2 commits into
mainfrom
feat/core_loop

Conversation

@wangxingjun778

@wangxingjun778 wangxingjun778 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Features & Enhancements

  • Width-Aware Configuration Table: Introduced _build_config_list_table in CLI slash handlers to dynamically adapt the TUI layout of writable config fields based on terminal width.
  • Layout Unit Testing: Added comprehensive unit tests to verify responsive rendering across compact, medium, and full-width terminal sizes.

Bug Fixes (Address Review Feedback)

  • Falsy Value Handling in _shorten: Fixed the helper to explicitly check for None so that falsy values like 0 or False are no longer incorrectly treated as empty strings.
  • Flexible Type Support in _config_reload_text: Updated the helper to correctly process both boolean and string values (e.g., 'partial') for the hot_reload field instead of strictly casting it to a boolean.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a width-aware configuration list table (_build_config_list_table) in the CLI slash handlers to dynamically adapt the TUI rendering of writable config fields based on the terminal width. It also adds corresponding unit tests to verify the layout behavior across compact, medium, and full widths. The review feedback highlights two important issues: first, the _shorten helper incorrectly treats falsy values like 0 or False as empty strings, which should be resolved by explicitly checking for None; second, the _config_reload_text helper incorrectly treats the hot_reload field as a boolean, which fails to preserve string values like 'partial' and should be updated to handle both booleans and strings properly.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/leapflow/cli/commands/slash_handlers.py Outdated
Comment thread src/leapflow/cli/commands/slash_handlers.py Outdated
@wangxingjun778
wangxingjun778 merged commit 86086a7 into main Jul 16, 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.

1 participant