From d3feb40c59bd7c5f8e55417ef9ddd9def50cd5a0 Mon Sep 17 00:00:00 2001 From: Matthew Powelson Date: Mon, 18 Aug 2025 15:04:51 -0400 Subject: [PATCH] Revert page_size --- arm_cli/container/container.py | 7 ++++--- arm_cli/projects/activate.py | 1 - arm_cli/projects/init.py | 1 - arm_cli/projects/remove.py | 1 - arm_cli/settings.py | 3 +++ feature_roadmap.md | 1 + 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/arm_cli/container/container.py b/arm_cli/container/container.py index 396e8de..da30101 100644 --- a/arm_cli/container/container.py +++ b/arm_cli/container/container.py @@ -51,11 +51,14 @@ def attach_container(ctx): message="Select a container to attach to", choices=[f"{container.name} ({container.id[:12]})" for container in containers], carousel=True, - page_size=get_setting("menu_page_size"), ) ] answers = inquirer.prompt(container_choices) + if not answers: + print("No container selected.") + return + selected_container_name = answers["container"].split(" ")[0] # Extract name print(f"Attaching to {selected_container_name}...") @@ -85,7 +88,6 @@ def restart_container(ctx): message="Select a container to restart", choices=[f"{container.name} ({container.id[:12]})" for container in containers], carousel=True, - page_size=get_setting("menu_page_size"), ) ] @@ -126,7 +128,6 @@ def stop_container(ctx): message="Select a container to stop", choices=[f"{container.name} ({container.id[:12]})" for container in containers], carousel=True, - page_size=get_setting("menu_page_size"), ) ] diff --git a/arm_cli/projects/activate.py b/arm_cli/projects/activate.py index 649777d..f1f1763 100644 --- a/arm_cli/projects/activate.py +++ b/arm_cli/projects/activate.py @@ -48,7 +48,6 @@ def _activate(ctx, project: Optional[str] = None): message="Select a project to activate", choices=choices, carousel=True, - page_size=get_setting("menu_page_size"), ) ] diff --git a/arm_cli/projects/init.py b/arm_cli/projects/init.py index dac3156..834f4a3 100644 --- a/arm_cli/projects/init.py +++ b/arm_cli/projects/init.py @@ -85,7 +85,6 @@ def _init(ctx, project_path: str, name: Optional[str] = None): message=f"Select a configuration file from {project_dir.name} or use default", choices=choices, carousel=True, - page_size=get_setting("menu_page_size"), ) ] diff --git a/arm_cli/projects/remove.py b/arm_cli/projects/remove.py index 6d4b91f..7fabfff 100644 --- a/arm_cli/projects/remove.py +++ b/arm_cli/projects/remove.py @@ -38,7 +38,6 @@ def _remove(ctx, project: Optional[str] = None): message="Select a project to remove", choices=choices, carousel=True, - page_size=get_setting("menu_page_size"), ) ] diff --git a/arm_cli/settings.py b/arm_cli/settings.py index 7199a6e..022efd7 100644 --- a/arm_cli/settings.py +++ b/arm_cli/settings.py @@ -10,6 +10,9 @@ class Settings(BaseModel): """Settings schema for the CLI.""" + # Note: menu_page_size is currently not used due to inquirer 3.4.0 not supporting + # the page_size parameter in List questions. This setting is kept for potential + # future use if we switch to a different interactive library. menu_page_size: int = 20 global_context_path: str = "global_context.json" cdc_path: str = "~/code" diff --git a/feature_roadmap.md b/feature_roadmap.md index 8af6b7f..e42d9a1 100644 --- a/feature_roadmap.md +++ b/feature_roadmap.md @@ -6,6 +6,7 @@ Probably mostly in order 5) Deployment tools - possibly using ansible or maybe save that for later 6) Connect to container registries for skill install 7) More comprehensive documentation of intent +8) Explore alternative interactive CLI libraries (e.g., questionary) for better page size control in menus These are probably not all-encompassing, but it's what I am thinking about right now.