Update stock-tracker extension#27549
Conversation
- Show sunrise/moon icon on rows with pre/post-market prices - Show a star next to symbol in search results when already in Favorites - Show last-updated timestamp next to section headers - Fix "Move Down in Favorites" no-op for last item; guard missing symbols - Fix prices of 0 not rendering; scale negative values correctly - Refresh Yahoo cookie/crumb proactively after 12h - Only refresh cookie/crumb on 401/403 (was any 4xx/5xx) - Fix Set-Cookie parsing under native fetch - Thread AbortSignal through cookie/crumb fetches - Cancel in-flight requests on unmount - Recover gracefully from corrupted local-storage values - Switch to native fetch (removes punycode deprecation warning) - Update @raycast/api, TypeScript, ESLint, and other dependencies Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thank you for your first contribution! 🎉 🔔 @hmarr @ericchernuka @MeleMannen 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. 📋 Quick checkout commandsBRANCH="stock-tracker-improvements"
FORK_URL="https://github.com/vinayh/raycast-extensions.git"
EXTENSION_NAME="stock-tracker"
REPO_NAME="raycast-extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
Greptile SummaryThis PR makes a broad set of improvements to the stock-tracker extension: new UX indicators (pre/post-market icons, ★ for favorited symbols, last-updated timestamp), several bug fixes (
Confidence Score: 4/5Safe to merge after fixing the CHANGELOG date placeholder. One P1 finding: the CHANGELOG entry uses a hardcoded date instead of
Important Files Changed
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
extensions/stock-tracker/CHANGELOG.md:3
**Hardcoded date should be `{PR_MERGE_DATE}`**
The changelog entry uses a hardcoded date (`2026-04-30`) instead of the `{PR_MERGE_DATE}` template variable. The placeholder is automatically replaced with the actual merge date when the PR is merged — using a real date bypasses that mechanism.
```suggestion
## [Improvements] - {PR_MERGE_DATE}
```
### Issue 2 of 2
extensions/stock-tracker/src/yahoo-finance/client.ts:108-121
**`getCookie` does not check `response.ok`**
`getCrumb` was updated to check `response.ok` and throw a descriptive error, but `getCookie` was not given the same treatment. If `https://fc.yahoo.com` returns a non-2xx status, the code silently falls through to parsing `Set-Cookie` headers and then throws the generic "Failed to fetch cookie" message, making it hard to diagnose the real failure.
```suggestion
async function getCookie(signal: AbortSignal): Promise<string> {
const response = await fetch("https://fc.yahoo.com", { headers: HEADERS, signal });
if (!response.ok) {
throw new Error(`Failed to fetch cookie: ${response.status} ${response.statusText}`);
}
```
Reviews (4): Last reviewed commit: "Update CHANGELOG.md and add platforms fi..." | Re-trigger Greptile |
…slint plugin Defer entirely to @raycast/eslint-config (the declared devDependency). defineConfig from eslint/config flattens the nested array that @raycast/eslint-config currently emits, so we no longer need to inline the composition or import @raycast/eslint-plugin directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ney suffix bound - getCrumb now throws on non-2xx instead of caching an HTML error page as a "crumb" string (which would cause the next request to fail with 401/403 and waste a round trip plus poison the cache for up to 12h). - formatMoney clamps the magnitude to the suffix table length so values >= 1e15 render as "1000.00T" rather than "1000.00undefined". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0xdhrv
left a comment
There was a problem hiding this comment.
Looks good to me, approved ✅
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@vinayh). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag. |
| @@ -1,5 +1,19 @@ | |||
| # Stock Tracker Changelog | |||
|
|
|||
| ## [Improvements] - 2026-04-30 | |||
There was a problem hiding this comment.
Hardcoded date should be
{PR_MERGE_DATE}
The changelog entry uses a hardcoded date (2026-04-30) instead of the {PR_MERGE_DATE} template variable. The placeholder is automatically replaced with the actual merge date when the PR is merged — using a real date bypasses that mechanism.
| ## [Improvements] - 2026-04-30 | |
| ## [Improvements] - {PR_MERGE_DATE} |
Rule Used: What: Changelog entries must use {PR_MERGE_DATE}... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/stock-tracker/CHANGELOG.md
Line: 3
Comment:
**Hardcoded date should be `{PR_MERGE_DATE}`**
The changelog entry uses a hardcoded date (`2026-04-30`) instead of the `{PR_MERGE_DATE}` template variable. The placeholder is automatically replaced with the actual merge date when the PR is merged — using a real date bypasses that mechanism.
```suggestion
## [Improvements] - {PR_MERGE_DATE}
```
**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}`... ([source](https://app.greptile.com/review/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))
How can I resolve this? If you propose a fix, please make it concise.
Hello!
I've been using this extension regularly over the past few weeks and thought I should contribute back some minor fixes and (IMO) UX improvements. All were AI-assisted and human-verified.
Summary
0were rendering as the missing-value placeholder; negative values now scale with k/M/B/T suffixes.401/403(was previously refreshing on any 4xx/5xx, including404/5xx).Set-Cookieparsing under nativefetch(usegetSetCookie()) and threadAbortSignalthrough cookie/crumb fetches.fetch, removing thepunycodedeprecation warning. Update@raycast/api, TypeScript, ESLint, and other dependencies; migrate to ESLint flat config.useFavorites/useStockInfo/useStockSearchto the top-levelCommand()for a single source of truth (eliminates duplicate LocalStorage loads on each search/clear toggle).Test plan
npm run buildpassesnpm run lintpasses (only the pre-existing@raycast/prefer-title-casewarning, which is a false positive on "Move Up in Favorites")npm run dev): favorites view, search, add/remove favorite, move up/down, detail panel, last-updated timestamp, market-state icons, ★ on already-favorited search results