Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: do not auto-complete (#20728)
ecmadaoa1248cf2ac89
diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/EditColumnForeignKeySheet.tsx b/frontend/src/react/components/SchemaEditorLite/Modals/EditColumnForeignKeySheet.tsxindex c12d7c252f..7dceb88b91 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/EditColumnForeignKeySheet.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Modals/EditColumnForeignKeySheet.tsx@@ -201,7 +201,11 @@ export function EditColumnForeignKeySheet({<label className="mb-1 block text-sm font-medium">{t("schema-editor.foreign-key.name")}</label>- <Input value={fkName} onChange={(e) => setFkName(e.target.value)} />+ <Input+ value={fkName}+ autoComplete="off"+ onChange={(e) => setFkName(e.target.value)}+ /></div>{showSchemaSelector && (<div>diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/FunctionNameDialog.tsx b/frontend/src/react/components/SchemaEditorLite/Modals/FunctionNameDialog.tsxindex c17198f569..4dff73087d 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/FunctionNameDialog.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Modals/FunctionNameDialog.tsx@@ -89,6 +89,7 @@ export function FunctionNameDialog({<Inputvalue={name}placeholder="Function name"+ autoComplete="off"autoFocusonChange={(e) => setName(e.target.value)}onKeyDown={(e) => {diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/ProcedureNameDialog.tsx b/frontend/src/react/components/SchemaEditorLite/Modals/ProcedureNameDialog.tsxindex e790bad0a6..197374d306 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/ProcedureNameDialog.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Modals/ProcedureNameDialog.tsx@@ -89,6 +89,7 @@ export function ProcedureNameDialog({<Inputvalue={name}placeholder="Procedure name"+ autoComplete="off"autoFocusonChange={(e) => setName(e.target.value)}onKeyDown={(e) => {diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/SchemaNameDialog.tsx b/frontend/src/react/components/SchemaEditorLite/Modals/SchemaNameDialog.tsxindex 6b88cd00c2..dd50e334fb 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/SchemaNameDialog.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Modals/SchemaNameDialog.tsx@@ -79,6 +79,7 @@ export function SchemaNameDialog({<Inputvalue={schemaName}placeholder={t("schema-editor.schema.name-placeholder")}+ autoComplete="off"autoFocusonChange={(e) => setSchemaName(e.target.value)}onKeyDown={(e) => {diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/TableNamePopover.tsx b/frontend/src/react/components/SchemaEditorLite/Modals/TableNamePopover.tsxindex 374c345e3e..96059082cd 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/TableNamePopover.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Modals/TableNamePopover.tsx@@ -162,6 +162,7 @@ export function TableNamePopover({<Inputvalue={tableName}placeholder={t("schema-editor.table.name-placeholder")}+ autoComplete="off"autoFocusonChange={(e) => setTableName(e.target.value)}onKeyDown={(e) => {diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/ViewNameDialog.tsx b/frontend/src/react/components/SchemaEditorLite/Modals/ViewNameDialog.tsxindex 6a3dc62da5..b8fd639b53 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/ViewNameDialog.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Modals/ViewNameDialog.tsx@@ -89,6 +89,7 @@ export function ViewNameDialog({<Inputvalue={name}placeholder="View name"+ autoComplete="off"autoFocusonChange={(e) => setName(e.target.value)}onKeyDown={(e) => {diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.tsx b/frontend/src/react/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.tsxindex d47b08e993..b73e96e909 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.tsx@@ -91,6 +91,7 @@ export function IndexesEditor({<TableCell><Inputvalue={index.name}+ autoComplete="off"disabled={isReadonly || index.primary}size="sm"className="border-none bg-transparent shadow-none focus-visible:ring-1"@@ -116,6 +117,7 @@ export function IndexesEditor({<TableCell><Inputvalue={index.comment}+ autoComplete="off"disabled={isReadonly}size="sm"className="border-none bg-transparent shadow-none focus-visible:ring-1"diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.tsx b/frontend/src/react/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.tsxindex c034dfd54c..191be7353e 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.tsx@@ -123,6 +123,7 @@ export function PartitionsEditor({<TableCell><Inputvalue={partition.name}+ autoComplete="off"disabled={isReadonly || status === "dropped"}size="sm"className="border-none bg-transparent shadow-none focus-visible:ring-1"@@ -138,6 +139,7 @@ export function PartitionsEditor({<TableCell><Inputvalue={partition.expression}+ autoComplete="off"disabled={isReadonly || !isFirst || status === "dropped"}size="sm"className="border-none bg-transparent shadow-none focus-visible:ring-1"@@ -150,6 +152,7 @@ export function PartitionsEditor({<TableCell><Inputvalue={partition.value}+ autoComplete="off"disabled={isReadonly || status === "dropped"}size="sm"className="border-none bg-transparent shadow-none focus-visible:ring-1"diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DataTypeCell.tsx b/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DataTypeCell.tsxindex 08e9c0a895..b2856d3d26 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DataTypeCell.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DataTypeCell.tsx@@ -148,6 +148,7 @@ export function DataTypeCell({<Inputref={inputRef}value={value}+ autoComplete="off"disabled={readonly}placeholder="column type"size="xs"diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DefaultValueCell.tsx b/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DefaultValueCell.tsxindex b41fcf8b32..0e1cdf8ba8 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DefaultValueCell.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DefaultValueCell.tsx@@ -31,6 +31,7 @@ export function DefaultValueCell({ column, disabled, onUpdate }: Props) {return (<Inputvalue={column.default ?? ""}+ autoComplete="off"disabled={disabled}placeholder={t("schema-editor.default.placeholder")}size="xs"diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.tsx b/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.tsxindex a7ba10db76..b33872f46d 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.tsx@@ -359,6 +359,7 @@ export function TableColumnEditor({autoFocus={status === "created" && column.name === ""}placeholder={t("schema-editor.column.name-placeholder")}value={column.name}+ autoComplete="off"disabled={disabled}size="xs"className={INLINE_EDIT_INPUT_CLASS}@@ -385,6 +386,7 @@ export function TableColumnEditor({<TableCell className={cellClass}><Inputvalue={column.comment}+ autoComplete="off"disabled={disabled}size="xs"className={INLINE_EDIT_INPUT_CLASS}diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/inline-input.test.tsx b/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/inline-input.test.tsxnew file mode 100644index 0000000000..ec04dafd6c--- /dev/null+++ b/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/inline-input.test.tsx@@ -0,0 +1,70 @@+import { create } from "@bufbuild/protobuf";+import { render, screen } from "@testing-library/react";+import { describe, expect, test, vi } from "vitest";+import { Engine } from "@/types/proto-es/v1/common_pb";+import { ColumnMetadataSchema } from "@/types/proto-es/v1/database_service_pb";+import { DataTypeCell } from "./DataTypeCell";+import { DefaultValueCell } from "./DefaultValueCell";++vi.mock("react-i18next", () => ({+ initReactI18next: {+ type: "3rdParty",+ init: vi.fn(),+ },+ useTranslation: () => ({ t: (key: string) => key }),+}));++vi.mock("@/utils", async (importOriginal) => {+ const actual = await importOriginal<typeof import("@/utils")>();+ return {+ ...actual,+ getDataTypeSuggestionList: () => ["int", "varchar"],+ };+});++const column = (+ overrides: {+ name?: string;+ type?: string;+ hasDefault?: boolean;+ default?: string;+ } = {}+) =>+ create(ColumnMetadataSchema, {+ name: "id",+ type: "int",+ ...overrides,+ });++describe("SchemaEditorLite inline inputs", () => {+ test("disables browser suggestions for the column type input", () => {+ render(+ <DataTypeCell+ column={column()}+ engine={Engine.POSTGRES}+ readonly={false}+ onUpdateValue={vi.fn()}+ />+ );++ expect(screen.getByDisplayValue("int")).toHaveAttribute(+ "autocomplete",+ "off"+ );+ });++ test("disables browser suggestions for the default value input", () => {+ render(+ <DefaultValueCell+ column={column({ hasDefault: true, default: "0" })}+ disabled={false}+ onUpdate={vi.fn()}+ />+ );++ expect(screen.getByDisplayValue("0")).toHaveAttribute(+ "autocomplete",+ "off"+ );+ });+});diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableList/TableList.tsx b/frontend/src/react/components/SchemaEditorLite/Panels/TableList/TableList.tsxindex 73e2abdbd4..f25815c22d 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/TableList/TableList.tsx+++ b/frontend/src/react/components/SchemaEditorLite/Panels/TableList/TableList.tsx@@ -217,6 +217,7 @@ export function TableList({) : (<Inputvalue={table.comment}+ autoComplete="off"disabled={status === "dropped"}size="xs"className={INLINE_EDIT_INPUT_CLASS}diff --git a/frontend/src/react/components/ui/search-input.tsx b/frontend/src/react/components/ui/search-input.tsxindex 0e8d24d5d5..4633023942 100644--- a/frontend/src/react/components/ui/search-input.tsx+++ b/frontend/src/react/components/ui/search-input.tsx@@ -21,6 +21,7 @@ export const SearchInput = forwardRef<HTMLInputElement, SearchInputProps>(<Search className="absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-control-placeholder pointer-events-none" /><Inputref={ref}+ autoComplete="off"className={cn("pl-8", className)}placeholder={placeholder ?? t("common.type-to-search")}{...props}