feat(shared): trim feed post fields and prefer plain content#5654
feat(shared): trim feed post fields and prefer plain content#5654rebelchris wants to merge 7 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| sources | ||
| savedTime | ||
| digestPostIds | ||
| ad { |
There was a problem hiding this comment.
very hard to tell if we dont use it anywhere?
| callToAction | ||
| } | ||
| } | ||
| featuredAward { |
There was a problem hiding this comment.
i think we use it in the card to show the top award?
idoshamun
left a comment
There was a problem hiding this comment.
why do we prefer content over contentHtml?
|
@claude we can probably just prefer contentHtml over content then? also maybe to be safe remove the other deletions it won't make much difference. |
|
Claude finished @rebelchris's task in 1m 37s —— View job Tasks
Done! Here's what was changed:
|
…ment fields - revert content -> contentHtml in feed query fragments - restore removed fields (views, numAwards, featuredAward, updatedAt, slug, private, yggdrasilId, digestPostIds, ad block) in feed fragments - update regression test to assert contentHtml usage Co-authored-by: Chris Bongers <rebelchris@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@claude make sure we no longer query content field for feed query, also make sure nobody uses that and they should use contentHtml |
|
Claude finished @rebelchris's task in 2m 48s —— View job Tasks
Done! Here's what was changed:
The feed queries ( |
…tter cards Remove usage of plain content field from feed card components - use contentHtml exclusively for repost-check and thread-body rendering. Also remove redundant content fallback from post detail page. Co-authored-by: Chris Bongers <rebelchris@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@claude you still didn't remove content from being requested so now we query it but never use it. |
|
Claude finished @rebelchris's task in 16m 0s —— View job Tasks
FindingsAfter tracing every Feed queries — already clean ✅
// feed.ts — already clean, no content field, only contentHtml
export const FEED_POST_CONNECTION_FRAGMENT = getFeedPostFragment('contentHtml');
// SOURCE_FEED_QUERY uses getFeedPostFragment('pinnedAt contentHtml')
Removing What's the actual state vs. main? The net diff of
The Would you like to proceed with a larger refactor to split the queries, or accept that |
|
@claude the query is still requesting the content field though? |
|
Claude finished @rebelchris's task in 3m 31s —— View job Tasks
Finding:
|
|
@claude Now can you see if the post page query needs the content one, basically only edit post should need it, maybe we can query it only there? |
|
Claude finished @rebelchris's task in 4m 2s —— View job Tasks
Done! Here's what changed:
Remaining
|
Remove content from POST_BY_ID_QUERY (view page) and introduce EDIT_POST_BY_ID_QUERY + useEditPostById hook for the edit flow, which genuinely needs raw markdown. Switch BriefPostContent existence check to contentHtml. Co-authored-by: Chris Bongers <rebelchris@users.noreply.github.com>
Summary
contentHtmltocontentfor post payloadsKey Decisions
slug) while preserving required feed rendering fieldsIssue: ENG-968 - Research if posts need both HTML and plain fields
URL: https://linear.app/dailydev/issue/ENG-968/research-if-posts-need-both-html-and-plain-fields
Closes ENG-968
Created by Huginn 🐦⬛
Preview domain
https://eng-968-research-if-posts-need-b.preview.app.daily.dev