Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeedFeedback fixes #3968

Merged
merged 3 commits into from
May 12, 2024
Merged

FeedFeedback fixes #3968

merged 3 commits into from
May 12, 2024

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented May 11, 2024

  • 3cc4716: Lower the time threshold to 1500ms as discussed with @whyrusleeping.
  • 14f00d5: Replies were missing feedContext because the parent item (which was unshifted) didn't have it. For our purposes, the entire convo has the same context. The fix is mostly copypaste from how we handle source. There's probably a simpler way to write this but I don't understand the data structure for sure — and this will definitely work.

Test Plan

Read the code for the first change. For the second change, added

--- a/src/state/queries/post-feed.ts
+++ b/src/state/queries/post-feed.ts
@@ -294,6 +294,14 @@ export function usePostFeedQuery(
                           AppBskyFeedPost.validateRecord(item.post.record)
                             .success
                         ) {
+                          let before = item.feedContext
+                          let after =
+                            i === 0 && slice.feedContext
+                              ? slice.feedContext
+                              : item.feedContext
+                          if (before !== after) {
+                            console.log('before != after', before, after)
+                          }

and verified that the log shows up for replies

Screenshot 2024-05-11 at 20 32 32

Copy link

render bot commented May 11, 2024

Copy link

github-actions bot commented May 11, 2024

Old size New size Diff
7.14 MB 7.14 MB 149 B (0.00%)

Copy link
Collaborator

@pfrazee pfrazee left a comment

Choose a reason for hiding this comment

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

Yep looks good. I went for a simpler feedContext fallback (don't need to pay attention to the i===0 for this)

@pfrazee pfrazee merged commit 4458b03 into main May 12, 2024
6 checks passed
@pfrazee pfrazee deleted the feedfb branch May 12, 2024 17:30
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.

2 participants