Highlight overlong JJ descriptions and auto-fill body#61
Conversation
|
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 (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThis PR extends JJ description buffer editing with two new user-configurable options: ChangesJJ description customization options
🎯 2 (Simple) | ⏱️ ~12 minutes
🚥 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)
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
majutsu-jjdescription.el (1)
655-660:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRe-apply fill/auto-fill settings after major-mode changes.
majutsu-jjdescription-setupnow configuresfill-columnand auto-fill (Line 625-629), butmajutsu-jjdescription-setup-font-lock-in-buffer(Line 655-660) only reapplies comments/font-lock. After a major-mode switch, JJ description buffers can lose the new fill behavior.Suggested fix
(defun majutsu-jjdescription-setup-font-lock-in-buffer () "Refresh JJ description font-lock after major-mode changes." (when (and buffer-file-name (string-match-p majutsu-jjdescription-regexp buffer-file-name)) (majutsu-jjdescription-setup-comments) + (when majutsu-jjdescription-fill-column + (setq-local fill-column majutsu-jjdescription-fill-column)) + (majutsu-jjdescription-setup-auto-fill) (majutsu-jjdescription-setup-font-lock)))Also applies to: 625-629
🤖 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 `@majutsu-jjdescription.el` around lines 655 - 660, majutsu-jjdescription-setup currently configures fill-column and auto-fill; ensure those same settings are reapplied after major-mode changes by updating majutsu-jjdescription-setup-font-lock-in-buffer to call the fill/auto-fill reconfiguration (the same logic used in majutsu-jjdescription-setup, e.g., setting fill-column and enabling/disabling auto-fill-mode) in addition to calling majutsu-jjdescription-setup-comments and majutsu-jjdescription-setup-font-lock; also verify the fill/auto-fill setup code in majutsu-jjdescription-setup is factored into a helper (or made idempotent) so both majutsu-jjdescription-setup and majutsu-jjdescription-setup-font-lock-in-buffer can reuse it.
🤖 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 `@majutsu-jjdescription.el`:
- Around line 88-89: Constrain the customization
majutsu-jjdescription-summary-max-length to non-negative integers (e.g. change
its defcustom :type to an integer with :min 0 or add a :validate to reject
negatives) so majutsu-jjdescription--summary-regexp and
majutsu-jjdescription--build-font-lock-keywords never receive a negative value;
also ensure after-change-major-mode-hook invokes the full setup by calling
majutsu-jjdescription-setup (not just
majutsu-jjdescription-setup-font-lock-in-buffer) so fill-column and auto-fill
setup run in new buffers.
---
Outside diff comments:
In `@majutsu-jjdescription.el`:
- Around line 655-660: majutsu-jjdescription-setup currently configures
fill-column and auto-fill; ensure those same settings are reapplied after
major-mode changes by updating majutsu-jjdescription-setup-font-lock-in-buffer
to call the fill/auto-fill reconfiguration (the same logic used in
majutsu-jjdescription-setup, e.g., setting fill-column and enabling/disabling
auto-fill-mode) in addition to calling majutsu-jjdescription-setup-comments and
majutsu-jjdescription-setup-font-lock; also verify the fill/auto-fill setup code
in majutsu-jjdescription-setup is factored into a helper (or made idempotent) so
both majutsu-jjdescription-setup and
majutsu-jjdescription-setup-font-lock-in-buffer can reuse it.
🪄 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: 08b7616e-e045-437a-b14e-775934d15a85
📒 Files selected for processing (4)
docs/majutsu.orgdocs/majutsu.teximajutsu-jjdescription.eltest/majutsu-jjdescription-test.el
de7a73d to
044ce96
Compare
Add configurable JJ description summary length highlighting using Magit's 68-column default, and configure fill-column for description buffers. Enable auto-fill during JJ description setup while skipping the summary line, mirroring git-commit behavior. Document the new options and cover summary highlighting/fill-column setup with tests.
044ce96 to
14d68aa
Compare
Add configurable JJ description summary length highlighting using Magit's 68-column default, and configure fill-column for description buffers.
Enable auto-fill during JJ description setup while skipping the summary line, mirroring git-commit behavior. Document the new options and cover summary highlighting/fill-column setup with tests.
Summary by CodeRabbit