Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,14 @@
within your project.
{:else}
Set the environment variables or secret keys that will be passed to your {product}. Global
variables can be found in <Link
href={`${base}/project-${$project.region}-${$project.$id}/settings#variables`}>
project settings</Link
>.
variables can be found in {#if $project && $project.region && $project.$id}
<Link
href={`${base}/project-${$project.region}-${$project.$id}/settings#variables`}>
project settings</Link
>.
{:else}
project settings.
{/if}
{/if}
<svelte:fragment slot="aside">
<Layout.Stack gap="l">
Expand Down Expand Up @@ -323,12 +327,16 @@
Some environment variables have
{/if}
a naming conflict with a global variable. View global variables in
<a
href={`${base}/project-${$project.region}-${$project.$id}/settings`}
title="Project settings"
class="link">
project settings</a
>.
{#if $project && $project.region && $project.$id}
<a
href={`${base}/project-${$project.region}-${$project.$id}/settings`}
title="Project settings"
class="link">
project settings</a
>.
{:else}
project settings.
{/if}
Comment on lines +330 to +339
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Inconsistencies in link implementation and URL format.

Two issues to address:

  1. Component inconsistency: This uses an <a> tag, while lines 277-280 use the <Link> component for a similar purpose. Both link to project settings but use different implementations.

  2. URL format inconsistency: This links to /settings (line 332), while line 278 links to /settings#variables. Both contexts reference global variables in project settings, so they should navigate to the same location.

Ensure consistent component usage and URL format across all project settings links.

 {#if $project && $project.region && $project.$id}
-    <a
-        href={`${base}/project-${$project.region}-${$project.$id}/settings`}
-        title="Project settings"
-        class="link">
-        project settings</a
-    >.
+    <Link
+        href={`${base}/project-${$project.region}-${$project.$id}/settings#variables`}>
+        project settings</Link
+    >.
 {:else}
     project settings.
 {/if}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{#if $project && $project.region && $project.$id}
<a
href={`${base}/project-${$project.region}-${$project.$id}/settings`}
title="Project settings"
class="link">
project settings</a
>.
{:else}
project settings.
{/if}
{#if $project && $project.region && $project.$id}
<Link
href={`${base}/project-${$project.region}-${$project.$id}/settings#variables`}>
project settings</Link
>.
{:else}
project settings.
{/if}
🤖 Prompt for AI Agents
In src/routes/(console)/project-[region]-[project]/updateVariables.svelte around
lines 330 to 339, replace the plain <a> link with the same <Link> component used
earlier and make its destination identical by adding the #variables fragment
(i.e., link to
`${base}/project-${$project.region}-${$project.$id}/settings#variables`), and
ensure the Link component is imported at the top of the file; keep the fallback
text branch unchanged.

</p>
</Alert.Inline>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@
<Layout.Stack>
{#if !isGlobal}
<Alert.Inline>
When there is a naming conflict with a global variable in your <Link
href={`${base}/project-${$project.region}-${$project.$id}/settings/variables`}>
project settings</Link>
When there is a naming conflict with a global variable in your {#if $project && $project.region && $project.$id}
<Link
href={`${base}/project-${$project.region}-${$project.$id}/settings/variables`}>
project settings</Link>
{:else}
project settings
{/if}
Comment on lines +56 to +62
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

URL format inconsistent with updateVariables.svelte.

The null-safety guard is correctly implemented. However, this file uses /settings/variables (a route segment), while updateVariables.svelte uses two different patterns:

  • Line 278: /settings#variables (hash anchor)
  • Line 332: /settings (no anchor/segment)

All three locations link to the global variables in project settings but use different URLs. Standardize on a single URL format across all references.

Verify which URL format correctly navigates to the global variables section:

#!/bin/bash
# Find the settings route structure to determine correct URL format
fd -e svelte "settings" src/routes | head -20

# Check for variables route or anchor usage  
rg -nP 'settings.*variables|variables.*settings' --type=svelte src/routes -C2
🤖 Prompt for AI Agents
In src/routes/(console)/project-[region]-[project]/updateVariablesModal.svelte
around lines 56-62, the link uses /settings/variables which is inconsistent with
other references (settings#variables and /settings); verify which URL format
actually navigates to the global variables section by checking the settings
route (anchor vs segment) and then replace the href here to the canonical format
used project-wide (keep the existing null-safety guard {$project &&
$project.region && $project.$id} and only change the URL string to the verified
canonical value, ensuring the displayed link text remains the same).

and a {product} environment variable, the global variable will be ignored.
</Alert.Inline>
{/if}
Expand Down