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

Eric / Implement Firebase Function to Monitor Question Status Change #931

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EricWeng23
Copy link
Collaborator

@EricWeng23 EricWeng23 commented Mar 3, 2025

Summary

(In Progress)
This is a follow-up PR to alleviate the overactive listener that was spiking up Firebase cost. This PR addressed this issue by implementing a new firebase function onQuestionStatusUpdate which compares the status of the new and updated question. If status changed to resolved, then we can call removeQuestionDisplayFeedback. This allows developers to monitor question changes on the server-side rather than the client-side. Specifics is in Richard's past PR: #888

The number of onSnapShot calls reduces

Note: Currently this implementation tries to update the reference to a session document with an array of recentlyResolvedQuestions, but this may not be an optimal and permanent solution.

Test Plan

Screen.Recording.2025-03-02.at.11.10.19.PM.mov

Notes

Breaking Changes

None

  • I have updated the documentation accordingly.
  • My PR adds a @ts-ignore

@EricWeng23 EricWeng23 requested a review from a team as a code owner March 3, 2025 04:12
@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 145.

@NIDHI2023 NIDHI2023 changed the title Eric / Implement Firebase Function to Monitor Question Status Change (In Progress) Eric / Implement Firebase Function to Monitor Question Status Change Mar 5, 2025
@NIDHI2023
Copy link
Contributor

renaming title so WIP check can pass

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.

3 participants