Skip to content

fix(area): wrap long lines before updating - #811

Merged
MarvinJWendt merged 6 commits into
pterm:masterfrom
linhdmn:fix/area-update-clear
Oct 10, 2026
Merged

MarvinJWendt merged 6 commits into
pterm:masterfrom
linhdmn:fix/area-update-clear

Conversation

@linhdmn

@linhdmn linhdmn commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • wrap long AreaPrinter content at the current terminal width before passing it to atomicgo.dev/cursor
  • use PTerm's existing Unicode-aware internal.WrapText helper so wrapped rows are represented as explicit newlines and cleared on later updates
  • add a regression test for the soft-wrapped streaming case
  • keep live-printer tests portable across Windows console APIs and Unix ANSI output

Testing

  • go test ./...
  • go vet ./...
  • go test -race -run '^TestAreaPrinter_|^TestMultiPrinter_' .
  • GitHub Actions on Linux, macOS, and Windows: all passing
  • Lint: passing

Closes #789.

@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.22%. Comparing base (bacb2fc) to head (8b2167d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #811   +/-   ##
=======================================
  Coverage   92.21%   92.22%           
=======================================
  Files          66       66           
  Lines        4318     4319    +1     
=======================================
+ Hits         3982     3983    +1     
  Misses        244      244           
  Partials       92       92           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added fix and removed fix labels Sep 23, 2026
@github-actions github-actions Bot added fix and removed fix labels Sep 24, 2026
Wrapping after the fullscreen padding made a wrapped frame taller than the terminal. Wrap right after storing the content so Center and Fullscreen work on the final rows, and add a regression test for the fullscreen case.
@MarvinJWendt
MarvinJWendt merged commit bd0eeee into pterm:master Oct 10, 2026
5 of 7 checks passed
linhdmn added a commit to linhdmn/linhdmn that referenced this pull request Oct 10, 2026
Replace the selected-work list with a complete star-ordered inventory of
the FreePeak infrastructure repositories, a featured block, and a
merged-only upstream contributions list.

FreePeak table (14 repos, live shields.io star badges, descending order):
db-mcp-server, LeanKG, cortex, ktme, commitgen, kai, cursor-usage, xdev,
dsh-feature-loop, dsh-mux, devagent, onegw, mermaid-mcp-server,
token-lens. The 48 zero-signal browser arcade games are excluded and
remain reachable through the organization link.

Upstream contributions list only pull requests with a non-null
merged_at: pterm/pterm#811, pulumi/pulumi#24775,
charmbracelet/bubbles#1057, diegosouzapw/OmniRoute (6 merged), and
punkpeye/awesome-mcp-servers#355. Each keeps its owner/repo link and a
merged marker; no sole-authorship is implied.

docs/PRD.md records the star-order decision, the game exclusion, the
merged-only upstream rule, and the 2026-10-10 verification basis.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Area does not clear properly when calling area.update()

2 participants