fix: inconsistent left padding in preview file path truncation#1197
fix: inconsistent left padding in preview file path truncation#1197kimjune01 wants to merge 3 commits into
Conversation
The file path in the code preview panel showed inconsistent left padding when truncated. The .truncate-start CSS class used direction: rtl with text-align: left, which caused the flex layout to render inconsistently with the gutter width calculation. Changed text-align from left to right to properly align RTL text and eliminate the padding inconsistency. Fixes sourcebot-dev#103 Closes sourcebot-dev#1196
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThis PR changes ChangesPreview File Path Truncation Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 22: Update the CHANGELOG.md entry that currently reads "Fixed
inconsistent left padding in preview window file path truncation.
[`#1196`](https://github.com/sourcebot-dev/sourcebot/issues/1196)" to reference
the correct pull request: change the PR id to 1197 and point the URL to the pull
request page (https://github.com/sourcebot-dev/sourcebot/pull/1197) so the line
ends with [`#1197`](https://github.com/sourcebot-dev/sourcebot/pull/1197); locate
the exact string in CHANGELOG.md and replace both the numeric id and the
/issues/ URL accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cda6d1fc-5f61-4f86-8909-093154ae84f2
📒 Files selected for processing (2)
CHANGELOG.mdpackages/web/src/app/globals.css
| - Upgraded `hono` to `^4.12.18` to address CVE-2026-44455, CVE-2026-44456, CVE-2026-44457, CVE-2026-44458. [#1186](https://github.com/sourcebot-dev/sourcebot/pull/1186) | ||
| - Upgraded `ip-address` to `^10.2.0` to address CVE-2026-42338. [#1189](https://github.com/sourcebot-dev/sourcebot/pull/1189) | ||
| - Upgraded `fast-xml-builder` to `^1.2.0` to address CVE-2026-44664, CVE-2026-44665. [#1184](https://github.com/sourcebot-dev/sourcebot/pull/1184) | ||
| - Fixed inconsistent left padding in preview window file path truncation. [#1196](https://github.com/sourcebot-dev/sourcebot/issues/1196) |
There was a problem hiding this comment.
Incorrect PR reference in changelog entry.
The changelog entry references #1196 with an /issues/ URL, but this PR is #1197. According to the coding guidelines, changelog entries must reference the PR number in the format [#<id>](https://github.com/sourcebot-dev/sourcebot/pull/<id>).
🔗 Proposed fix
-- Fixed inconsistent left padding in preview window file path truncation. [`#1196`](https://github.com/sourcebot-dev/sourcebot/issues/1196)
+- Fixed inconsistent left padding in preview window file path truncation. [`#1197`](https://github.com/sourcebot-dev/sourcebot/pull/1197)As per coding guidelines, entries must include the GitHub pull request id at the end of the line, formatted as # where the URL points to the pull request, not the issue.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Fixed inconsistent left padding in preview window file path truncation. [#1196](https://github.com/sourcebot-dev/sourcebot/issues/1196) | |
| - Fixed inconsistent left padding in preview window file path truncation. [`#1197`](https://github.com/sourcebot-dev/sourcebot/pull/1197) |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CHANGELOG.md` at line 22, Update the CHANGELOG.md entry that currently reads
"Fixed inconsistent left padding in preview window file path truncation.
[`#1196`](https://github.com/sourcebot-dev/sourcebot/issues/1196)" to reference
the correct pull request: change the PR id to 1197 and point the URL to the pull
request page (https://github.com/sourcebot-dev/sourcebot/pull/1197) so the line
ends with [`#1197`](https://github.com/sourcebot-dev/sourcebot/pull/1197); locate
the exact string in CHANGELOG.md and replace both the numeric id and the
/issues/ URL accordingly.
|
heya - thx for raising. Can you provide before / after screenshots? |
Summary
.truncate-startCSStext-alignfromlefttorightto fix inconsistent ~30% left padding when displaying long file paths in the code preview paneldirection: rtlcombined withtext-align: leftcaused flex layout rendering inconsistencies across browsersFixes #103
Test plan
Summary by CodeRabbit