Skip to content

Release 0.65.0#437

Merged
tudddorrr merged 4 commits intomainfrom
develop
Dec 31, 2025
Merged

Release 0.65.0#437
tudddorrr merged 4 commits intomainfrom
develop

Conversation

@tudddorrr
Copy link
Collaborator

No description provided.

@tudddorrr tudddorrr added the release This pull request contains a release label Dec 31, 2025
@claude
Copy link

claude bot commented Dec 31, 2025

Code Review - PR #437

Overall, this PR adds a nice channel storage feature. I found one bug that needs fixing.


🟡 Potential Bugs

SWR cache key mismatch in useChannelStorage.ts

The SWR cache key includes search and page, but the fetcher only reads the URL from the key parameter. This means the fetcher will always use the initial search and page values from closure instead of the values in the cache key.

Current code (lines 16-24):

const fetcher = async ([url]: [string]) => {
  const params = new URLSearchParams({ page: String(page), search })
  const res = await makeValidatedGetRequest(`${url}?${params.toString()}`, channelStorageSchema)
  return res
}

const { data, error } = useSWR(
  [`/games/${activeGame.id}/game-channels/${channelId}/storage`, search, page],
  fetcher
)

Fix - destructure search and page from the key:

const fetcher = async ([url, search, page]: [string, string, number]) => {
  const params = new URLSearchParams({ page: String(page), search })
  const res = await makeValidatedGetRequest(`${url}?${params.toString()}`, channelStorageSchema)
  return res
}

This pattern matches usePlayerEvents.ts:9-22 and useChannels.ts:16-24.


✅ Code Quality, Performance, Security

No issues found.

@tudddorrr tudddorrr merged commit 4d59a28 into main Dec 31, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release This pull request contains a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant