- Notifications
You must be signed in to change notification settings - Fork1k
feat(site): display warnings in tasks page when wildcard is not configured#19780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
kacpersaw merged 5 commits intomainfromkacpersaw/feat-wildcard-access-url-warning-tasks-uiSep 19, 2025
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
5 commits Select commitHold shift + click to select a range
09b2be6
feat: display warning message when wildcard is not configured in task…
kacpersawa2e8a43
Merge branch 'main' into kacpersaw/feat-wildcard-access-url-warning-t…
kacpersaw74073ed
Change docs url
kacpersaw6b8843b
add TaskWildcardWarning component
kacpersaw944cd77
Apply review suggestions
kacpersawFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
add TaskWildcardWarning component
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit6b8843b56a886b51ae7baad69fce40437ffa10a4
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import type { WorkspaceApp } from "api/typesGenerated"; | ||
import { Spinner } from "components/Spinner/Spinner"; | ||
import { useProxy } from "contexts/ProxyContext"; | ||
import type { Task } from "modules/tasks/tasks"; | ||
import type { FC } from "react"; | ||
import { TaskAppIFrame } from "./TaskAppIframe"; | ||
import { TaskWildcardWarning } from "./TaskWildcardWarning"; | ||
type TaskSidebarProps = { | ||
task: Task; | ||
@@ -77,37 +74,19 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => { | ||
return ( | ||
<aside className="flex flex-col h-full shrink-0 w-full"> | ||
{sidebarAppStatus === "loading" ? ( | ||
<div className="flex-1 flex flex-col items-center justify-center"> | ||
<Spinner loading className="mb-4" /> | ||
kacpersaw marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
</div> | ||
) : shouldDisplayWildcardWarning ? ( | ||
<TaskWildcardWarning /> | ||
) : sidebarAppStatus === "healthy" && sidebarApp ? ( | ||
<TaskAppIFrame | ||
active | ||
key={sidebarApp.id} | ||
app={sidebarApp} | ||
task={task} | ||
/> | ||
) : ( | ||
<div className="flex-1 flex flex-col items-center justify-center"> | ||
<h3 className="m-0 font-medium text-content-primary text-base"> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import{Button}from"components/Button/Button"; | ||
import{useAuthenticated}from"hooks/useAuthenticated"; | ||
import{SquareArrowOutUpRightIcon}from"lucide-react"; | ||
import{LinkasRouterLink}from"react-router"; | ||
import{docs}from"utils/docs"; | ||
exportconstTaskWildcardWarning=()=>{ | ||
const{ permissions}=useAuthenticated(); | ||
constcanEditDeploymentConfig=Boolean(permissions.editDeploymentConfig); | ||
return( | ||
<divclassName="mx-auto my-auto flex flex-col items-center max-w-xl"> | ||
kacpersaw marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
<h3className="font-medium text-content-primary text-base">Error</h3> | ||
<divclassName="text-content-secondary text-sm text-center flex flex-col gap-3 items-center"> | ||
<divclassName="px-4"> | ||
This application has{" "} | ||
<codeclassName="py-px px-1 bg-surface-tertiary rounded-sm text-content-primary"> | ||
subdomain = true | ||
</code> | ||
{canEditDeploymentConfig ?( | ||
<> | ||
, but subdomain applications are not configured. This application | ||
won't be accessible until you configure the{" "} | ||
<codeclassName="py-px px-1 bg-surface-tertiary rounded-sm text-content-primary whitespace-nowrap"> | ||
--wildcard-access-url | ||
</code>{" "} | ||
flag when starting the Coder server. | ||
</> | ||
) :( | ||
", which requires a Coder deployment with a Wildcard Access URL configured. Please contact your administrator." | ||
)} | ||
</div> | ||
<Buttonsize="sm"variant="outline"asChild> | ||
<RouterLinkto={docs("/admin/networking/wildcard-access-url")}> | ||
<SquareArrowOutUpRightIcon/> | ||
Learn more about wildcard access URL | ||
</RouterLink> | ||
</Button> | ||
</div> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.