Skip to content

Fix CI + add blank-line spacing between top-level groups#12

Merged
TroyHernandez merged 1 commit into
mainfrom
fix-ci-and-spacing
Apr 28, 2026
Merged

Fix CI + add blank-line spacing between top-level groups#12
TroyHernandez merged 1 commit into
mainfrom
fix-ci-and-spacing

Conversation

@TroyHernandez
Copy link
Copy Markdown
Contributor

Summary

CI fix. tests/test_fix_parents_base.R was a top-level R CMD check test using the legacy [X] - text syntax in its status_of regex. The 0.2.0 markdown writer emits - [X] text so the regex never matched. Deleted the file — it duplicates inst/tinytest/test_fix_parents.R, which already covers the same cases against the new format.

Spacing. .df_to_lines was emitting all rows tightly packed. Hand-written daily files typically have blank lines between flat top-level recurring items and project containers. The migrator and run_monday output should reproduce that.

Heuristic: insert a blank line before any depth-0 row that either heads a subtree (next row is deeper) or follows a deeper descendant. Flat siblings stay clustered.

Test plan

  • Removed tests/test_fix_parents_base.R — coverage stays via inst/tinytest/test_fix_parents.R
  • Regression test in test_recurring.R for the spacing rules (heads-a-subtree, follows-a-descendant, flat-siblings-stay-tight)
  • All 197 tests pass
  • Smoke test: fix_parents(preview = TRUE) on a real Daily inserts the blank lines at the expected positions
  • Bump to 0.2.2

CI was failing on tests/test_fix_parents_base.R, a top-level
R CMD check test that used the legacy "[X] - text" syntax in
its status_of regex. The new markdown writer emits "- [X] text"
so the regex never matched. Deleted the file: it duplicates
inst/tinytest/test_fix_parents.R, which already covers the same
cases against the new format.

Spacing: .df_to_lines was emitting all rows tightly packed.
Hand-written daily files typically have blank lines between
flat top-level recurring items (Email, todo, ...) and project
containers (cornball.ai, House). The migrator and run_monday
output should reproduce that.

Heuristic: insert a blank line before any depth-0 row that
either heads a subtree (next row is deeper) or follows a
deeper descendant. Result for a typical Daily:

  - [ ] Email           # flat, clustered
  - [ ] todo
  <blank>
  - [ ] cornball.ai     # heads a subtree -> blank before
    - [ ] Lil Casey
      - [ ] Countdown
  <blank>               # follows a deeper descendant -> blank before
  - [ ] House

Regression test in test_recurring.R covers both rules and
verifies flat siblings stay tight.

Bump to 0.2.2.
@TroyHernandez TroyHernandez merged commit b8179cf into main Apr 28, 2026
2 checks passed
@TroyHernandez TroyHernandez deleted the fix-ci-and-spacing branch April 28, 2026 03:16
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.

1 participant