minimize calls to firebase for job status data#109
Merged
Conversation
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ascibisz
commented
Oct 10, 2025
| export type FirebaseDict = { | ||
| [key: string]: Dictionary<string>; | ||
| }; | ||
|
|
Contributor
Author
There was a problem hiding this comment.
None of these types were being used anywhere, so I deleted them
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes Firebase usage by eliminating redundant queries and removing unused code. Instead of making separate queries for job status, error logs, results path, and output directory, the code now retrieves the complete job status object once and extracts all needed fields from it.
- Consolidates multiple Firebase queries into a single query for job status data
- Removes unused Firebase utility functions and types
- Updates components to use the consolidated job status object
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/firebase.ts | Removes unused functions, modifies getJobStatus to return full JobStatusObject instead of just status field |
| src/utils/aws.ts | Updates downloadOutputs to accept optional outputsDir parameter to avoid redundant Firebase queries |
| src/types/index.ts | Adds JobStatusObject type definition and removes unused interface types |
| src/constants/firebase.ts | Removes unused EXAMPLE_RECIPES collection constant |
| src/components/StatusBar/index.tsx | Accepts outputDir prop to pass to downloadOutputs function |
| src/components/ErrorLogs/index.tsx | Removes getLogs prop since error logs are now provided directly |
| src/App.tsx | Updates job status checking logic to use full JobStatusObject and extract needed fields locally |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
rugeli
approved these changes
Oct 16, 2025
Contributor
rugeli
left a comment
There was a problem hiding this comment.
looks good to me! so much cleaner
80e870d to
06e4f87
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When I was doing firebase cleanup, I went through our firebase utility functions to make sure we didn't have any dead code around that wasn't being used and if we had any redundant calls. I found a bit of each. This PR is to eliminate that for code clarity and performance.
Offshoot of this ticket
Solution