-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Update doge-tracker extension #18950
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
Conversation
- Update package.json to correct name and title, and add contributors - Refactor ESLint configuration to use defineConfig and integrate Raycast settings - Remove .eslintignore file and update eslint.config.js to include recommended settings - Add ESLint rules configuration to eslint.config.js - Restore ESLint configuration with ignore patterns - Remove ESLint configuration file as part of code cleanup - Add ESLint configuration and implement grant savings view component - Refactor pagination and type assertions in grant, lease, and contract components - 🫧 Linting - first commit
Thank you for your contribution! 🎉 🔔 @0xOsprey you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. You can expect an initial review within five business days. |
- Fix formatting of contributor mention in README - Fix formatting of contributor mention in README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR transforms the DOGE Tracker extension from a cryptocurrency tracker to a Department of Government Efficiency data viewer, implementing multiple view commands for tracking government savings and expenditures.
- The extension lacks a
metadata
folder with screenshots despite having multipleview
commands - this is required for store submission per Raycast Documentation - All view commands should include
subtitle
inpackage.json
to show "Department of Government Efficiency Tracker" for better context - The README's tone ("MAKE RAYCAST GREAT AGAIN!") should be more professional and aligned with Raycast's documentation standards
- Error handling in API calls could be simplified using
showFailureToast
from@raycast/utils
instead of manualshowToast
calls - Consider wrapping
useFetch
calls in try-catch blocks for better error handling
10 file(s) reviewed, 17 comment(s)
Edit PR Review Bot Settings | Greptile
files: ["src/**/*.jsx"], | ||
// You can add specific rules or overrides here if needed | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Empty override block with only a comment. Consider either removing the override entirely or specifying actual rules needed for JSX files
files: ["src/**/*.jsx"], | |
// You can add specific rules or overrides here if needed | |
}, |
|
||
Track DOGE cost-saving initiatives and their progress directly in Raycast. | ||
View information about the work done by the Department of Government Efficiency. Essentially everything on the https://doge.gov website will be updated here (including, contracts, grants, leases, and payments). Let's MAKE RAYCAST GREAT AGAIN! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: The description should be more professional and avoid political slogans like 'MAKE RAYCAST GREAT AGAIN!'
View information about the work done by the Department of Government Efficiency. Essentially everything on the https://doge.gov website will be updated here (including, contracts, grants, leases, and payments). Let's MAKE RAYCAST GREAT AGAIN! | |
View information about the work done by the Department of Government Efficiency. Essentially everything on the https://doge.gov website will be updated here (including, contracts, grants, leases, and payments). |
# Raycast DOGE Extension | ||
Thanks to [@OxOsprey](https://github.com/0xOsprey) for the original extension! | ||
|
||
Track DOGE cost-saving initiatives and their progress directly in Raycast. | ||
View information about the work done by the Department of Government Efficiency. Essentially everything on the https://doge.gov website will be updated here (including, contracts, grants, leases, and payments). Let's MAKE RAYCAST GREAT AGAIN! | ||
|
||
## Features | ||
|
||
- 💰 View total savings across all initiatives | ||
- 📊 Track completion status of each initiative | ||
- 🔍 Search through all initiatives | ||
- 🔗 Quick access to initiative sources | ||
- 📋 Copy values and links with one click | ||
|
||
## Installation | ||
|
||
1. Make sure you have [Raycast](https://raycast.com/) installed | ||
2. Install the extension from the [Raycast Store](https://www.raycast.com/osprey/doge-tracker) | ||
|
||
## Usage | ||
|
||
### View Initiatives | ||
- Open Raycast and type "DOGE" | ||
- See all initiatives sorted by most recent | ||
- Green checkmark indicates completed initiatives | ||
- Values are automatically formatted (B for billions, M for millions) | ||
|
||
### Quick Actions | ||
- Press `↵` to open the initiative source | ||
- Press `⌘` + `C` to copy the initiative URL | ||
- Press `⌘` + `V` to copy the initiative value | ||
|
||
### Search | ||
- Start typing to filter initiatives by title | ||
- Results update in real-time | ||
|
||
## Data Source | ||
|
||
All initiative data is sourced from [doge-tracker.com](https://www.doge-tracker.com/) | ||
|
||
## About | ||
|
||
Created by [Osprey](https://www.raycast.com/osprey) | ||
|
||
## License | ||
|
||
MIT License | ||
Information pulled from: https://api.doge.gov/ | ||
Take a look at how to use this API here: https://api.doge.gov/docs#/Payments/get_Payments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: The README lacks important information like installation instructions, usage examples, and command descriptions that were present in the original version
# Raycast DOGE Extension | ||
Thanks to [@OxOsprey](https://github.com/0xOsprey) for the original extension! | ||
|
||
Track DOGE cost-saving initiatives and their progress directly in Raycast. | ||
View information about the work done by the Department of Government Efficiency. Essentially everything on the https://doge.gov website will be updated here (including, contracts, grants, leases, and payments). Let's MAKE RAYCAST GREAT AGAIN! | ||
|
||
## Features | ||
|
||
- 💰 View total savings across all initiatives | ||
- 📊 Track completion status of each initiative | ||
- 🔍 Search through all initiatives | ||
- 🔗 Quick access to initiative sources | ||
- 📋 Copy values and links with one click | ||
|
||
## Installation | ||
|
||
1. Make sure you have [Raycast](https://raycast.com/) installed | ||
2. Install the extension from the [Raycast Store](https://www.raycast.com/osprey/doge-tracker) | ||
|
||
## Usage | ||
|
||
### View Initiatives | ||
- Open Raycast and type "DOGE" | ||
- See all initiatives sorted by most recent | ||
- Green checkmark indicates completed initiatives | ||
- Values are automatically formatted (B for billions, M for millions) | ||
|
||
### Quick Actions | ||
- Press `↵` to open the initiative source | ||
- Press `⌘` + `C` to copy the initiative URL | ||
- Press `⌘` + `V` to copy the initiative value | ||
|
||
### Search | ||
- Start typing to filter initiatives by title | ||
- Results update in real-time | ||
|
||
## Data Source | ||
|
||
All initiative data is sourced from [doge-tracker.com](https://www.doge-tracker.com/) | ||
|
||
## About | ||
|
||
Created by [Osprey](https://www.raycast.com/osprey) | ||
|
||
## License | ||
|
||
MIT License | ||
Information pulled from: https://api.doge.gov/ | ||
Take a look at how to use this API here: https://api.doge.gov/docs#/Payments/get_Payments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Since this is a complete pivot of the extension's purpose, this should be a new extension rather than an update to the existing DOGE tracker
extensions/doge-tracker/CHANGELOG.md
Outdated
|
||
## [Official API] - {PR_MERGE_DATE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: The new entry should be placed above the Initial Release entry since newest entries should be at the top
## [Initial Release] - 2025-02-28 | |
## [Official API] - {PR_MERGE_DATE} | |
## [Official API] - {PR_MERGE_DATE} | |
## [Initial Release] - 2025-02-28 |
- Cost per Square Foot: ${formatCurrency(lease.value / lease.sq_ft)} per sq.ft. | ||
- Savings per Square Foot: ${formatCurrency(lease.savings / lease.sq_ft)} per sq.ft. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Add null/zero checks for sq_ft to prevent division by zero errors when calculating per square foot values
- Cost per Square Foot: ${formatCurrency(lease.value / lease.sq_ft)} per sq.ft. | |
- Savings per Square Foot: ${formatCurrency(lease.savings / lease.sq_ft)} per sq.ft. | |
- Cost per Square Foot: ${lease.sq_ft ? formatCurrency(lease.value / lease.sq_ft) : 'N/A'} per sq.ft. | |
- Savings per Square Foot: ${lease.sq_ft ? formatCurrency(lease.savings / lease.sq_ft) : 'N/A'} per sq.ft. |
const [filterOption] = useState(FilterOption.None); | ||
const [filterValue] = useState(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: filterOption and filterValue states are defined but never updated. Either implement the filter functionality or remove unused state variables
case SortOption.Agency: | ||
return a.agency.localeCompare(b.agency); | ||
case SortOption.Organization: | ||
return a.org_name.localeCompare(b.org_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: potential runtime error if agency or org_name is undefined - need null checks before calling localeCompare
case SortOption.Agency: | |
return a.agency.localeCompare(b.agency); | |
case SortOption.Organization: | |
return a.org_name.localeCompare(b.org_name); | |
case SortOption.Agency: | |
return (a.agency || '').localeCompare(b.agency || ''); | |
case SortOption.Organization: | |
return (a.org_name || '').localeCompare(b.org_name || ''); |
|
||
// Render detailed view if a payment is selected | ||
if (selectedPaymentId !== null) { | ||
const selectedPayment = payments.find((_, index) => index === selectedPaymentId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: using array index as ID is fragile - consider using a unique identifier from the payment object instead
onError: (error) => { | ||
showToast({ | ||
style: Toast.Style.Failure, | ||
title: "Failed to load payments", | ||
message: error.message, | ||
}); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: consider using showFailureToast from @raycast/utils for error handling
onError: (error) => { | |
showToast({ | |
style: Toast.Style.Failure, | |
title: "Failed to load payments", | |
message: error.message, | |
}); | |
}, | |
onError: (error) => { | |
showFailureToast(error, { title: "Failed to load payments" }); | |
}, |
Published to the Raycast Store: |
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
Screencast
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are placed outside of themetadata
folder