Repository navigation
Conversation
Pull request changelogAppAddedChangedDeprecatedRemovedFixedSecurityWebsiteAddedChangedDeprecatedRemovedFixedSecurityHostingAddedChangedDeprecatedRemovedFixedSecurity |
Merge Protections🔴 1 of 1 protections blocking · waiting on ⛓️ dependency
🔴 ⛓️ Depends-On RequirementsWaiting for
This rule is failing.Requirement based on the presence of `Depends-On` in the body of the pull request
|
Frontend previewsLast deployed commit is 55cec6487a7c76f6ab1e08e3d672d2fa45a4bd16 Persistent
Latest commit
|
|
Tick the box to add this pull request to the merge queue (same as
|
[High impact] The refactor reaches browsing and server-install workflows in both the website and desktop app. Fix failed lookup handling and satisfy the folder requirement before merging; the tab-switch issue should also be corrected.
|
| export async function settleQuery<TData, TError>(query: UseQueryReturnType<TData, TError>) { | ||
| if (query.data.value !== undefined) return | ||
| await query.suspense() |
There was a problem hiding this comment.
Failed lookups break browsing. When an uncached target lookup fails,
settleQuery() lets the rejected suspense() call escape. This reaches the page's top-level await, so setup stops before useAppBrowseManager() provides the data needed to render browsing. A failed linked-project request or server-content request can therefore break the whole page, even though the error watchers show a notification. The old setup caught these failures. Catch them here or in ready() so the page can still render.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/app-frontend/src/platform/adapters/browse/query-options.ts
Line: 63-65
Comment:
**Failed lookups break browsing.** When an uncached target lookup fails, `settleQuery()` lets the rejected `suspense()` call escape. This reaches the page's top-level `await`, so setup stops before `useAppBrowseManager()` provides the data needed to render browsing. A failed linked-project request or server-content request can therefore break the whole page, even though the error watchers show a notification. The old setup caught these failures. Catch them here or in `ready()` so the page can still render.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| const type = projectType.value | ||
| const search = options.searchQuery(debouncedParams.value) | ||
| return { | ||
| queryKey: [...search.queryKey, type], | ||
| queryFn: async (): Promise<TypedSearchResults> => ({ | ||
| ...(await search.queryFn()), | ||
| projectType: type, |
There was a problem hiding this comment.
Tab switches show wrong results.
projectType changes immediately, but debouncedParams still contains the previous tab's search for 200 ms. This starts a request with the old filters and labels its response with the new type. If it finishes within that window, currentResults accepts it and shows the wrong projects under the new tab, including while the correct request loads. Debounce the type and parameters together, or take both from the same saved search values.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/ui/src/layouts/shared/browse-tab/composables/use-browse-view-state.ts
Line: 186-192
Comment:
**Tab switches show wrong results.** `projectType` changes immediately, but `debouncedParams` still contains the previous tab's search for 200 ms. This starts a request with the old filters and labels its response with the new type. If it finishes within that window, `currentResults` accepts it and shows the wrong projects under the new tab, including while the correct request loads. Debounce the type and parameters together, or take both from the same saved search values.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| import { defineMessages, type useVIntl } from '@modrinth/ui' | ||
|
|
||
| export const playtimeMessages = defineMessages({ |
There was a problem hiding this comment.
New files bypass feature folders. The app guide requires new code to use the new folder structure, even when surrounding code remains in
pages/. This formatter is a new instance-specific file under the old page tree. Move it into features/instances/ and update its imports. The new instance-metadata-items.vue has the same issue.
Context Used: apps/app-frontend/AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/app-frontend/src/pages/instance/playtime.ts
Line: 1-3
Comment:
**New files bypass feature folders.** The app guide requires new code to use the new folder structure, even when surrounding code remains in `pages/`. This formatter is a new instance-specific file under the old page tree. Move it into `features/instances/` and update its imports. The new `instance-metadata-items.vue` has the same issue.
**Context Used:** apps/app-frontend/AGENTS.md ([source](https://github.com/modrinth/code/blob/main/apps/app-frontend/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
No description provided.