Skip to content

[bugfix/git_helper-0] Bump version to 1.0.3 and enhance UI settings#27

Merged
justinkumpe merged 1 commit intomainfrom
dev
Jan 7, 2026
Merged

[bugfix/git_helper-0] Bump version to 1.0.3 and enhance UI settings#27
justinkumpe merged 1 commit intomainfrom
dev

Conversation

@justinkumpe
Copy link
Member

@justinkumpe justinkumpe commented Jan 7, 2026

Updated version number and adjusted UI tool settings for improved display.

Summary by Sourcery

Bump git-helper script version and adjust UI dialog defaults for a more consistent terminal interface.

Enhancements:

  • Set fixed dialog, width, and menu height values for the git-helper UI instead of dynamically calculating them from terminal size.
  • Remove use of the --no-shadow option from dialog/whiptail UI invocations to simplify appearance.
  • Update the displayed Git Helper title to reflect the new script version 1.0.3.

Updated version number and adjusted UI tool settings for improved display.
@justinkumpe justinkumpe enabled auto-merge (rebase) January 7, 2026 14:49
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 7, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Bumps the git-helper script version to 1.0.3 and simplifies its TUI behavior by using fixed dimensions and removing the --no-shadow option from dialog/whiptail invocations.

Flow diagram for git-helper TUI dimension and UI tool configuration

flowchart TD
  A[Start git-helper.sh] --> B[Set SCRIPT_VERSION 1.0.3]
  B --> C[Set HEIGHT 20]
  C --> D[Set WIDTH 78]
  D --> E[Set MENU_HEIGHT 12]
  E --> F[Detect available UI_TOOL]
  F --> G{UI_TOOL}
  G --> H[whiptail: use HEIGHT, WIDTH, MENU_HEIGHT without no-shadow]
  G --> I[dialog: use HEIGHT, WIDTH, MENU_HEIGHT without no-shadow]
  G --> J[text: fall back to text-based UI]
  H --> K[ui_menu ui_checklist ui_input ui_yesno ui_show_text_file]
  I --> K
  J --> K
  K --> L[Display choices and capture user input]
Loading

File-Level Changes

Change Details Files
Update script version and standardize fixed UI dimensions instead of computing them dynamically from the terminal size.
  • Increment the SCRIPT_VERSION constant from 1.0.2 to 1.0.3.
  • Replace the single WIDTH variable with HEIGHT, WIDTH, and MENU_HEIGHT constants set to 20, 78, and 12 respectively.
  • Remove the get_dialog_height and get_menu_height helper functions and associated dynamic height calculation logic.
git_helpers/git-helper.sh
Adjust dialog/whiptail UI tool invocation flags to remove the no-shadow option across all UI helpers.
  • Update whiptail and dialog calls in ui_menu to drop the --no-shadow flag.
  • Update whiptail and dialog calls in ui_checklist to drop the --no-shadow flag.
  • Update whiptail and dialog calls in ui_input to drop the --no-shadow flag.
  • Update whiptail and dialog calls in ui_yesno to drop the --no-shadow flag.
  • Update whiptail and dialog calls in ui_show_text_file to drop the --no-shadow flag.
git_helpers/git-helper.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@justinkumpe justinkumpe merged commit 232bfa8 into main Jan 7, 2026
2 of 3 checks passed
@justinkumpe justinkumpe deleted the dev branch January 7, 2026 14:49
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • By replacing the dynamic HEIGHT/MENU_HEIGHT calculation with fixed values, the dialogs may render poorly or be unusable on very small or very large terminals; consider keeping a minimal dynamic calculation or letting users override dimensions via environment variables.
  • Dropping the --no-shadow flag for both whiptail and dialog changes the visual behavior and may not be desired for all users; you might want to gate this via a configuration flag or environment variable so users can opt in/out of shadows.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- By replacing the dynamic HEIGHT/MENU_HEIGHT calculation with fixed values, the dialogs may render poorly or be unusable on very small or very large terminals; consider keeping a minimal dynamic calculation or letting users override dimensions via environment variables.
- Dropping the `--no-shadow` flag for both `whiptail` and `dialog` changes the visual behavior and may not be desired for all users; you might want to gate this via a configuration flag or environment variable so users can opt in/out of shadows.

## Individual Comments

### Comment 1
<location> `git_helpers/git-helper.sh:28-30` </location>
<code_context>
 UI_TOOL=""
 TITLE="Git Helper v${SCRIPT_VERSION}"
-WIDTH=70
+HEIGHT=20
+WIDTH=78
+MENU_HEIGHT=12
 default_config_dir="${XDG_CONFIG_HOME:-$HOME/.config}"
 CONFIG_DIR="$default_config_dir/git-helper"
</code_context>

<issue_to_address>
**issue:** Fixed dialog dimensions may break on very small terminals and are disconnected from each other.

Previously `HEIGHT`/`MENU_HEIGHT` were based on the actual terminal size; hard-coding them can make the UI unusable on small terminals and suboptimal on large ones, and creates a risk that `HEIGHT` and `MENU_HEIGHT` diverge logically. Consider restoring dynamic sizing (even in a simplified form) or deriving `MENU_HEIGHT` from `HEIGHT` (e.g. `MENU_HEIGHT=$((HEIGHT-7))`) with clamping based on terminal size so the layout remains adaptive.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +28 to +30
HEIGHT=20
WIDTH=78
MENU_HEIGHT=12
Copy link

Choose a reason for hiding this comment

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

issue: Fixed dialog dimensions may break on very small terminals and are disconnected from each other.

Previously HEIGHT/MENU_HEIGHT were based on the actual terminal size; hard-coding them can make the UI unusable on small terminals and suboptimal on large ones, and creates a risk that HEIGHT and MENU_HEIGHT diverge logically. Consider restoring dynamic sizing (even in a simplified form) or deriving MENU_HEIGHT from HEIGHT (e.g. MENU_HEIGHT=$((HEIGHT-7))) with clamping based on terminal size so the layout remains adaptive.

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