Skip to content

[BUG] Commit message panel renders with inverted corner glyphs #77

Closed

Description

@Muneer320

Bug Description

The commit message panel sometimes renders with the bottom-corner glyphs at the top (and vice versa), so the box displays as:

┘───────────────────── Commit Message ──────────────────────└
│ ...
┐───────────────────────────────────────────────────────────┌

instead of the usual ┌/┐ on the top edge.

Steps to Reproduce

  1. Configure commit-msg with any provider (e.g., commit llm setup with OpenAI).
  2. Stage a change (for example, echo test > demo.txt && git add demo.txt).
  3. Run commit . (or go run cmd/commit-msg/main.go .) to generate a message.
  4. Observe the commit message panel corners in the terminal output.

Expected Behavior

The panel should use the correct box-drawing characters: ┌ and ┐ on the top edge, └ and ┘ on the bottom edge.

Actual Behavior

The top edge uses ┘ and └, while the bottom edge uses ┐ and ┌, making the panel look inverted.

Environment

  • OS: Windows 11 (Build 23H2)
  • Go Version: 1.24.7 toolchain (module declares go 1.24.0)
  • commit-msg Version: latest from main (46f1d13)
  • LLM Provider: OpenAI

Additional Context

  • Screenshot / sample output:
    ┘───────────────────── Commit Message ──────────────────────└
    │ Add index.html file                                       │
    │                                                           │
    │ - Creates a basic HTML template with a title and heading. │
    ┐───────────────────────────────────────────────────────────┌
    
  • Related code lives in internal/display/display.go around lines 109-113 where the box corner strings are set.

Possible Solution

Swap the corner glyph assignments in ShowCommitMessage so that:

  • WithTopLeftCornerString("┌")
  • WithTopRightCornerString("┐")
  • WithBottomLeftCornerString("└")
  • WithBottomRightCornerString("┘")

This change restores the expected orientation of the panel borders.

I'd like to work on the issue, so you can assign me this.

Activity

  1. added
    hacktoberfestEligible for Hacktoberfest
    goPull requests that update go code
    on Oct 7, 2025
  2. DFanso commented on Oct 7, 2025

    @DFanso
    Owner

    Hey @Muneer320 can u work on this if u have spare time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggoPull requests that update go codehacktoberfestEligible for Hacktoberfest

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions