Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions catalog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ where verb is one of

## Changes

- [Fixed] Fix "Error resolving revision" flash when navigating to a just-created package ([#4778](https://github.com/quiltdata/quilt/pull/4778))
- [Changed] Qurator: Switch to Claude Sonnet 4.5, add `quratorDefaultModel` config field for per-stack model override ([#4764](https://github.com/quiltdata/quilt/pull/4764))
- [Fixed] Fix crash when deleting a role on the admin page ([#4751](https://github.com/quiltdata/quilt/pull/4751))
- [Fixed] Fix presigned S3 URLs using wrong region for cross-bucket package files, causing download and preview failures ([#4742](https://github.com/quiltdata/quilt/pull/4742))
Expand Down
66 changes: 32 additions & 34 deletions catalog/app/containers/Bucket/PackageTree/PackageTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1170,43 +1170,41 @@ function PackageTreeQueries({
resolvedFrom,
mode,
}: PackageTreeQueriesProps) {
const {
fetching,
error,
data: revisionData,
} = GQL.useQuery(REVISION_QUERY, { bucket, name, hashOrTag })
const revisionQuery = GQL.useQuery(REVISION_QUERY, { bucket, name, hashOrTag })
const revisionListQuery = GQL.useQuery(REVISION_LIST_QUERY, { bucket, name })
const displayError = React.useMemo(() => errors.displayError(), [])

if (fetching) return <Placeholder color="text.secondary" />
if (error) return <>{displayError(error)}</>

if (!revisionData?.package) {
return (
<Message headline="No Such Package">
Package named{' '}
<M.Box component="span" fontWeight="fontWeightMedium">{`"${name}"`}</M.Box> could
not be found in this bucket.
</Message>
)
}

return (
<Selection.Provider>
<PackageTree
{...{
bucket,
name,
hashOrTag,
revision: revisionData.package.revision,
path,
mode,
resolvedFrom,
revisionListQuery,
}}
/>
</Selection.Provider>
)
return GQL.fold(revisionQuery, {
fetching: () => <Placeholder color="text.secondary" />,
error: (error) => <>{displayError(error)}</>,
data: (revisionData) => {
if (!revisionData.package) {
return (
<Message headline="No Such Package">
Package named{' '}
<M.Box component="span" fontWeight="fontWeightMedium">{`"${name}"`}</M.Box>{' '}
could not be found in this bucket.
</Message>
)
}
return (
<Selection.Provider>
<PackageTree
{...{
bucket,
name,
hashOrTag,
revision: revisionData.package.revision,
path,
mode,
resolvedFrom,
revisionListQuery,
}}
/>
</Selection.Provider>
)
},
})
}

interface PackageTreeRouteParams {
Expand Down
Loading