Add message presenter schema#256
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new schema-backed presenter for Basecamp message recordings and wires schema selection into message-related CLI commands so styled/markdown output uses the new formatting.
Changes:
- Add
internal/presenter/schemas/message.yamldefining list/detail presentation forMessagerecordings. - Add presenter/output tests to ensure the schema loads and renders subject/content as expected.
- Opt message commands into schema-aware presentation via
output.WithEntity("message").
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/presenter/schemas/message.yaml | Introduces the message entity schema (type_key Message) with list columns and detail sections. |
| internal/presenter/presenter_test.go | Adds schema registration and rendering tests for the new message presenter. |
| internal/output/output_test.go | Adds an integration-style test asserting WithEntity("message") uses schema-backed styled output. |
| internal/commands/messages.go | Wires WithEntity("message") into list/show/create/update and the message shortcut command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b8a73f9 to
d3daeac
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d3daeac to
fd9fc25
Compare
Normalize \r\n and bare \r to \n before splitting so carriage returns don't leak into table cells. Add test for bare-CR and mixed line endings. Drop unused require import from this commit (child PRs re-add it when they add tests that need it).
Add message.yaml with subject as title (gets OSC 8 hyperlinks via
app_url), content as body (format: text triggers HTMLToMarkdown),
and list columns [id, subject, creator, created_at].
No affordances in the schema — commands already supply breadcrumbs
via WithBreadcrumbs, so omitting them avoids duplicate Hints sections.
Wire WithEntity("message") in list, show, create, update, and the
message shortcut command.
Use \x1b instead of \x1b[ in markdown output test to catch all terminal escape sequences, not just CSI.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5e16dd4 to
6e9928c
Compare
Extend newline collapsing in formatCell to string elements inside []any, not just top-level strings. Add unit tests for both paths.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Consistent with todo, comment, and project schemas.
Stacked on #251. Independent of #253.
Summary
message.yamlpresenter schema:subjectas title (gets OSC 8 hyperlinks),contentas body (HTML→Markdown), list columns[id, subject, creator, created_at].WithBreadcrumbs, avoiding duplicate Hints sections.WithEntity("message")in list, show, create, update, and themessageshortcut command.Test plan
bin/cipassesbasecamp messages list— subject, creator, created_at columnsbasecamp messages show <id>— subject as headline with hyperlink, HTML-stripped body