Render todos as markdown task lists by jeremy · Pull Request #178 · basecamp/basecamp-cli

added 3 commits

March 2, 2026 23:54
Introduce MarkdownListView schema type with style and group_by fields.
When a schema declares style: tasklist, RenderListMarkdown renders
- [ ] / - [x] checkbox items instead of GFM pipe tables. Items are
grouped by a dot-path field (e.g. bucket.name) with headings suppressed
for single groups and "Other" for items missing the group field.

Adds PresentOption/WithGroupBy for dynamic group-by override, and
removes empty-slice bail in both presentStyled and presentMarkdown
so empty results are handled consistently by the renderers (both
paths now emit *No results* for empty data).
DisplayData (json:"-") provides alternate data for styled/markdown
rendering while keeping Data untouched for JSON serialization. This
lets commands preserve wrapper structs for machine output while
presenting unwrapped slices through the schema-aware presenter.

WithGroupBy threads a presenter option through the envelope to
override the schema's default group_by field at render time.
Wire up reports assigned to use WithEntity("todo") + WithDisplayData
for schema-aware rendering. JSON output preserves the full wrapper
struct; styled/markdown output presents the unwrapped todos through
the task list renderer. --group-by date maps to due_on grouping.

Adds output-layer tests for DisplayData contract (JSON uses Data,
markdown/styled use DisplayData) and presenter tests for task list
rendering, grouping, override, empty states, and Other heading.

Copilot AI review requested due to automatic review settings

March 3, 2026 07:55

chatgpt-codex-connector[bot]

@jeremy

Only use "due:" prefix for `due_on` fields; other date columns use their
field label. Extract people names directly from the raw array value
instead of splitting the formatted comma-joined string, which broke names
containing commas (e.g. "Park, Joon-seo").