Skip to content

Show full content in detail views instead of truncating at 40 chars#338

Merged
jeremy merged 2 commits intomainfrom
show-full-content-detail-view
Mar 18, 2026
Merged

Show full content in detail views instead of truncating at 40 chars#338
jeremy merged 2 commits intomainfrom
show-full-content-detail-view

Conversation

@robzolkos
Copy link
Copy Markdown
Collaborator

@robzolkos robzolkos commented Mar 17, 2026

Summary

  • basecamp show truncates content/description fields to 40 characters because
    renderObject uses the same formatCell path as table rows
  • Add formatDetailValue for detail (single-object) views that preserves full
    string content while keeping ANSI stripping, HTML→Markdown, and newline collapsing
  • Table and list truncation unchanged — formatCell still caps at 40 chars

Before: Content: **This message affects US Employees o...
After: full content rendered


Summary by cubic

Show full content in detail views (e.g., basecamp show) instead of truncating at 40 characters, so message bodies are fully readable while keeping existing formatting rules.

  • Bug Fixes
    • Added formatDetailValue for detail views and use it in both styled and markdown renderers to preserve full strings.
    • Keeps ANSI stripping, HTML→Markdown conversion, and newline collapsing; date formatting unchanged via formatDateValue with new isDateColumn helper.
    • Table/list truncation unchanged (formatCell caps at 40 chars); added tests to verify no truncation and HTML→Markdown in detail views.

Written for commit e04384b. Summary will update on new commits.

The generic formatCell function truncates all non-URL strings to 40
display characters, which is appropriate for table rows but wrong for
detail views like `basecamp show`. A message's content field — often
the thing you're trying to read — was getting cut to 40 chars.

Add formatDetailValue for renderObject (detail/single-object views)
that preserves full string content while still applying ANSI stripping,
HTML-to-Markdown conversion, and newline collapsing. Date formatting
and table/list truncation are unchanged.
@robzolkos robzolkos requested a review from a team as a code owner March 17, 2026 13:02
Copilot AI review requested due to automatic review settings March 17, 2026 13:02
@github-actions github-actions bot added output Output formatting and presentation enhancement New feature or request labels Mar 17, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes detail views (basecamp show) truncating content at 40 characters by introducing formatDetailValue, which preserves full string content while maintaining ANSI stripping, HTML→Markdown conversion, and newline collapsing.

Changes:

  • Added formatDetailValue function that formats values for single-object detail views without truncation
  • Updated both renderObject (styled) and MarkdownRenderer.renderObject to use formatDetailValue instead of formatDateValue

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-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.

No issues found across 1 file

@github-actions github-actions bot added tests Tests (unit and e2e) bug Something isn't working and removed enhancement New feature or request labels Mar 17, 2026
@robzolkos robzolkos requested a review from jeremy March 17, 2026 15:33
@jeremy jeremy merged commit 4abc7b1 into main Mar 18, 2026
26 checks passed
@jeremy jeremy deleted the show-full-content-detail-view branch March 18, 2026 20:17
jeremy added a commit to brianevanmiller/basecamp-cli that referenced this pull request Mar 18, 2026
…evanmiller/feature-gap-analysis

* origin/main:
  Show full content in detail views instead of truncating at 40 chars (basecamp#338)
  Switch CODEOWNERS from sip to cli team (basecamp#346)
  Fix dock ordering and add --all flag to `projects show` (basecamp#333)
  Add file upload command to SKILL.md (basecamp#343)
  Replace "pending" with "incomplete" in todos output; omit from default view (basecamp#327)
  Add `--in` as global alias for `--project` (basecamp#334)
  Fix 3 post-QA issues on api command (basecamp#330)
  deps: bump the go-dependencies group with 2 updates (basecamp#331)
  Improve tool instance disambiguation format (basecamp#329)
  Fix emoji/CJK alignment in search results (basecamp#328)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working output Output formatting and presentation tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants