Conversation
Code Review - PR #334SummaryThis PR migrates markdown code block rendering from the deprecated ✅ Strengths
🔍 Potential Issues & Suggestions1. Type Safety -
|
… pattern The `inline` prop was removed from react-markdown's code component in v9+, causing fenced code blocks (especially unlanguaged ones) to render as inline code instead of preformatted blocks. Migrated all four markdown rendering locations to override the `pre` component for block code detection, with `code` handling only inline code — the recommended pattern for v10.
Cmd+Shift+Up/Down now selects all content from cursor to top/bottom of the document, matching standard text editor behavior. Previously it just jumped without selecting (same as Cmd+Up/Down).
02c39f6 to
8c18568
Compare
Code Review - PR #334OverviewThis PR includes two distinct fixes:
Part 1: Markdown Code Block Rendering MigrationImplementation QualityThe migration is correctly implemented and follows react-markdown v10 best practices. Key strengths:
Code Quality Issues
Part 2: Editor Keyboard NavigationPotential Bug in Selection Logic (High Severity)The selection direction logic may not work correctly when extending EXISTING selections. Issue: The tests only cover the case where there is NO existing selection (cursor at a single point). They do not test what happens when the user already has a selection and presses Cmd+Shift+Up/Down. Verification Needed: Please test in standard editors (VS Code, TextEdit):
Most editors extend from the active end (cursor position), not from the anchor. Recommendation: Add test cases for extending existing selections before merging. Test Coverage AnalysisWell tested:
Missing coverage:
Security AssessmentNo security issues identified. Overall AssessmentStatus: Approve with Recommendations What is Good:
What Needs Attention:
Code Quality Score: 8/10 Great work fixing this bug! |
…ress Replace delta-based totalTasksAcrossAllDocs tracking with a full recount of all documents after each task completion. This fixes the "19 of 10 tasks completed" bug when tasks in one document create tasks in other documents.
Code Review: PR #334 - 0.15.0 PolishSummaryThis PR addresses three important polish issues for the 0.15.0 release. The changes are well-implemented with good test coverage. Overall quality is strong, with only minor considerations noted below. 🟢 Code Quality & Best PracticesStrengths:
Minor considerations:
🟢 Bug Fixes - Well Executed1. Code Fence Rendering (react-markdown v10)Files: The fix correctly addresses the structural change in react-markdown v10 where block code is now Pattern: pre: ({ children }: any) => {
const codeElement = React.Children.toArray(children).find(
(child: any) => child?.type === 'code' || child?.props?.node?.tagName === 'code'
) as React.ReactElement<any> | undefined;
if (codeElement?.props) {
// Extract and render block code
}
return <pre>{children}</pre>; // Fallback
}✅ Good: Includes fallback rendering 2. Keyboard Navigation in File EditorFiles: Adds Cmd+Shift+Up/Down for selection to beginning/end, complementing existing Cmd+Up/Down movement. Implementation detail ( const anchor = textarea.selectionDirection === 'backward'
? textarea.selectionEnd
: textarea.selectionStart;
textarea.setSelectionRange(0, anchor, 'backward');✅ Good: Correctly preserves the anchor point when extending selection 3. Auto Run Progress Count FixFile: Before: Used delta-based tracking ( let recountedTotal = 0;
for (const doc of documents) {
const { taskCount, checkedCount } = await readDocAndCountTasks(
folderPath,
doc.filename,
sshRemoteId
);
recountedTotal += taskCount + checkedCount;
}✅ Good: Comment clearly explains the rationale: "Tasks in one document can create tasks in other documents"
|
Summary
Accumulated polish fixes for the 0.15.0 release.
Changes
precomponent pattern