Skip to content

fix(charts): isolate title markup stripping - #179

Merged
hyperpolymath merged 3 commits into
mainfrom
work/title-markup
Oct 17, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
work/title-markup

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Recover the four-file title-text change from archived commit 1856722 without frontend dependency upgrades. Repeated stripping prevents nested tag fragments surviving a single pass at chart-title measurement and default-title sites. This is a text helper, not a general HTML sanitizer.

Validation with Bun 1.4.3: frozen lockfile installation succeeded; bun run typecheck passed; bun run test passed all 42 tests across 7 files (86 assertions). Diff whitespace check passes. CI remains pending; Julia and R were not run. No dependency changes.

Part of fork-work isolation after #178. Keep separate from the pending upstream repairs.

Recover the focused change from 1856722 without frontend upgrades.
Validated four text utility tests with Bun 1.4.3.
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

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

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d1a1e5af-6e55-4f71-8a39-0003e776e6ab
📥 Commits

Reviewing files that changed from the base of the PR and between 360347e and e83a360.

📒 Files selected for processing: 4
  • frontend/src/components/AnalysisChart.tsx
  • frontend/src/figure/charts.ts
  • frontend/src/utils/text.test.ts
  • frontend/src/utils/text.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 2afc56b2-448a-4c9f-90d5-ee5ef9d5bd6e
📥 Commits

Reviewing files that changed from the base of the PR and between ef893c5 and 360347e.

📒 Files selected for processing: 4
  • frontend/src/components/AnalysisChart.tsx
  • frontend/src/figure/charts.ts
  • frontend/src/utils/text.test.ts
  • frontend/src/utils/text.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 3
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)
🧰 Additional context used
📚 Code guidelines: 1
.github/CONTRIBUTING.md — auto-discovered
📓 Path-based instructions: 1
Applicability reference: AGENTS.md: # AGENTS.md Instructions for coding agents working in this repository.

📄 CodeRabbit inference engine (.github/CONTRIBUTING.md)

Files:

  • frontend/src/figure/charts.ts
  • frontend/src/components/AnalysisChart.tsx
  • frontend/src/utils/text.ts
  • frontend/src/utils/text.test.ts
🔇 Additional comments: 3
frontend/src/utils/text.test.ts: 1

11-13: LGTM!

frontend/src/components/AnalysisChart.tsx: 1

4-4: LGTM!

Also applies to: 11-11

frontend/src/figure/charts.ts: 1

5-5: LGTM!

Also applies to: 123-123

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Figure titles now display without embedded HTML tags in analysis charts.
    • Titles are also measured without HTML markup when fitting them to the available space, helping ensure the displayed size is appropriate.

The change adds stripHtmlTags to the text utilities and uses it in two chart title paths. Tests cover tag removal, plain text containing a bare >, and splitLines behaviour.

Changes: Chart title text

Layer / File(s) Summary
Text stripping utility and tests
frontend/src/utils/text.ts, frontend/src/utils/text.test.ts
Adds stripHtmlTags, which repeatedly removes matching HTML tags. Tests cover markup removal, nested tags, a bare >, and trimmed non-empty lines from splitLines.
Chart title processing
frontend/src/components/AnalysisChart.tsx, frontend/src/figure/charts.ts
figureTitle uses stripHtmlTags and retains its null fallback for empty text. paneFigure uses the utility before measuring title width.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: joshuajewell

Merge Risk: ⚪ Minimal · up to 36034

The title-text change is mergeable after normal checks; no actionable issue remains.

### Architecture Summary

Architecture risk: 🟡 Medium · up to 36034

The change affects 1 system.

Changed systems: frontend

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — frontend (service) was modified; 4 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in frontend/src/components/AnalysisChart.tsx: Imports stripHtmlTags for title text processing.
  • observed — Modified behavior in frontend/src/components/AnalysisChart.tsx: figureTitle replaces its inline tag-removal regular expression with stripHtmlTags; it still returns null for empty text.
  • observed — Modified behavior in frontend/src/figure/charts.ts: Adds the stripHtmlTags utility import.
  • observed — Modified behavior in frontend/src/figure/charts.ts: paneFigure now measures title width after stripping HTML with stripHtmlTags, replacing its inline regular expression.

Reliability and maintainability

  • inferred — Risk-relevant change factors for frontend: blast_radius_2; direct_dependents_2
Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the main change: isolating chart-title markup stripping. It is concise and specific.
Description check Passed The description explains the change, reason, validation results, scope, dependency status, and work excluded. It omits the template headings and contribution-check checklist, but the required technica…
Full details: Description check

Explanation

The description explains the change, reason, validation results, scope, dependency status, and work excluded. It omits the template headings and contribution-check checklist, but the required technical information is mostly present.

✨ Finishing Touches
📝 Generate docstrings
  • Autofix · Stopped

Pull request is closed.

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.

@coderabbitai
coderabbitai Bot requested a review from JoshuaJewell October 17, 2026 10:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-17T19:27:21.473290Z e83a360 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hyperpolymath
hyperpolymath enabled auto-merge (squash) October 17, 2026 10:25
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🤖 Completed: Generate docstrings for PR #179 — View commit eee83e7

@hyperpolymath
hyperpolymath enabled auto-merge (squash) October 17, 2026 10:26
@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Autofix was enabled. Check current status in the Coding task.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@hyperpolymath
hyperpolymath merged commit f151d29 into main Oct 17, 2026
4 checks passed
@hyperpolymath
hyperpolymath deleted the work/title-markup branch October 17, 2026 19:27
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant