Skip to content

Add message presenter schema#256

Merged
jeremy merged 6 commits into
mainfrom
add-message-schema
Mar 11, 2026
Merged

Add message presenter schema#256
jeremy merged 6 commits into
mainfrom
add-message-schema

Conversation

@jeremy

@jeremy jeremy commented Mar 11, 2026

Copy link
Copy Markdown
Member

Stacked on #251. Independent of #253.

Summary

  • Add message.yaml presenter schema: subject as title (gets OSC 8 hyperlinks), content as body (HTML→Markdown), list columns [id, subject, creator, created_at].
  • No affordances — commands supply breadcrumbs via WithBreadcrumbs, avoiding duplicate Hints sections.
  • Wire WithEntity("message") in list, show, create, update, and the message shortcut command.

Test plan

  • bin/ci passes
  • basecamp messages list — subject, creator, created_at columns
  • basecamp messages show <id> — subject as headline with hyperlink, HTML-stripped body

@jeremy jeremy requested a review from a team as a code owner March 11, 2026 03:39
Copilot AI review requested due to automatic review settings March 11, 2026 03:39
@github-actions github-actions Bot added commands CLI command implementations tests Tests (unit and e2e) output Output formatting and presentation labels Mar 11, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Mar 11, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml defining list/detail presentation for Message recordings.
  • 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.

Copilot AI review requested due to automatic review settings March 11, 2026 04:24
@jeremy jeremy force-pushed the add-message-schema branch from b8a73f9 to d3daeac Compare March 11, 2026 04:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread internal/commands/messages.go
Comment thread internal/output/output_test.go
Comment thread internal/presenter/presenter_test.go
@jeremy jeremy force-pushed the add-message-schema branch from d3daeac to fd9fc25 Compare March 11, 2026 04:45
Base automatically changed from fix-multiline-table-cells to main March 11, 2026 05:01
Copilot AI review requested due to automatic review settings March 11, 2026 05:07
jeremy added 4 commits March 10, 2026 22:10
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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread internal/output/render.go
Comment thread internal/output/render.go
@jeremy jeremy force-pushed the add-message-schema branch from 5e16dd4 to 6e9928c Compare March 11, 2026 05:11
Extend newline collapsing in formatCell to string elements inside
[]any, not just top-level strings. Add unit tests for both paths.
Copilot AI review requested due to automatic review settings March 11, 2026 05:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread internal/presenter/schemas/message.yaml Outdated
Consistent with todo, comment, and project schemas.
@jeremy jeremy enabled auto-merge (squash) March 11, 2026 06:28
@jeremy jeremy merged commit 50fef6c into main Mar 11, 2026
26 checks passed
@jeremy jeremy deleted the add-message-schema branch March 11, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations enhancement New feature or request output Output formatting and presentation tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants