Merged
Conversation
singleLine previously returned only the first non-empty line, silently dropping the rest. Now it joins all non-empty lines with spaces so table cells show the full content compressed to one line. formatCell in the generic renderer gets the same treatment via strings.Fields for cells that contain \n or \r.
There was a problem hiding this comment.
Pull request overview
Updates table-cell text rendering so multiline strings are collapsed into a single line (space-separated) instead of being effectively truncated at the first line, improving readability across schema-backed presenter output and the generic output renderer.
Changes:
presenter.singleLinenow joins all non-empty lines with spaces instead of returning only the first non-empty line.output.formatCellcollapses\n/\r(and surrounding whitespace) to spaces before truncation.- Presenter tests updated/added to reflect the new collapse semantics.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/presenter/format.go | Changes singleLine behavior to collapse multiline text into one line. |
| internal/output/render.go | Collapses newline/carriage-return-containing strings before truncation in table cells. |
| internal/presenter/presenter_test.go | Updates/extends tests to match collapse-not-truncate behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Mar 11, 2026
Normalize \r\n and bare \r to \n before splitting so carriage returns don't leak into table cells. Add test for bare-CR and mixed line endings. Drop unused require import from this commit (child PRs re-add it when they add tests that need it).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
singleLine(presenter path) now joins all non-empty lines with spaces instead of returning only the first line. This affects all schema-backed list rows.formatCell(generic renderer path) collapses\n/\rviastrings.Fieldsbefore truncation.Test plan
bin/cipassesbasecamp campfire messages— multiline content renders on one linebasecamp messages list— multiline subjects render on one line