Skip to content

Messages: Push (repost) and Quote (#31) - #181

Merged
Adron merged 2 commits into
mainfrom
issue-31-push-quote
Sep 24, 2026
Merged

Adron merged 2 commits into
mainfrom
issue-31-push-quote

Conversation

@Adron

@Adron Adron commented Sep 24, 2026

Copy link
Copy Markdown
Member

Closes #31

Recreates #152. That PR was auto-closed by GitHub when its base branch issue-127-wire-types was deleted on merge of #131 — my mistake for merging with --delete-branch while dependents still pointed at it. Same branch, same commits, now based on main (which contains the wire-type work it needed). The original discussion is on #152.

What this does

Push (repost) and Quote, per /help/messages:

  • POST /api/messages gains pushedMessageId.
  • Push re-shares as-is with no comment; Quote adds your own note. Both are always public, and Quote shows the confirmation banner before sending.
  • Cards render the embedded original from the nested pushedMessage, which arrives complete (its own user, imageUrls, tags, linkMetadata) so no second fetch is needed.
  • pushCount displays alongside digCount.

What the live feed corrected

My issue text said all 5 sampled pushes had empty content. Wrong — 2 of 5 carry real commentary ("Anybody else got thoughts on this?", "Did a reaction vid to this years ago too…"), so they're genuine Quotes and the content-based IsQuote split is exercised by real data, not just theory.

pushedMessage.pushedMessageId was null on all 5, so server-side chaining is unverified — a bare push therefore targets the original, commented as a client-side decision.

Incidental fix

MessageItemViewModel.ErrorMessage had no renderer at all, so a failed Report — or its "Reported. Thanks…" acknowledgement — was silently dropped. This adds a per-card status line.

Not exercised

No post, push, quote or dig was sent: every write here publishes to a real shared account and syndicates to Mastodon/Bluesky. The compose paths are built and live-unverified.

Note for review

This adds a Visibility binding to the card-body TextBlock so a bare Push collapses its empty body — the same element #141's MentionText attached property claims. Whichever merges second needs a one-line reconcile.

Builds green in Debug and Release.

🤖 Generated with Claude Code

POST /api/messages takes a pushedMessageId; one field covers both Push (bare
repost, empty content) and Quote (repost with commentary). Adds the write path,
the card actions, and the embedded original.

- Models/NewMessage.cs — a request record for POST /api/messages. The endpoint
  has grown enough optional fields (reply, schedule, media, push/quote) that the
  positional overload in InterlinedApiClient.cs was out of room; that file is
  untouched (it is in open PR #130), so this is a new overload in the Messages
  partial. Optional keys the caller never set are omitted rather than posted as
  explicit nulls.
- PushMessageAsync / QuoteMessageAsync hard-code publiclyVisible: true — pushes
  and quotes are always public per /help/messages, whatever the user's
  defaultPubliclyVisible preference says (it is false on the test account).
- MessageItemViewModel: PushCount, the IsPush/IsQuote split, the quoted-original
  projection off the nested pushedMessage, and Push/Quote commands. A Posted
  event lets the feed re-fetch after publishing — the write envelopes are not
  parsed, per this codebase's read-after-write discipline.
- Pushing a *bare push* targets the original rather than the push, so the result
  is a one-level quote that renders. Quoting a Quote still targets the quote,
  which carries its own commentary. Client-side call: no nested pushedMessage
  appeared anywhere in an 80-row live sample, so the server's chaining behaviour
  is unverified.
- FeedView.xaml: "↻ Pushed" / "❝ Quoted" badge, the embedded original card
  (avatar, clickable author, time, body, images), pushCount beside digCount, and
  an inline Quote composer whose amber banner is the "this will be public"
  confirmation. The footer is now a WrapPanel — seven actions overflowed a
  narrow window. A per-card status line was added too: ErrorMessage had no
  renderer at all before, so a failed Report was silent.

Live-verified read-only against the test account (80-message sample): 5 of 80
rows carry pushedMessageId + a full nested pushedMessage. Contrary to the note
on the issue, 2 of those 5 have non-empty content — real Quotes, not only bare
reposts — so the content-based IsQuote split is exercised by live data. All 5
are publiclyVisible: true, consistent with the always-public rule.

No write path was exercised: posting, pushing or quoting from this account
publishes publicly and syndicates to Mastodon/Bluesky.

Closes #31

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Conflict in FeedView.xaml on the card-body TextBlock — the exact reconcile
flagged when this PR was opened. #94's MentionText attached property and #31's
bare-Push collapse both target that one element.

Both kept: MentionText.Text renders @mentions as clickable links, and the
Visibility binding (already outside the conflict region) collapses the body for
a bare Push, which carries no commentary. Comment records why both are there so
neither is removed as redundant.

Debug and Release both build clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Adron
Adron merged commit fee207d into main Sep 24, 2026
1 check passed
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.

Messages: Push (repost) and Quote

1 participant