Skip to content

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

Merged
merged 6 commits into from
May 7, 2025

Conversation

Visual-Studio-Coder
Copy link
Contributor

@Visual-Studio-Coder Visual-Studio-Coder commented May 5, 2025

Description

Screencast

Checklist

- 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
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: doge-tracker Issues related to the doge-tracker extension labels May 5, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented May 5, 2025

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
@Visual-Studio-Coder Visual-Studio-Coder marked this pull request as ready for review May 5, 2025 00:22
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

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 multiple view commands - this is required for store submission per Raycast Documentation
  • All view commands should include subtitle in package.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 manual showToast 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

Comment on lines +7 to +9
files: ["src/**/*.jsx"],
// You can add specific rules or overrides here if needed
},
Copy link
Contributor

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

Suggested change
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!
Copy link
Contributor

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!'

Suggested change
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).

Comment on lines +1 to +7
# 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
Copy link
Contributor

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

Comment on lines +1 to +7
# 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
Copy link
Contributor

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

Comment on lines 3 to 5

## [Official API] - {PR_MERGE_DATE}
Copy link
Contributor

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

Suggested change
## [Initial Release] - 2025-02-28
## [Official API] - {PR_MERGE_DATE}
## [Official API] - {PR_MERGE_DATE}
## [Initial Release] - 2025-02-28

Comment on lines +171 to +172
- 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.
Copy link
Contributor

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

Suggested change
- 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.

Comment on lines +30 to +31
const [filterOption] = useState(FilterOption.None);
const [filterValue] = useState("");
Copy link
Contributor

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

Comment on lines +134 to +137
case SortOption.Agency:
return a.agency.localeCompare(b.agency);
case SortOption.Organization:
return a.org_name.localeCompare(b.org_name);
Copy link
Contributor

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

Suggested change
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);
Copy link
Contributor

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

Comment on lines +108 to +114
onError: (error) => {
showToast({
style: Toast.Style.Failure,
title: "Failed to load payments",
message: error.message,
});
},
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 using showFailureToast from @raycast/utils for error handling

Suggested change
onError: (error) => {
showToast({
style: Toast.Style.Failure,
title: "Failed to load payments",
message: error.message,
});
},
onError: (error) => {
showFailureToast(error, { title: "Failed to load payments" });
},

@pernielsentikaer pernielsentikaer self-assigned this May 7, 2025
@raycastbot raycastbot merged commit 459a1a1 into raycast:main May 7, 2025
2 checks passed
Copy link
Contributor

github-actions bot commented May 7, 2025

Published to the Raycast Store:
https://raycast.com/Visual-Studio-Coder/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
extension: doge-tracker Issues related to the doge-tracker extension extension fix / improvement Label for PRs with extension's fix improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants