Skip to content

fix(renderer): keep commit tooltip lines intact - #14000

Merged
Jinwoo-H merged 1 commit into
mainfrom
bug-commit-message-tooltip-wraps-lines-too-early
Aug 12, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
bug-commit-message-tooltip-wraps-lines-too-early

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #13793 / STA-3893.

The Source Control commit-history tooltip is the one tooltip rendering a pre-formatted, multiline commit message, but it inherited the shared tooltip label defaults: max-w-96 plus balanced text wrapping. That made authored 67- and 72-character commit-message lines soft-wrap early even when the viewport had enough room.

This keeps the ownership local to GitHistoryRow: commit-message tooltip content now uses a semantic 76ch cap, Radix's available-width collision bound, plain wrapping instead of text-balance, and break-words for long SHA/URL-like tokens. Shared TooltipContent remains tuned for short labels.

Reference: PR #13811 identified the same local width/wrap direction; this PR adds the deterministic regression oracle and full red/green/revert evidence.

Before / after proof

Before on affected main: the reported 67-character line splits before update:.

before-latest-main.png

After candidate: the reported line and representative 72-character line stay on one visual line while explicit paragraph breaks remain.

after-candidate-light.png

Deterministic oracle

Falsifiable invariant: at a sufficiently wide viewport, the reported line and representative conventional-width commit prose through 72 characters render as one visual line; explicit newlines remain hard breaks. The 76ch readable-measure cap is intentionally not a guarantee for every possible 72-glyph proportional-font string.

Observable failure: the reported 67-character line and a 72-character fixture render as two visual lines on affected main / disabled-fix control.

Authoritative subsystem: src/renderer/src/components/right-sidebar/GitHistoryRow.tsx tooltip presentation, not Git parsing, provider behavior, IPC, or remote transport.

Same byte-identical Playwright/Electron oracle:

  • affected latest-main behavior: RED [2, 2]
  • candidate fix: GREEN [1, 1]
  • candidate with the fix reverted/disabled: RED [2, 2]

The test also asserts exact tooltip text/newlines, white-space: pre-wrap, text-wrap: wrap, viewport containment, and no overflow from a long unbroken URL.

Validation

Post-rebase onto origin/main 36d45af062:

  • pnpm exec playwright test tests/e2e/git-history-tooltip-wrap.spec.ts --config tests/playwright.config.ts --project electron-headless --workers=1 ✅
  • pnpm typecheck ✅
  • pnpm exec oxlint src/renderer/src/components/right-sidebar/GitHistoryRow.tsx tests/e2e/git-history-tooltip-wrap.spec.ts ✅
  • pnpm exec oxfmt --check src/renderer/src/components/right-sidebar/GitHistoryRow.tsx tests/e2e/git-history-tooltip-wrap.spec.ts ✅
  • git diff --check ✅

Pre-rebase full validation also passed:

  • pnpm lint ✅ (only existing WorktreeJumpPalette hook warnings in the first oxlint phase)
  • focused E2E oracle ✅
  • two read-only internal review lanes returned CLEAN ✅

Scope and compatibility

  • UI-only CSS/class change; no IPC, persistence, RPC, stream, Git command, provider, or mobile wire surface changed.
  • Neutral for macOS/Linux/Windows, SSH/remote, folder workspaces, git worktrees, WSL, GitLab/other providers, and Git 2.25 because the fix changes only renderer tooltip presentation for already-loaded commit text.
  • Alternative rejected: changing shared TooltipContent would affect ~180 short-label tooltips; a dedicated component is premature while GitHistoryRow is the only multiline/pre-wrap tooltip consumer; raw viewport math is less correct than Radix's available-width variable.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9eae863a-db97-40ec-adab-9b4d1fd14f96

📥 Commits

Reviewing files that changed from the base of the PR and between 36d45af and 8213469.

📒 Files selected for processing (2)
  • src/renderer/src/components/right-sidebar/GitHistoryRow.tsx
  • tests/e2e/git-history-tooltip-wrap.spec.ts

📝 Walkthrough

Walkthrough

The commit subject tooltip now uses responsive available-width sizing, collision padding, word breaking, and preserved whitespace. A new Playwright end-to-end test creates a temporary worktree and commit, opens the commit history tooltip, and checks message preservation, line wrapping, viewport containment, and horizontal overflow.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address issue #13793 by preserving explicit breaks, supporting 72-character lines, and wrapping only when required.
Out of Scope Changes check ✅ Passed The renderer styling change and focused E2E regression test remain within the linked issue scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and concisely describes the main change: preserving commit-history tooltip line formatting.
Description check ✅ Passed The description explains the problem, solution, linked issue, visual proof, testing, scope, and compatibility, but omits several template headings and checklist details.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@Jinwoo-H

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Jinwoo-H
Jinwoo-H merged commit 346e59c into main Aug 12, 2026
48 checks passed
@Jinwoo-H
Jinwoo-H deleted the bug-commit-message-tooltip-wraps-lines-too-early branch August 12, 2026 08:12
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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.

[Bug]: Commit message tooltip wraps lines too early in Source Control

1 participant