Skip to content

Remove left indent from messages in TUI#68

Open
gtsiolis wants to merge 1 commit intomainfrom
george/remove-indent-from-messages
Open

Remove left indent from messages in TUI#68
gtsiolis wants to merge 1 commit intomainfrom
george/remove-indent-from-messages

Conversation

@gtsiolis
Copy link
Member

@gtsiolis gtsiolis commented Mar 3, 2026

See DES-152 for more context.

** Ignore the missing information in the header, will fix in a follow up PR, logout does not need the header. 👾

BEFORE AFTER
Screenshot 2026-03-04 at 00 38 21 Screenshot 2026-03-04 at 00 37 50

@coderabbitai
Copy link

coderabbitai bot commented Mar 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8adc60 and 7fe1ef1.

📒 Files selected for processing (1)
  • internal/ui/app.go

📝 Walkthrough

Walkthrough

Added a new noIndent boolean field to the styledLine struct to control indentation behavior. Modified message event handling to compute noIndent based on severity (Success, Note, Warning) and updated the rendering logic to handle lines without indentation using full width for text wrapping.

Changes

Cohort / File(s) Summary
Message Indentation Control
internal/ui/app.go
Added noIndent field to styledLine struct; compute this field during output.MessageEvent handling based on message severity; added rendering branch to skip indentation for certain message types and use full width for wrapping.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove left indent from messages in TUI' directly aligns with the main code change that removes indentation from styled messages by introducing a noIndent field.
Description check ✅ Passed The description references DES-152 for context and includes before/after screenshots showing the visual effect of removing left indentation from TUI messages.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch george/remove-indent-from-messages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

text string
highlight bool
secondary bool
noIndent bool
Copy link
Collaborator

Choose a reason for hiding this comment

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

suggestion: The change makes sense to me, but I would phrase the bool the other way around: there is a double-negative feel and the zero value (false = indented) is the minority case (only SeverityInfo gets indented). Since Go's default value for bool is false, it's cleaner to flip to indent bool so the default means "no indent".

Copy link
Collaborator

@carole-lavillonniere carole-lavillonniere left a comment

Choose a reason for hiding this comment

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

Just one suggestion to make the code simpler and easier to read, otherwise it looks good!

@silv-io
Copy link
Member

silv-io commented Mar 4, 2026

I'm not sure why we had that indent in the first place 🤔

@carole-lavillonniere
Copy link
Collaborator

I'm not sure why we had that indent in the first place 🤔

Do we want to keep it for the Info severity @gtsiolis?

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