[nexus] fix(audit): resolve integration checker findings — straggler strings, query param pre-fill, orphaned import
This commit is contained in:
parent
e6ba3cc9ff
commit
b5be048168
5 changed files with 14 additions and 11 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import { useEffect, useState } from "react";
|
||||
import { VOCAB } from "@paperclipai/branding";
|
||||
import { useNavigate, useLocation } from "@/lib/router";
|
||||
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { approvalsApi } from "../api/approvals";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { useMemo } from "react";
|
||||
import { VOCAB } from "@paperclipai/branding"; // [nexus]
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { Link, useParams, useSearchParams } from "@/lib/router";
|
||||
import { accessApi } from "../api/access";
|
||||
|
|
@ -70,7 +71,7 @@ export function BoardClaimPage() {
|
|||
return (
|
||||
<div className="mx-auto max-w-xl py-10">
|
||||
<div className="rounded-lg border border-border bg-card p-6">
|
||||
<h1 className="text-lg font-semibold">Board ownership claimed</h1>
|
||||
<h1 className="text-lg font-semibold">{VOCAB.board} ownership claimed</h1>
|
||||
<p className="mt-2 text-sm text-muted-foreground">
|
||||
This instance is now linked to your authenticated user.
|
||||
</p>
|
||||
|
|
@ -88,7 +89,7 @@ export function BoardClaimPage() {
|
|||
<div className="rounded-lg border border-border bg-card p-6">
|
||||
<h1 className="text-lg font-semibold">Sign in required</h1>
|
||||
<p className="mt-2 text-sm text-muted-foreground">
|
||||
Sign in or create an account, then return to this page to claim Board ownership.
|
||||
Sign in or create an account, then return to this page to claim {VOCAB.board} ownership.
|
||||
</p>
|
||||
<Button asChild className="mt-4">
|
||||
<Link to={`/auth?next=${encodeURIComponent(currentPath)}`}>Sign in / Create account</Link>
|
||||
|
|
@ -101,7 +102,7 @@ export function BoardClaimPage() {
|
|||
return (
|
||||
<div className="mx-auto max-w-xl py-10">
|
||||
<div className="rounded-lg border border-border bg-card p-6">
|
||||
<h1 className="text-xl font-semibold">Claim Board ownership</h1>
|
||||
<h1 className="text-xl font-semibold">Claim {VOCAB.board} ownership</h1>
|
||||
<p className="mt-2 text-sm text-muted-foreground">
|
||||
This will promote your user to instance admin and migrate company ownership access from local trusted mode.
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { useEffect, useMemo, useRef, useState, type ChangeEvent } from "react";
|
||||
import { VOCAB } from "@paperclipai/branding"; // [nexus]
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import type {
|
||||
CompanyPortabilityCollisionStrategy,
|
||||
|
|
@ -1203,7 +1204,7 @@ export function CompanyImport() {
|
|||
type="text"
|
||||
value={newCompanyName}
|
||||
onChange={(e) => setNewCompanyName(e.target.value)}
|
||||
placeholder="Imported Company"
|
||||
placeholder={`Imported ${VOCAB.company}`}
|
||||
/>
|
||||
</Field>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ export function CompanySettings() {
|
|||
<div className="max-w-2xl space-y-6">
|
||||
<div className="flex items-center gap-2">
|
||||
<Settings className="h-5 w-5 text-muted-foreground" />
|
||||
<h1 className="text-lg font-semibold">Company Settings</h1>
|
||||
<h1 className="text-lg font-semibold">{VOCAB.company} Settings</h1>
|
||||
</div>
|
||||
|
||||
{/* General */}
|
||||
|
|
@ -234,7 +234,7 @@ export function CompanySettings() {
|
|||
General
|
||||
</div>
|
||||
<div className="space-y-3 rounded-md border border-border px-4 py-4">
|
||||
<Field label="Company name" hint="The display name for your company.">
|
||||
<Field label={`${VOCAB.company} name`} hint={`The display name for your ${VOCAB.company.toLowerCase()}.`}>
|
||||
<input
|
||||
className="w-full rounded-md border border-border bg-transparent px-2.5 py-1.5 text-sm outline-none"
|
||||
type="text"
|
||||
|
|
|
|||
|
|
@ -66,10 +66,12 @@ export function NewAgent() {
|
|||
const navigate = useNavigate();
|
||||
const [searchParams] = useSearchParams();
|
||||
const presetAdapterType = searchParams.get("adapterType");
|
||||
const presetRole = searchParams.get("role"); // [nexus]
|
||||
const presetName = searchParams.get("name"); // [nexus]
|
||||
|
||||
const [name, setName] = useState("");
|
||||
const [name, setName] = useState(presetName ?? ""); // [nexus]
|
||||
const [title, setTitle] = useState("");
|
||||
const [role, setRole] = useState("general");
|
||||
const [role, setRole] = useState(presetRole ?? "general"); // [nexus]
|
||||
const [reportsTo, setReportsTo] = useState<string | null>(null);
|
||||
const [configValues, setConfigValues] = useState<CreateConfigValues>(defaultCreateValues);
|
||||
const [selectedSkillKeys, setSelectedSkillKeys] = useState<string[]>([]);
|
||||
|
|
@ -292,9 +294,9 @@ export function NewAgent() {
|
|||
<div className="border-t border-border px-4 py-4">
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<h2 className="text-sm font-medium">Company skills</h2>
|
||||
<h2 className="text-sm font-medium">{VOCAB.company} skills</h2>
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
Optional skills from the company library. Built-in Paperclip runtime skills are added automatically.
|
||||
Optional skills from the {VOCAB.company.toLowerCase()} library. Built-in {VOCAB.appName} runtime skills are added automatically.
|
||||
</p>
|
||||
</div>
|
||||
{availableSkills.length === 0 ? (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue