Skip to content

Revert Spotify recently played streaming changes (#174) - #178

Closed
nwthomas wants to merge 1 commit into
mainfrom
revert-spotify-streaming
Closed

nwthomas wants to merge 1 commit into
mainfrom
revert-spotify-streaming

Conversation

@nwthomas

Copy link
Copy Markdown
Owner

Reverts f104457 (#174), restoring the previous Spotify recently-played implementation:

  • Renames SpotifyRecentlyPlayed.tsx back to RecentlyPlayed.tsx and restores the earlier fetching/presentation split
  • Restores the previous homepage (app/page.tsx) wiring for the track
  • Removes the reserved track-space styles added to app/globals.css
  • Restores the previous Redis caching logic in app/utils/spotify.ts

Lint and typecheck pass.

🤖 Generated with Claude Code

…pace (#174)"

This reverts commit f104457.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
personal-portfolio Ready Ready Preview Oct 12, 2026 12:56am UTC

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T00:59:57.289499Z 0fdd6a2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0fdd6a24bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/page.tsx
export default async function Page() {
const { posts } = postsJson;
const lastThreePosts: Post[] = posts.slice(0, 3);
const nowPlaying = await getNowPlaying();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep Spotify off the homepage critical path

When Redis or Spotify is slow or unreachable, this await runs before any homepage JSX is returned and outside local error handling. The underlying Redis operations and fetch calls can reject, and the Spotify requests no longer have abort timeouts, so the otherwise static / route can either fail completely or remain blocked until the deployment timeout; keep this optional widget behind a guarded streaming boundary or otherwise catch and bound the lookup.

Useful? React with 👍 / 👎.

Comment thread app/utils/spotify.ts
}
}

const accessToken = await getAccessToken();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Check the production cache before refreshing the token

On every production homepage request, this refreshes the Spotify access token before consulting the one-hour Redis cache. Consequently, even a cache hit incurs an external request, and a token-endpoint error response returns null before the valid cached track can be read; moving the cache lookup ahead of getAccessToken() preserves the cache's latency and availability benefits.

Useful? React with 👍 / 👎.

Comment on lines 64 to 66
marginLeft: "1rem",
marginTop: "1.25rem",
maxWidth: "calc(100% - 1rem)",
width: "fit-content",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Constrain long track text to the viewport

On narrow viewports or for Spotify metadata containing a long unbroken track or artist name, this fit-content flex link has no maximum width and its text child has neither min-width: 0 nor forced wrapping. The row can therefore grow wider than the homepage section and introduce horizontal scrolling; constrain the link to the available width and restore wrapping or clamping on the text child.

Useful? React with 👍 / 👎.

Comment thread app/utils/spotify.ts
Comment on lines +68 to 69
if (res.status === 204 || !res.ok) {
return null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Distinguish Spotify failures from an idle player

When the currently-playing endpoint responds with an error such as 401, 429, or 5xx, this condition treats it exactly like the valid 204 “nothing playing” response. getNowPlaying() then makes another request to the recently-played endpoint and can cache an older track for the full one-hour TTL even though the current state was simply unavailable; reserve null for the valid empty response and propagate or explicitly handle error statuses.

Useful? React with 👍 / 👎.

@nwthomas nwthomas closed this Oct 12, 2026
@nwthomas nwthomas reopened this Oct 12, 2026
@nwthomas nwthomas closed this Oct 12, 2026
@nwthomas nwthomas reopened this Oct 12, 2026
@nwthomas nwthomas closed this Oct 12, 2026
@nwthomas nwthomas reopened this Oct 12, 2026
@nwthomas nwthomas closed this Oct 16, 2026
@nwthomas
nwthomas deleted the revert-spotify-streaming branch October 16, 2026 04:49

This branch was successfully deployed

1 active deployment
Preview — 0fdd6a24 Deployed Oct 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant