Conversation
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.
There was a problem hiding this comment.
Pull request overview
This PR updates the presenter/output pipeline to render todo list results as Markdown task lists (with optional grouping) instead of GFM pipe tables, while preserving existing --json response shapes via a DisplayData mechanism.
Changes:
- Adds schema support for markdown list overrides (
style: tasklist,group_by) and implements task-list Markdown rendering with grouping and empty-state handling. - Introduces
DisplayDataand presenter options passthrough on the output response envelope so styled/markdown rendering can use an alternate shape without changing JSON serialization. - Wires
reports assignedto render todos via the presenter (WithEntity("todo")+WithDisplayData) and overrides grouping todue_onwhen--group-by dateis used.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/presenter/schemas/todo.yaml | Declares markdown tasklist rendering and default grouping by bucket.name for todo list view. |
| internal/presenter/schema.go | Extends list view schema to optionally include markdown rendering configuration. |
| internal/presenter/render.go | Implements tasklist markdown rendering, dot-path grouping, and consistent *No results* handling for markdown lists. |
| internal/presenter/present.go | Adds presenter options (e.g., group-by override) and ensures empty slices are still “handled” by the presenter. |
| internal/presenter/presenter_test.go | Updates/extends presenter tests for tasklist output, grouping behavior, overrides, and empty states. |
| internal/output/envelope.go | Adds DisplayData and presenter option passthrough so styled/markdown can render unwrapped data while JSON stays unchanged. |
| internal/output/output_test.go | Adds contract tests validating JSON uses Data while markdown/styled use DisplayData, plus group-by override coverage. |
| internal/commands/reports.go | Updates reports assigned to use the new presenter path and apply grouping override for --group-by date. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 663de703ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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").
Summary
- [ ]/- [x]) for todo entities, replacing GFM pipe tablesbucket.name) with headings suppressed for single groupsDisplayDataon the response envelope to separate display data from JSON serialization — wrapper structs are preserved for--jsonwhile styled/markdown output gets the unwrapped slicereports assignedto use the new presenter path withWithEntity("todo")+WithDisplayData--group-by datedynamically overrides grouping todue_onviaWithGroupBy*No results*consistently across both tasklist and table markdown pathsFixes #176
Test plan
make checkpasses (lint, vet, unit tests, 257 e2e tests, naming, CLI surface, SDK provenance)Datawhile markdown/styled useDisplayDatabasecamp reports assigned -mshows task lists grouped by projectbasecamp reports assigned -jJSON shape unchanged (wrapper with person, grouped_by, todos)basecamp reports assigned --group-by date -mgroups by due date (todos without due_on land under "Other")basecamp todos list -m --in <project>task list format, no group heading