Skip to content

feat(social): ::thread - #500

Merged
vite-hub[bot] merged 3 commits into
mainfrom
feat/social-thread
Nov 28, 2026
Merged

vite-hub[bot] merged 3 commits into
mainfrom
feat/social-thread

Conversation

@onmax

@onmax onmax commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Adds ::thread to comark-social: posts that reply to each other drawn as one card, joined by a rail, with the last post as the focal one. It builds on ::post from #496.

Plan: https://drop.vitehub.dev/d/wtn1zg3tajmt/social-poll-drop-plan

What changed

  • Block. ::thread holds :::post blocks and draws them in order as rows of one card, with a rail running from each avatar to the next.
    • The last post is focal: larger text, the full date and time, and its views, unless focal=false.
    • With more than 5 posts above the focal one, the earlier posts fold into a <details> that reads "Show N earlier posts".
  • Fetch. With fetch: true, a ::thread{url} with no posts inside walks up from that post through its parents to the root, five posts at most, focal included.
  • Renderers. HTML, Vue, React, and Svelte each get a Thread component. A post in a thread is marked data-thread, plus data-focal or data-rail, and only the thread carries data-comark-frame.
  • Issues.
    • COMARK4910 thread-content: a block in a thread that isn't a post. It's left out.
    • COMARK4911 empty-thread: a thread with nothing to show. It renders nothing.
    • Each has a doctor page.
  • Wiring. comark-ui's tags (details, summary), vue-lazy, and info include the thread. The docs page, the skill reference, and SKILL.md cover it.

Decisions

  • Folding. It keeps the post the focal one replies to in view, so the fold never hides the context right above it.
  • Logo. A thread shows one platform logo, in the card's corner, linked to the focal post, rather than one per row.
  • Dates. Each row's date links to that post when it has a url, the focal post's too. The focal post's date reads in full, such as "November 20, 2026 at 9:33 AM", as X shows it. A row with a url and no time shows a "View post" link in its place, so every post keeps its link without a logo per row.
  • Post numbers. A thread's rows count toward the ::post numbers in issues, as comark-linter counts every post, so an issue on a post after a thread points at the right line.
  • Details in a post. A :::details inside a post stays a block beside its paragraphs, now that comark-details reads it first.
  • Links. Like a post, the thread sets chip="false" and references="false" when comark-chips or comark-github's references run, so its handles stay as the platform shows them.
  • Written posts win. When a thread has both posts and a url, the written posts show and nothing is walked.
  • Fetch cap. The 5-post cap counts the focal post. A parent that fails to fetch stops the walk there, with an issue, and the thread starts after it.
  • One platform. A post with no url or platform takes the thread's, from the thread's url or the first post that names one, so a thread of written posts needs the platform once. I didn't add a platform prop to ::thread: writing it on the first post does the same.
  • Plugin order. comark-details turns any details node it sees into its own disclosure, so in comark-ui's preset it now runs before social, as it already did before tests and bundle, which draw details too. The docs say to register comark-social after comark-details.
  • Summary. The fold's summary reads "Show" when closed and "Hide" when open, done with CSS on [open], with no script.

How it was checked

  • vp test run for packages/social: rows, rail, and focal; focal=false; folding at 8 posts; posts taking the thread's platform; stray and empty content; per-post issue names; a Mastodon walk capped at 5; a failed parent; written posts not fetched. Also HTML, Vue, React, and Svelte giving the same markup.
  • comark-ui's ui (a thread's handles stay as written, and an 8-post thread folds into "Show 6 earlier posts" with comark-details on), tags, info, and browser-plugins tests, and the root doctor and workspace tests.
  • pnpm typecheck, Vite Doctor with the strict preset plus lint:docs, vp fmt, and vp lint.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-28T13:11:30.288122Z
We couldn’t complete this review. Comment @codex review to try again.
491e89e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@pkg-pr-new

pkg-pr-new Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@500

comark-badge

pnpm add https://pkg.pr.new/comark-badge@500

comark-bundle

pnpm add https://pkg.pr.new/comark-bundle@500

comark-cards

pnpm add https://pkg.pr.new/comark-cards@500

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@500

comark-cast

pnpm add https://pkg.pr.new/comark-cast@500

comark-charts

pnpm add https://pkg.pr.new/comark-charts@500

comark-chat

pnpm add https://pkg.pr.new/comark-chat@500

comark-chips

pnpm add https://pkg.pr.new/comark-chips@500

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@500

comark-code

pnpm add https://pkg.pr.new/comark-code@500

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@500

comark-colors

pnpm add https://pkg.pr.new/comark-colors@500

comark-comments

pnpm add https://pkg.pr.new/comark-comments@500

comark-critic

pnpm add https://pkg.pr.new/comark-critic@500

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@500

comark-details

pnpm add https://pkg.pr.new/comark-details@500

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@500

comark-diff

pnpm add https://pkg.pr.new/comark-diff@500

comark-embed

pnpm add https://pkg.pr.new/comark-embed@500

comark-fields

pnpm add https://pkg.pr.new/comark-fields@500

comark-figure

pnpm add https://pkg.pr.new/comark-figure@500

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@500

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@500

comark-git-graph

pnpm add https://pkg.pr.new/comark-git-graph@500

comark-github

pnpm add https://pkg.pr.new/comark-github@500

comark-icon

pnpm add https://pkg.pr.new/comark-icon@500

comark-include

pnpm add https://pkg.pr.new/comark-include@500

comark-keys

pnpm add https://pkg.pr.new/comark-keys@500

comark-links

pnpm add https://pkg.pr.new/comark-links@500

comark-linter

pnpm add https://pkg.pr.new/comark-linter@500

comark-magic-move

pnpm add https://pkg.pr.new/comark-magic-move@500

comark-mark

pnpm add https://pkg.pr.new/comark-mark@500

markdown-it-to-comark

pnpm add https://pkg.pr.new/markdown-it-to-comark@500

marked-to-comark

pnpm add https://pkg.pr.new/marked-to-comark@500

comark-mathml

pnpm add https://pkg.pr.new/comark-mathml@500

comark-media

pnpm add https://pkg.pr.new/comark-media@500

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@500

migrate-to-comark

pnpm add https://pkg.pr.new/migrate-to-comark@500

comark-motion

pnpm add https://pkg.pr.new/comark-motion@500

comark-outline

pnpm add https://pkg.pr.new/comark-outline@500

comark-properties

pnpm add https://pkg.pr.new/comark-properties@500

comark-qr

pnpm add https://pkg.pr.new/comark-qr@500

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@500

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@500

remark-to-comark

pnpm add https://pkg.pr.new/remark-to-comark@500

comark-social

pnpm add https://pkg.pr.new/comark-social@500

comark-sources

pnpm add https://pkg.pr.new/comark-sources@500

comark-steps

pnpm add https://pkg.pr.new/comark-steps@500

comark-table

pnpm add https://pkg.pr.new/comark-table@500

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@500

comark-tests

pnpm add https://pkg.pr.new/comark-tests@500

comark-time

pnpm add https://pkg.pr.new/comark-time@500

comark-ui

pnpm add https://pkg.pr.new/comark-ui@500

comark-xref

pnpm add https://pkg.pr.new/comark-xref@500

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@500

commit: 8c37dfb

@pullfrog pullfrog Bot 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.

Important

The default comark-ui preset rewrites the fold in threads of seven or more posts, replacing the “Show N earlier posts” control with a generic “Details” label and emitting a warning for valid Markdown.

Approach: Reusing ::post parsing and rendering for thread rows is sound; the generated fold needs to stay distinct from authored ::details blocks.

Reviewed changes — I reviewed how written and fetched threads are parsed, rendered, and linted against the feat/social-post base.

  • Thread rendering: Checked focal and regular rows, source links, quoted posts, folding, and the HTML, Vue, React, and Svelte renderers.
  • Fetch: Traced the five-post parent walk, partial results on failure, and precedence for written rows.
  • Integration: Checked the default preset, Vue lazy registration, editor metadata, and Doctor rules and examples. The focused social, UI, and Doctor suites passed; direct parse, render, and lint checks reproduced the findings inline.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread packages/social/src/thread.ts Resolved
Comment thread packages/social/src/index.ts Resolved
Comment thread packages/social/src/post.ts Resolved
Comment thread packages/social/src/post.ts Resolved
@vite-hub

vite-hub Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Completed 2026-11-28T15:08:07.977Z 11m 48s
View session Cancelled 2026-11-28T14:59:14.790Z 4m 41s
View session Cancelled 2026-11-28T14:56:45.112Z 1m 7s
View session Cancelled 2026-11-28T14:36:31.619Z 13m 14s
View session Cancelled 2026-11-28T14:21:07.952Z 9m 55s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

View session

Resolved all 19 merge conflicts and pushed 8c37dfb, preserving both social threads and main’s conversations. All 127 focused tests passed, and lint completed with warnings only. Bound platform inference remains unchanged per the maintainer’s decision. All review threads were already resolved; hosted checks are pending.

Session

this host is full

Session

Pass interrupted; current webhook state retained.

Session

Pass interrupted; current webhook state retained.

@onmax
onmax force-pushed the feat/social-thread branch from 491e89e to a8552f4 Compare November 28, 2026 13:39
@onmax

onmax commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Before/after on Drop

@pullfrog pullfrog Bot 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.

Important

The long-thread fold now works in the default preset. Two regressions remain in the new changes: bound post props do not supply the thread’s platform, and the new plugin order puts authored disclosures inside paragraphs.

Reviewed changes — I reviewed the changes since 491e89e.

  • Inherited the platform from the thread URL or the first post that names a platform or URL, and tested the effect on row labels and links.
  • Moved comark-details before comark-social and verified that a seven-post thread keeps its native fold without reporting a diagnostic.

All 56 tests in the focused social and UI suites passed. Separate public parse/render checks reproduced both findings below.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Comment thread packages/social/src/thread.ts Resolved
Comment thread packages/ui/src/index.ts Resolved
@vite-hub
vite-hub Bot changed the base branch from feat/social-post to main November 28, 2026 13:50
@onmax
onmax force-pushed the feat/social-thread branch from a8552f4 to 43eda67 Compare November 28, 2026 13:59
@onmax
onmax force-pushed the feat/social-thread branch from 43eda67 to a42fbc1 Compare November 28, 2026 14:01

@pullfrog pullfrog Bot 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.

✅ No new issues found in this delta. Earlier findings remain open.

Reviewed changes — I reviewed a8552f4 → 43eda67 and verified that the subsequent rebase to a42fbc1 did not change the social implementation or its tests.

  • Applied the outbound request policy to threads. The reply walk and image inlining use the same policy, including redirect checks and the optional host transport for federated Mastodon.
  • Reused post completion for fetched rows. Each row uses the response already fetched by the walk. A mocked Mastodon thread verified that it renders both rows and inlines the quoted avatar without a second status lookup.
  • Updated quote handling, media limits, and diagnostics. The standalone quote diagnostics now point to the authored blocks. I also confirmed that the existing diagnostic issue after a thread is still reproducible.

All 64 focused social, linter, and preset tests passed.

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-6.2-sol(high) | 𝕏

@pullfrog pullfrog Bot 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.

✅ No new P0 or P1 findings in this re-review.

Reviewed changes — I reviewed the follow-up commit a42fbc1 → 8811a01.

  • Restored post links. The focal date links to its source, and rows with a URL but no date show a “View post” link.
  • Kept quoted posts distinct from thread rows. Quotes no longer inherit the reply rail or the focal row’s text sizing.
  • Preserved authored disclosures. A :::details inside a post renders between paragraphs rather than inside one.
  • Corrected diagnostic locations. The linter now points to the standalone post’s own opener after a thread.

The workspace built successfully, and all 67 focused social, linter, and preset tests passed.

Pullfrog  | View workflow run | Using gpt-6.2-sol(high) | 𝕏

Keeps this PR's version over base changes:
- packages/social/src/html.ts: The merged type export retains every base type and adds ThreadAttributes.
- packages/social/src/index.ts: The plugin documentation now describes both conversation bubbles and thread rows, and the removal loop comment covers empty cards of either type.
- packages/social/src/react.ts: The merged type export retains every base type and adds ThreadAttributes.
- packages/social/src/svelte/index.d.ts: The component map preserves the base Post and Conversation signatures and adds Thread.
- packages/social/src/vue.ts: The merged type export retains every base type and adds ThreadAttributes.

Keeps the base version over this PR's changes:
- packages/social/src/html.ts: The combined type export preserves ThreadAttributes while extending the base ConversationAttributes export.
- packages/social/src/index.ts: The base walker extended for threads counts all authored posts and threads while only rendering top-level social cards, and the combined documentation retains the thread rendering and fetch behavior.
- packages/social/src/react.ts: The combined type export preserves ThreadAttributes while extending the base ConversationAttributes export.
- packages/social/src/svelte/index.d.ts: The declarations export Thread and ThreadAttributes alongside the new base Conversation component and its attributes.
- packages/social/src/vue.ts: The combined type export preserves ThreadAttributes while extending the base ConversationAttributes export.

@pullfrog pullfrog Bot 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.

✅ No new issues found. No P0 or P1 findings remain.

Reviewed changes — I reviewed 8811a01 → 8c37dfb, focusing on how the merge with main combines ::thread and ::conversation.

  • Combined social block traversal. Verified that nested blocks are counted for diagnostics without being rendered as standalone cards, and that a later issue still points to the correct opener.
  • Preserved both features across renderers. Checked that HTML, Vue, React, and Svelte render both blocks in the same document and that the preset keeps the thread’s native fold.
  • Merged the integration points. Checked Vue lazy registration, the preset tag list, editor metadata, and Doctor rules.

The workspace build and all 893 selected tests passed.

Pullfrog  | View workflow run | Using gpt-6.2-sol(high) | 𝕏

@vite-hub
vite-hub Bot merged commit d04a49f into main Nov 28, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the feat/social-thread branch November 28, 2026 15:30
@github-actions github-actions Bot mentioned this pull request Nov 28, 2026
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.

1 participant