-
Notifications
You must be signed in to change notification settings - Fork 0
Some minor QoL features around spellcheck #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Fixed typos in generic-testing blog post: - 'exapmle' → 'example' (3 instances) - 'actuall' → 'actually' (1 instance) - 'Algrebra' → 'Algebra' (1 instance) - Added technical terms to cspell dictionary: - microbenchmarks - Xcodes - metatype/metatypes All HTML spellcheck tests now pass. Co-authored-by: Claude <noreply@anthropic.com>
This change ensures that markdown syntax in titles (like *italic* and **bold**) is properly rendered as HTML when displayed on pages, while being stripped for meta tags, browser titles, and Open Graph images. Changes: - Add stripMarkdown() function to remove markdown syntax for plain text contexts - Update page templates to render markdown in displayed titles using renderInlineMarkdown() - Strip markdown from titles in meta tags, Open Graph data, and browser title - Improve semantic HTML by using <h1> instead of <div> for page titles Fixes issue where asterisks and other markdown syntax appeared literally in article titles instead of being rendered as formatted text. Co-authored-by: Claude <noreply@anthropic.com>
* "Claude PR Assistant workflow" * "Claude Code Review workflow"
PR Validation ❌Some checks failed. Please review the errors above. Checks Performed:Please check the workflow logs for details on which checks failed. This is a complete dry-run of the deployment process, ensuring your changes will deploy successfully when merged. |
PR Review: Some minor QoL features around spellcheckThanks for these quality-of-life improvements! This PR adds useful tooling around spellcheck management and refactors the justfile. Overall, the changes are well-implemented. Here's my detailed review: ✅ Code Quality & Best PracticesStrengths:
Minor Issues:
🐛 Potential Bugs
⚡ Performance Considerations
🔒 Security ConcernsMinor Issue:
Good practices observed:
🧪 Test CoverageMissing:
Recommendations:
📝 Additional ObservationsPositive changes:
Questions/Suggestions:
🎯 SummaryOverall Assessment: ✅ Good to merge with minor improvements This PR delivers solid quality-of-life improvements. The main suggestions are:
The changes are safe to merge as-is, but addressing the module type and error handling would improve robustness. Priority fixes before merge:
Nice-to-haves:
|
PR Review: QoL Features Around SpellcheckThanks for this PR! Overall, this is a clean refactoring that improves code organization and adds a helpful utility. Here's my detailed review: ✅ Strengths
🔍 Code Quality Observations
|
Change single quotes to double quotes to comply with project ESLint config. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PR Validation ❌Some checks failed. Please review the errors above. Checks Performed:Please check the workflow logs for details on which checks failed. This is a complete dry-run of the deployment process, ensuring your changes will deploy successfully when merged. |
PR Validation ✅All checks passed! Ready for review. Checks Performed:✓ Linting This is a complete dry-run of the deployment process, ensuring your changes will deploy successfully when merged. |
PR Review: Some minor QoL features around spellcheckOverall, this is a solid PR that improves developer experience with good refactoring and useful new functionality. The changes are well-structured and follow good practices. ✅ Strengths
🔍 Code Quality Observationsscripts/learn-spelling.jsPositive:
Minor Concerns:
Shell Scripts (preview-server.sh, shutdown-server.sh, open-browser.sh)Positive:
Platform Compatibility Concern:
cspell.jsonPositive:
Minor:
🛡️ Security ConsiderationsLow Risk: No security concerns identified. Scripts handle user input appropriately with proper quoting and validation. ⚡ Performance ConsiderationsNo issues: The scripts are efficient for their purpose. The 3-second sleep in preview-server.sh is reasonable for startup time. 🧪 Test CoverageNot Applicable: These are developer utility scripts. Manual testing is appropriate, though you could consider:
📋 Suggestions
📝 DocumentationThe justfile comments are clear, but consider adding:
✅ RecommendationApprove with minor suggestions. The core functionality is solid and ready to merge. The suggestions above are enhancements, not blockers. The platform compatibility issue with Nice work on the QoL improvements! 🎉 |
Configures a PostToolUse hook that runs after Write/Edit operations: - ESLint fix for js/jsx/ts/tsx/astro files - Spellcheck for md/mdx files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PR Validation ✅All checks passed! Ready for review. Checks Performed:✓ Linting This is a complete dry-run of the deployment process, ensuring your changes will deploy successfully when merged. |
Pull Request Review: QoL Features for SpellcheckOverall, this is a well-structured PR that adds useful developer quality-of-life improvements. Here's my detailed review: ✅ Strengths
🔍 Issues & Recommendations1. Security/Robustness Issuesscripts/learn-spelling.js:24-25 - Missing error handling for file operations: const configPath = path.join(process.cwd(), "cspell.json");
const config = JSON.parse(fs.readFileSync(configPath, "utf8"));Issue: No error handling if Recommendation: Add try-catch: try {
const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
} catch (err) {
console.error(`Error reading cspell.json: ${err.message}`);
process.exit(1);
}2. Potential Bugsscripts/open-browser.sh:15 - Platform-specific command: open "http://localhost:$PORT"Issue: The Recommendation: Add platform detection or document macOS-only requirement in CLAUDE.md. 3. Code Quality Issues.claude/hooks/lint-on-save.sh:19 - Inefficient spellcheck: *.md|*.mdx)
cd "$CLAUDE_PROJECT_DIR"
npm run spellcheck 2>/dev/null || trueIssue: Runs spellcheck on all source files when only one file changed. This could be slow for large projects. Recommendation: Either:
scripts/preview-server.sh:24 - Fixed sleep duration: sleep 3Issue: Hard-coded 3-second wait may be too short on slower systems or too long on fast ones. Recommendation: Consider a polling approach with timeout: for i in {1..10}; do
if lsof -i :"$PORT" | grep -q LISTEN; then
echo "Server started successfully"
exit 0
fi
sleep 1
done
echo "Error: Server failed to start in time"
exit 14. Missing Input Validationscripts/learn-spelling.js:13-16 - No word validation: const newWords = process.argv[2]
.split(",")
.map(w => w.trim())
.filter(w => w.length > 0);Issue: Accepts any input without validation. Could add problematic entries to the dictionary. Recommendation: Add basic validation: const newWords = process.argv[2]
.split(",")
.map(w => w.trim())
.filter(w => w.length > 0 && /^[a-zA-Z0-9-]+$/.test(w));5. Code Stylecspell.json - The formatting changes (adding line breaks in arrays) are fine but seem unrelated to the core PR purpose. Consider mentioning this was auto-formatting in the PR description. 🎯 Performance Considerations
🔒 SecurityNo major security concerns. All user inputs are properly quoted in shell scripts, preventing injection attacks. 🧪 Test CoverageMissing: No tests for the new scripts. Consider adding:
📝 DocumentationMinor issue: The justfile comment says scripts are "gathered in a single place" but now much logic is in separate files. Update CLAUDE.md to mention the new 🎁 Nice-to-Haves (Optional)
📊 SummaryVerdict: ✅ Approve with minor suggestions This PR adds genuine value and the code quality is good. The issues identified are mostly minor edge cases that could be addressed in follow-up work. The refactoring from inline justfile logic to separate scripts is a positive change. Priority fixes (if you choose to address them):
Great work on improving the developer experience! 🚀 |
Code Review - PR #21: QoL Features Around SpellcheckThank you for this PR! I've reviewed the changes and have several observations organized by category. Positive HighlightsWell-Structured Additions
Code Quality
Issues and ConcernsCritical: Security and Reliability1. Shell Injection Vulnerability in lint-on-save.shLocation: .claude/hooks/lint-on-save.sh:6, :15, :19 The hook script uses jq to parse JSON but doesn't validate/sanitize the file path before using it in shell commands. If a malicious file path contains shell metacharacters, it could lead to command injection. Recommendation: Add validation to ensure the file path is safe and within the project directory. 2. Spellcheck Runs on ALL .md FilesLocation: .claude/hooks/lint-on-save.sh:17-19 When any markdown file is edited, npm run spellcheck runs against the entire project, not just the edited file. This is inefficient and could be slow for large projects. Recommendation: If cspell supports single-file checking, consider running it only on the modified file. Medium Priority3. macOS-Only Command in ScriptsLocation: scripts/open-browser.sh:15 The open command is macOS-specific. This will fail on Linux/Windows. Recommendation: Add cross-platform support using xdg-open for Linux or provide fallback messaging. 4. Missing write-pull-requests PermissionLocation: .github/workflows/claude-code-review.yml:26 The workflow can read PRs but cannot write comments back to them. The gh pr comment command in the prompt will fail. Required fix: Change pull-requests: read to pull-requests: write in the permissions section. 5. Hardcoded Sleep May Be InsufficientLocation: scripts/preview-server.sh:24 sleep 3 assumes the server starts in 3 seconds, but this may vary by machine load. Better approach: Use a retry loop with timeout instead of a fixed sleep duration. 6. Race Condition in Server ScriptsLocation: scripts/preview-server.sh Between checking if port is in use (line 13) and starting the server (line 21), another process could bind to that port. Note: This is unlikely in practice but worth documenting as a known limitation. Low Priority7. Inconsistent Error OutputSome scripts echo to stdout when nothing is found, others treat it as an error. Consider standardizing exit codes and output levels. 8. Missing Executable CheckThe script has a shebang but the justfile calls it via node. Either remove the shebang or make it executable and call it directly. Other ObservationsCLAUDE.md CleanupThe reduction from 206 lines to 118 lines is great—much more focused and readable. The removal of verbose explanations in favor of succinct documentation is a positive change. Justfile RefactoringExtracting bash to separate scripts is the right call. The justfile is now much cleaner and maintainable. Content UpdatesThe generic-testing blog post received substantial updates (426 additions). I didn't review content quality in detail, but the structure looks sound. Recommendations SummaryMust Fix Before Merge:
Should Fix: Nice to Have: Overall AssessmentThis is a solid QoL improvement PR that adds useful automation and refactors scripts nicely. The main concerns are:
With those two items addressed, this will be good to merge. Great work on the refactoring and Claude Code integration! Review generated by Claude Code |
No description provided.