Skip to content

enh: Docs Checkbox Handling - #528

Merged
taylorwilsdon merged 3 commits into
mainfrom
feature/checkbox-understanding
Mar 1, 2026
Merged

enh: Docs Checkbox Handling#528
taylorwilsdon merged 3 commits into
mainfrom
feature/checkbox-understanding

Conversation

@taylorwilsdon

@taylorwilsdon taylorwilsdon commented Mar 1, 2026

Copy link
Copy Markdown
Owner

Checkboxes in Google Docs are read as plain bullet items, so the LLM doesn't know they're checkboxes and writes literal [x]/DONE text. The fix is in docs_markdown.py - detect checklist items and render them as - [ ]/- [x] in markdown.

Summary by CodeRabbit

  • New Features
    • Added comprehensive checklist support for Google Docs to Markdown conversion. Lists are now properly detected as checklists and rendered with [x] for completed items and [ ] for pending items. Formatting maintains correct indentation throughout nested lists, and completed items render cleanly without redundant strikethrough in the converted output.

taylorwilsdon and others added 2 commits March 1, 2026 09:30
Detect checklist items in Google Docs API responses and render them as
- [ ] (unchecked) and - [x] (checked) in markdown, so LLMs understand
checkbox state instead of writing literal [x] or DONE text.

Closes #516

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@taylorwilsdon taylorwilsdon self-assigned this Mar 1, 2026
@taylorwilsdon taylorwilsdon added the enhancement New feature or request label Mar 1, 2026
@coderabbitai

coderabbitai Bot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca00c74 and 2778bc7.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • gdocs/docs_markdown.py
  • gdrive/drive_helpers.py
  • tests/gdocs/test_docs_markdown.py

📝 Walkthrough

Walkthrough

Google Docs to Markdown conversion now supports checklist lists with checked/unchecked item rendering. Two new helper functions detect checklists and checked items, while the text rendering pipeline accepts a skip_strikethrough flag to prevent redundant formatting on completed items. A new constant for shortcut field resolution was also added.

Changes

Cohort / File(s) Summary
Checklist Support Implementation
gdocs/docs_markdown.py
Added checklist detection (_is_checklist, _is_checked) and extended text rendering with skip_strikethrough parameter through _convert_paragraph_text, _convert_text_run, and _apply_text_style to render checklist items as "- [ ]" or "- [x]" without redundant strikethrough.
Drive Helpers Constant
gdrive/drive_helpers.py
Added BASE_SHORTCUT_FIELDS constant for reusable base field set in shortcut resolution queries.
Checklist Tests
tests/gdocs/test_docs_markdown.py
Added CHECKLIST_DOC fixture and TestChecklists class with four tests validating unchecked items, checked items, strikethrough suppression, and non-checklist bullet preservation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Checkmarks now hop through your docs,
With boxes checked and unmarked stocks,
No strikethrough shadows when tasks are done,
Markdown conversions—what whimsical fun!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal but accurately explains the problem and solution; it does not follow the repository's description template with required sections. Expand description to include Type of Change, Testing checklist, and other template sections to meet repository requirements.
Docstring Coverage ⚠️ Warning Docstring coverage is 73.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding checkbox/checklist handling to Google Docs Markdown conversion.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/checkbox-understanding

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@taylorwilsdon

Copy link
Copy Markdown
Owner Author

Works nicely

@taylorwilsdon
taylorwilsdon merged commit 7cd46d7 into main Mar 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant