Skip to content

Add doge-tracker extension#17180

Merged
raycastbot merged 9 commits intoraycast:mainfrom
0xOsprey:ext/doge-tracker
Feb 28, 2025
Merged

Add doge-tracker extension#17180
raycastbot merged 9 commits intoraycast:mainfrom
0xOsprey:ext/doge-tracker

Conversation

@0xOsprey
Copy link
Contributor

@0xOsprey 0xOsprey commented Feb 20, 2025

Description

This is an extension for the DOGE Tracker. It allows users to monitor cumulative savings and search specific initiatives.

Screencast

doge-tracker 2025-02-19 at 20 48 22

Checklist

@raycastbot
Copy link
Collaborator

Congratulations on your new Raycast extension! 🚀

Due to our current reduced availability, the initial review may take up to 10-15 business days

Once the PR is approved and merged, the extension will be available on our Store.

@raycastbot raycastbot added the new extension Label for PRs with new extensions label Feb 20, 2025
@pernielsentikaer pernielsentikaer self-assigned this Feb 28, 2025
Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

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

Hi 👋

Thanks for your contribution 💪

I have now tested your extension, and I have some feedback ready for you

I'm looking forward to testing this extension again 🔥

Request a new review when you are ready. Feel free to contact me here or at Slack if you have any questions.

@@ -0,0 +1,11 @@
module.exports = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we skip this file

@pernielsentikaer
Copy link
Collaborator

Do you also have something @greptileai

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added a new DOGE Tracker extension that allows users to monitor cost-saving initiatives from the Department of Government Efficiency via Firebase integration.

  • The extension displays initiatives in a searchable list with completion status and formatted currency values
  • Implementation includes proper Firebase configuration and data fetching in src/firebase.ts
  • Currency formatting utilities in src/utils.ts provide readable display of large financial values
  • The main view in src/index.tsx updates command metadata with total savings statistics
  • Consider adding error handling for the API call in getInitiatives() function to handle potential network failures

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

11 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile

const initiatives = Object.values(data)
.map((initiative) => ({
...initiative,
value: parseFloat(initiative.value),
Copy link
Contributor

Choose a reason for hiding this comment

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

style: parseFloat could return NaN if the value isn't a valid number. Consider adding a fallback or validation.

Comment on lines +23 to +25
async function fetchData() {
const data = await getInitiatives();
setInitiatives(data);
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: No error handling for the API call. If getInitiatives() fails, the error will be unhandled and the UI will remain in loading state indefinitely.

Comment on lines +22 to +35
useEffect(() => {
async function fetchData() {
const data = await getInitiatives();
setInitiatives(data);
setIsLoading(false);

// Update command subtitle with stats
const totalValue = data.reduce((sum, init) => sum + init.value, 0);
const completedCount = data.filter((i) => i.progress).length;
const subtitle = `Total Savings: ${formatCompactCurrency(totalValue)} Total Initiatives: ${completedCount}`;
await updateCommandMetadata({ subtitle });
}
fetchData();
}, []);
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider wrapping the API call in try/catch and using showFailureToast from @raycast/utils to handle potential network errors.

// Update command subtitle with stats
const totalValue = data.reduce((sum, init) => sum + init.value, 0);
const completedCount = data.filter((i) => i.progress).length;
const subtitle = `Total Savings: ${formatCompactCurrency(totalValue)} Total Initiatives: ${completedCount}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Multiple spaces used for formatting the subtitle string. Consider using template literals with newlines or a more structured approach for better maintainability.

0xOsprey and others added 7 commits February 28, 2025 07:38
Co-authored-by: Per Nielsen Tikær <per@raycast.com>
Co-authored-by: Per Nielsen Tikær <per@raycast.com>
Co-authored-by: Per Nielsen Tikær <per@raycast.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

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

Hi 👋

Looks good to me, approved 🔥

@raycastbot raycastbot merged commit 95e4af6 into raycast:main Feb 28, 2025
2 checks passed
@github-actions
Copy link
Contributor

Published to the Raycast Store:
https://raycast.com/Osprey/doge-tracker

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants