Skip to content

fix(bug): critical table bugs, add health check, and improve reference id handling#111

Merged
YousefHadder merged 6 commits intomainfrom
fix/critical-bugs-and-health-check
Nov 7, 2025
Merged

fix(bug): critical table bugs, add health check, and improve reference id handling#111
YousefHadder merged 6 commits intomainfrom
fix/critical-bugs-and-health-check

Conversation

@YousefHadder
Copy link
Copy Markdown
Owner

Summary

This PR fixes critical bugs identified in code review and adds important features to improve plugin reliability and user experience.

Changes

Critical Fixes

New Features

Tests

  • 30 new tests for row_mapper validation
  • 8 new tests for health check functionality
  • 8 new tests for unique reference ID generation
  • 4 new tests for UTF-8 safety
  • All 305 tests passing

Documentation

  • Updated README with Troubleshooting section
  • Health check usage instructions
  • Common issues and solutions

Test Plan

  • All existing tests pass
  • New tests added for all fixes
  • Lint and format checks pass
  • Health check runs successfully with :checkhealth markdown-plus

Notes

Issue #4 (UTF-8 multi-byte character handling) was attempted but deferred due to implementation complexity. Basic safety tests added to ensure no crashes with UTF-8 input.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings November 7, 2025 00:16
@YousefHadder YousefHadder changed the title fix: critical table bugs, add health check, and improve reference ID handling fix: critical table bugs, add health check, and improve reference id handling Nov 7, 2025
@YousefHadder YousefHadder changed the title fix: critical table bugs, add health check, and improve reference id handling fix(bug): critical table bugs, add health check, and improve reference id handling Nov 7, 2025
@YousefHadder YousefHadder force-pushed the fix/critical-bugs-and-health-check branch from 5f913cc to 6b8795c Compare November 7, 2025 00:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive testing infrastructure and health check functionality to markdown-plus.nvim, along with refactoring of table row index handling.

Key Changes:

  • Introduces a row_mapper module to centralize table row index conversions between position-based and cells array-based indexing
  • Adds health check module (:checkhealth markdown-plus) for configuration validation and diagnostics
  • Expands test coverage with new test suites and additional test cases for links, formatting, and health checks

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
spec/markdown-plus/table_row_mapper_spec.lua Comprehensive test suite for new row_mapper module with 237 lines of tests
spec/markdown-plus/links_spec.lua Adds 158 lines of tests for reference link ID generation and collision handling
spec/markdown-plus/health_spec.lua New test suite (115 lines) for health check functionality
spec/markdown-plus/format_spec.lua Adds UTF-8 handling tests to ensure plugin doesn't crash with emoji, accents, and CJK characters
lua/markdown-plus/table/row_mapper.lua New module centralizing row index mapping logic with validation and helper functions
lua/markdown-plus/table/navigation.lua Updates row validation to use simplified bounds checking
lua/markdown-plus/table/manipulation.lua Refactors insert_row, delete_row, and duplicate_row to use row_mapper module for safer index handling
lua/markdown-plus/links/init.lua Adds unique reference ID generation with collision detection and URL reuse logic
lua/markdown-plus/health.lua New health check module validating Neovim version, config, features, and detecting plugin conflicts
README.md Adds comprehensive troubleshooting section with health check documentation and common issues

Copilot AI review requested due to automatic review settings November 7, 2025 00:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

@YousefHadder YousefHadder force-pushed the fix/critical-bugs-and-health-check branch from 98f0061 to 884b0c1 Compare November 7, 2025 00:31
Copilot AI review requested due to automatic review settings November 7, 2025 00:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

@YousefHadder YousefHadder force-pushed the fix/critical-bugs-and-health-check branch from 908c201 to 37d3a64 Compare November 7, 2025 00:38
@YousefHadder YousefHadder merged commit e31d3a0 into main Nov 7, 2025
14 checks passed
@YousefHadder YousefHadder deleted the fix/critical-bugs-and-health-check branch November 7, 2025 00:39
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.

2 participants