Skip to content

fix : added ASCII fallback for Chart widget axis characters - #3438

Open
tmdeveloper007 wants to merge 2 commits into
Karanjot786:mainfrom
tmdeveloper007:fix/chart-ascii-fallback
Open

fix : added ASCII fallback for Chart widget axis characters#3438
tmdeveloper007 wants to merge 2 commits into
Karanjot786:mainfrom
tmdeveloper007:fix/chart-ascii-fallback

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Description

Fixes a bug in the Chart widget where axis lines always render with Unicode box-drawing characters (, , , ), even when the terminal does not support Unicode. This causes display issues on ASCII-only terminals.

The fix adds caps.unicode checks for all axis characters, falling back to |, -, + when Unicode is disabled.

Changes

  • packages/widgets/src/data/Chart.ts — added axisVert, axisHoriz, axisCorner, axisTick constants using caps.unicode
  • packages/widgets/src/data/Chart.test.ts — added test verifying ASCII axis fallback

Related Issues

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • Code follows the existing style
  • Tests added or updated
  • Documentation updated (if applicable)
  • All tests pass locally

Note: Please assign this PR to the tmdeveloper007 account.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@tmdeveloper007, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c6e88a97-9b84-4e00-a343-6324a8d274a0

📥 Commits

Reviewing files that changed from the base of the PR and between 6c7584e and dce7f23.

📒 Files selected for processing (4)
  • packages/widgets/src/data/Chart.test.ts
  • packages/widgets/src/data/Chart.ts
  • packages/widgets/src/display/Code.test.ts
  • packages/widgets/src/display/Code.ts

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.

@github-actions github-actions Bot added area:widgets @termuijs/widgets type:testing +10 pts. Tests. labels Aug 3, 2026
@tmdeveloper007 tmdeveloper007 reopened this Aug 3, 2026
@Karanjot786

Copy link
Copy Markdown
Owner

Thanks for the contribution. The widget change itself is fine, but there are issues to fix before this merges.

Issues:

  1. Bundled Code.ts commit is out of scope
    Files: packages/widgets/src/display/Code.ts, packages/widgets/src/display/Code.test.ts
    Problem: this PR carries the same Code widget commit as fix : added ASCII fallback for Code widget gutter pipe character #3435. That change is being handled in fix : added ASCII fallback for Code widget gutter pipe character #3435; it doesn't belong here.
    Fix: after fix : added ASCII fallback for Code widget gutter pipe character #3435 lands, merge current main into this branch and confirm git diff main -- packages/widgets/src/display/Code.ts is empty. Until then, drop the commit from this branch.

  2. Branch conflicts with main
    Fix: merge current main into your branch and resolve.

  3. CI never ran the build
    Problem: build-and-test has not executed on this branch, so the change is unverified.
    Fix: pushing after the merge will trigger it; make sure it goes green.

  4. Title format
    Fix: fix(widgets): add ASCII fallback for ... (no space before the colon).

Checklist before re-requesting review:

  • Code.ts / Code.test.ts no longer differ from main
  • Merged main, no conflicts, build-and-test green
  • PR title follows format: type(scope): description

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

Labels

area:widgets @termuijs/widgets type:testing +10 pts. Tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix : Chart widget axes render Unicode chars without ASCII fallback

2 participants