Skip to content

Fix: tolerate CRLF line endings in action-item toggle/count#21

Merged
parameshjava merged 1 commit into
mainfrom
fix/action-items-crlf
May 30, 2026
Merged

Fix: tolerate CRLF line endings in action-item toggle/count#21
parameshjava merged 1 commit into
mainfrom
fix/action-items-crlf

Conversation

@parameshjava

Copy link
Copy Markdown
Owner

Final piece of the action-items checkbox fixes. The line-mapping fix already landed in main via #20; this carries the remaining CRLF fix (it was only on #19, which #20 did not include).

Problem

toggleActionItem splits action_items_md on \n and matches the end-anchored CHECKBOX_LINE. A value stored with CRLF (\r\n) leaves a trailing \r on each line, so - [ ] task\r fails the regex → {"ok":false,"error":"Line is not an action item"} for every checkbox-with-text line.

Fix

  • action-items.ts — split on any line ending (\r\n|\r|\n) and rejoin as LF in toggleCheckboxAt; same for countActionItems. Toggling self-heals stored CRLF data to LF.
  • meetings.ts — normalize CRLF→LF on write in updateActionItems, so CRLF can't be stored going forward.
  • Tests for CRLF toggle + count.

Test Plan

  • npm test — 164/164 (incl. 3 new CRLF cases)
  • npx tsc --noEmit — clean
  • npm run build — compiles

Supersedes the CRLF portion of #19 (closing #19, whose line-mapping commit is now redundant with #20).

🤖 Generated with Claude Code

A value stored with CRLF (e.g. pasted text) left a trailing \r on each line
after split('\n'); the end-anchored CHECKBOX_LINE then rejected it, so every
checkbox-with-text line failed to toggle ('Line is not an action item').

Split on any line ending and rejoin as LF (self-heals stored data on toggle),
and normalize CRLF->LF on write in updateActionItems.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented May 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aits-fcf-tracker Ready Ready Preview, Comment May 30, 2026 4:14pm

@parameshjava parameshjava merged commit 0d4cca5 into main May 30, 2026
3 checks passed
@parameshjava parameshjava deleted the fix/action-items-crlf branch May 30, 2026 16:24
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