diff --git a/packages/app/src/features/settings/api-key-create.tsx b/packages/app/src/features/settings/api-key-create.tsx index bf43fe3..c3ce542 100644 --- a/packages/app/src/features/settings/api-key-create.tsx +++ b/packages/app/src/features/settings/api-key-create.tsx @@ -1,5 +1,5 @@ import { Button, Input, Select, Label, Card } from "../../shared/ui"; -import { Link } from "@tanstack/react-router"; +import { Link, useNavigate } from "@tanstack/react-router"; import { useState } from "react"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { api } from "factorize-api-client"; @@ -11,6 +11,7 @@ const allScopes = ["projects:read", "projects:write", "jobs:read", "jobs:write", const scopeDescriptions: Record = { "projects:read": "View projects", "projects:write": "Create, rename, and delete projects", "jobs:read": "View jobs and job configuration", "jobs:write": "Create, edit, enable, disable, and delete jobs", "runs:read": "View runs, traces, context, and diagnostics", "runs:invoke": "Start jobs", "runs:cancel": "Stop or cancel runs", "integrations:read": "View integrations and provider resources", "integrations:write": "Create, configure, test, and remove integrations" }; export function ApiKeyCreate() { + const navigate = useNavigate(); const cache = useQueryClient(); const [secret, setSecret] = useState(""); const [name, setName] = useState(""); @@ -32,7 +33,7 @@ export function ApiKeyCreate() { {secret ?

Copy this key now. It will only be displayed once.

{secret}
-
+
:
{ e.preventDefault(); create.mutate(); }}>

Permissions are independent: write does not imply read. Job writes can affect future schedule, webhook, and lifecycle executions; deleting a job may remove its run history and artifacts.