Skip to content

Handle THANKS feed event type to prevent feed failure#691

Open
AyusKumarPathak wants to merge 3 commits intometabrainz:mainfrom
AyusKumarPathak:thanks-feed-event-support
Open

Handle THANKS feed event type to prevent feed failure#691
AyusKumarPathak wants to merge 3 commits intometabrainz:mainfrom
AyusKumarPathak:thanks-feed-event-support

Conversation

@AyusKumarPathak
Copy link
Copy Markdown

Hi @07jasjeet 👋
I’ve raised a PR that adds support for resolving the new thanks feed event type so the Android feed no longer falls back to the “update app” error when such events appear.

Please let me know if this approach looks correct happy to follow up with a dedicated Thanks UI and original event rendering next.

Copy link
Copy Markdown
Collaborator

@07jasjeet 07jasjeet left a comment

Choose a reason for hiding this comment

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

UI and API response model hookup is pending. Please complete the whole feature before requesting for review. Approving every commit or minor change will take unnecessary time, try to work async and get out a prototype at least before requesting review.

@AyusKumarPathak
Copy link
Copy Markdown
Author

Add support for thanks feed events on Android

This PR adds rendering support for the newly introduced thanks feed event type in the Android client.

Previously these events appeared as:

"Looks like you need to update your app"

The app now properly displays them similar to the web client.


Behavior

The Android feed will now:

  • Detect thanks events in the timeline
  • Display thanker → thankee relationship
  • Show optional message / blurb content
  • Load and render the original referenced event (recommendation / pin)
  • Gracefully fallback if the referenced event cannot be fetched

Implementation

Event Handling

  • Added THANKS mapping in FeedEventType.resolveEvent

UI

  • Implemented ThanksFeedLayout

  • Displays:

    • Thanker
    • Thankee
    • Optional message
    • Referenced event content

Data Layer

  • Paging now attempts to fetch the referenced event using original_event_id
  • Safe failure if request fails
  • No impact on existing event types

Testing

Creating a real thanks event requires interaction from another user account.
To validate functionality, a mock event was injected into the feed pipeline.

Verified:

  • Correct layout rendering
  • Correct username mapping
  • Optional message display
  • Referenced event rendering
  • No crashes when referenced event is missing

Screenshot

thanks_event


Result

Android now renders the "thank you" feed event consistently with the web client.


Notes

  • No breaking changes
  • Existing feed behavior unchanged
  • Fully backward compatible

@AyusKumarPathak
Copy link
Copy Markdown
Author

@07jasjeet Kindly review the pr

@07jasjeet
Copy link
Copy Markdown
Collaborator

The current design implementation feels different from web version, can we update the implementation to match web interface. The implementation should be considerate of current UI abstraction of BaseFeedEvent.

@AyusKumarPathak
Copy link
Copy Markdown
Author

AyusKumarPathak commented Feb 22, 2026

@07jasjeet
Addressed review feedback.

  • Wired referencedEvent properly through FeedUiEventItem → Content() → ThanksFeedLayout
  • Removed incorrect event.referencedEvent access
  • Fixed recursion safety when rendering original event
  • Ensured THANKS renders original recommendation/pin similar to website behavior

Kindly review.

@07jasjeet
Copy link
Copy Markdown
Collaborator

Hey @AyusKumarPathak, can you declare your usage of AI in this whole PR? Seems like you are just prompting and the LLM is just implementing to its best knowledge without you contributing any code.

Can you provide:

  1. Estimated percentage of hand-written code.
  2. Estimated percentage of hand-written documentation.
  3. Commits that were committed by AI

@AyusKumarPathak
Copy link
Copy Markdown
Author

AyusKumarPathak commented Feb 25, 2026

@07jasjeet
I did use AI assistance for this PR for:

  • Drafting some of the initial boilerplate changes.
  • Exploring possible approaches for wiring the THANKS event.

However, I manually reviewed, modified, debugged, and integrated the code into the existing architecture.

  • 40–50% hand-written code.
  • 50-60% comment written by me.
  • No commits were directly auto-committed by AI; all commits were manually created.

@07jasjeet
Copy link
Copy Markdown
Collaborator

07jasjeet commented Mar 14, 2026

The line joining the main line and thank event icon is not present.

image

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