Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore(deps): bump omni to c42b07874f (#21887)

rebelice0afc56a40ec5
diff --git a/backend/plugin/advisor/oceanbase/test/index_type_no_blob.yaml b/backend/plugin/advisor/oceanbase/test/index_type_no_blob.yaml
index c7fd537402..b05022bcf0 100644
--- a/backend/plugin/advisor/oceanbase/test/index_type_no_blob.yaml
+++ b/backend/plugin/advisor/oceanbase/test/index_type_no_blob.yaml
@@ -32,7 +32,7 @@
INDEX idx_user_name(name),
UNIQUE KEY uk_user_id_name(id, name)
) ENGINE = INNODB COMMENT 'comment';
-- statement: CREATE TABLE t(b BLOB, PRIMARY KEY(b(10)));
+- statement: CREATE TABLE t(b BLOB, PRIMARY KEY(b));
want:
- status: 2
code: 804
@@ -42,7 +42,7 @@
line: 1
column: 0
endposition: null
-- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id INT, PRIMARY KEY(b(1), mb(2), lb(3), id));
+- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id INT, PRIMARY KEY(b, mb, lb, id));
want:
- status: 2
code: 804
@@ -123,7 +123,7 @@
- statement: CREATE TABLE t(id INT, PRIMARY KEY(id))
- statement: |-
CREATE TABLE t(a int);
- ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN id INT, ADD PRIMARY KEY(b(1), id);
+ ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN id INT, ADD PRIMARY KEY(b, id);
want:
- status: 2
code: 804
diff --git a/backend/runner/reviewrun/rule_executor_test.go b/backend/runner/reviewrun/rule_executor_test.go
index 7f1f9ec530..b74df46bf0 100644
--- a/backend/runner/reviewrun/rule_executor_test.go
+++ b/backend/runner/reviewrun/rule_executor_test.go
@@ -251,6 +251,6 @@ func TestRuleExecutorPassesTheSyncedDefaultSchema(t *testing.T) {
return messages
}
- require.Equal(t, []string{"an object named t already exists"}, review("synced", "dbo"))
+ require.Equal(t, []string{"Table `t` already exists."}, review("synced", "dbo"))
require.Empty(t, review("unsynced", ""))
}
diff --git a/frontend/src/components/MarkdownEditor/MarkdownEditor.test.tsx b/frontend/src/components/MarkdownEditor/MarkdownEditor.test.tsx
index d2ee28b65e..022fa21a05 100644
--- a/frontend/src/components/MarkdownEditor/MarkdownEditor.test.tsx
+++ b/frontend/src/components/MarkdownEditor/MarkdownEditor.test.tsx
@@ -3,7 +3,7 @@ import type { ReactElement } from "react";
import { act } from "react";
import { createRoot } from "react-dom/client";
import { describe, expect, test, vi } from "vitest";
-import { MarkdownEditor } from "./MarkdownEditor";
+import { MarkdownEditor, markdownSummary } from "./MarkdownEditor";
// Vitest stubs CSS imports; load the actual stylesheet from the frontend test root.
const markdownStyles = readFileSync("src/assets/css/github-markdown-style.css", "utf8");
@@ -271,3 +271,18 @@ test("focuses the input when autofocus is requested", () => {
container.remove();
}
});
+
+describe("markdownSummary", () => {
+ test("reads the first line as plain text", () => {
+ expect(markdownSummary("Table `t` already exists.\n\nThe body.")).toBe(
+ "Table t already exists."
+ );
+ expect(
+ markdownSummary(
+ "**Bold**, \\_escaped\\_, [a link](https://example.com), &"
+ )
+ ).toBe("Bold, _escaped_, a link, &");
+ expect(markdownSummary("## A heading\nbody")).toBe("A heading");
+ expect(markdownSummary("<b>raw</b> HTML")).toBe("<b>raw</b> HTML");
+ });
+});
diff --git a/frontend/src/components/MarkdownEditor/MarkdownEditor.tsx b/frontend/src/components/MarkdownEditor/MarkdownEditor.tsx
index 2df9b10a55..d4a2426541 100644
--- a/frontend/src/components/MarkdownEditor/MarkdownEditor.tsx
+++ b/frontend/src/components/MarkdownEditor/MarkdownEditor.tsx
@@ -57,6 +57,15 @@ untrustedMarkdown.renderer.rules.image = (tokens, idx) => {
return `<a href="${escapeHtml(src)}">${label}</a>`;
};
+// A Markdown text's first line as plain text, for a one-line summary: markup
+// goes, and code spans, escapes, and entities keep their content. A review
+// finding's message is Markdown, its first line the summary.
+export function markdownSummary(text: string): string {
+ const line = (text.split("\n", 1)[0] ?? "").replace(/^#+\s*/, "");
+ const [inline] = untrustedMarkdown.parseInline(line, {});
+ return labelText(inline?.children ?? []).trim();
+}
+
// An image label as plain text. Unlike renderInlineAsText, it keeps code
// spans and the decoded entities and escapes that a label's tokens carry.
function labelText(tokens: Token[]): string {
diff --git a/frontend/src/components/MarkdownEditor/index.ts b/frontend/src/components/MarkdownEditor/index.ts
index fc00fe1d88..085702faf5 100644
--- a/frontend/src/components/MarkdownEditor/index.ts
+++ b/frontend/src/components/MarkdownEditor/index.ts
@@ -1 +1 @@
-export { MarkdownEditor } from "./MarkdownEditor";
+export { MarkdownEditor, markdownSummary } from "./MarkdownEditor";
diff --git a/frontend/src/routes/project/plan-detail/components/threads/CommentThreadCard.test.tsx b/frontend/src/routes/project/plan-detail/components/threads/CommentThreadCard.test.tsx
index 7fb14b3b66..e6bc7a8930 100644
--- a/frontend/src/routes/project/plan-detail/components/threads/CommentThreadCard.test.tsx
+++ b/frontend/src/routes/project/plan-detail/components/threads/CommentThreadCard.test.tsx
@@ -44,7 +44,10 @@ vi.mock("@/components/issue-activity/IssueCommentActivity", () => ({
canEditIssueComment: () => true,
}));
-vi.mock("@/components/MarkdownEditor", () => ({
+vi.mock("@/components/MarkdownEditor", async (importOriginal) => ({
+ markdownSummary: (
+ await importOriginal<typeof import("@/components/MarkdownEditor")>()
+ ).markdownSummary,
MarkdownEditor: ({
content,
autoFocus,
diff --git a/frontend/src/routes/project/plan-detail/components/threads/CommentThreadCard.tsx b/frontend/src/routes/project/plan-detail/components/threads/CommentThreadCard.tsx
index d6a5f30c55..9ee9724b20 100644
--- a/frontend/src/routes/project/plan-detail/components/threads/CommentThreadCard.tsx
+++ b/frontend/src/routes/project/plan-detail/components/threads/CommentThreadCard.tsx
@@ -18,7 +18,7 @@ import {
} from "react";
import { useTranslation } from "react-i18next";
import { HumanizeTs } from "@/components/HumanizeTs";
-import { MarkdownEditor } from "@/components/MarkdownEditor";
+import { MarkdownEditor, markdownSummary } from "@/components/MarkdownEditor";
import { MonacoViewZoneRevealContext } from "@/components/monaco/MonacoViewZone";
import { UserAvatar } from "@/components/UserAvatar";
import { Button } from "@/components/ui/button";
@@ -406,7 +406,7 @@ function ThreadSummary({
const { t } = useTranslation();
const author = useCommentAuthor(thread.root);
const review = thread.root.reviewMetadata;
- const summary = thread.root.comment.split("\n")[0] ?? "";
+ const summary = markdownSummary(thread.root.comment);
return (
<Button
appearance="secondary"
diff --git a/frontend/src/routes/project/plan-detail/components/threads/ThreadStack.tsx b/frontend/src/routes/project/plan-detail/components/threads/ThreadStack.tsx
index 1d0cb21c07..f4314f243a 100644
--- a/frontend/src/routes/project/plan-detail/components/threads/ThreadStack.tsx
+++ b/frontend/src/routes/project/plan-detail/components/threads/ThreadStack.tsx
@@ -2,6 +2,7 @@ import { ChevronDown, MessageSquare } from "lucide-react";
import { type ReactNode, type Ref, type SetStateAction, useState } from "react";
import { useTranslation } from "react-i18next";
import { HumanizeTs } from "@/components/HumanizeTs";
+import { markdownSummary } from "@/components/MarkdownEditor";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import { getTimeForPbTimestampProtoEs } from "@/types";
@@ -174,7 +175,7 @@ function CollapsedThreadRow({
const { t } = useTranslation();
const author = useCommentAuthor(comment);
const review = comment.reviewMetadata;
- const firstLine = comment.comment.split("\n")[0] ?? "";
+ const firstLine = markdownSummary(comment.comment);
return (
<Button
appearance="secondary"
diff --git a/go.mod b/go.mod
index 24ade7d186..4ba2dcd1df 100644
--- a/go.mod
+++ b/go.mod
@@ -36,7 +36,7 @@ require (
github.com/bmatcuk/doublestar/v4 v4.10.4
github.com/bytebase/gomongo v0.0.0-20260730033313-67ba6e249735
github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0
- github.com/bytebase/omni v0.0.0-20261102094319-61f070707dc7
+ github.com/bytebase/omni v0.0.0-20261104062238-c42b07874f14
github.com/caarlos0/env/v11 v11.4.1
github.com/cenkalti/backoff/v7 v7.0.3
github.com/cockroachdb/cockroach-go/v2 v2.4.3
diff --git a/go.sum b/go.sum
index 76a00cfa00..9c31d1eb4f 100644
--- a/go.sum
+++ b/go.sum
@@ -259,8 +259,8 @@ github.com/bytebase/gomongo v0.0.0-20260730033313-67ba6e249735 h1:v8y6mXeHmYVsdM
github.com/bytebase/gomongo v0.0.0-20260730033313-67ba6e249735/go.mod h1:vTHjcvfn8Pmf65WjnV1ytTCYyC7xNhFjrniv4YWvtA8=
github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0 h1:bJ8NSf2K+pccl5m/wuu97fiYjDwpJH6IzURAq/3XA2U=
github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0/go.mod h1:BEWMfiZtqshdmulKJcIsWb45MUaEvDO4CROcgi8dfFg=
-github.com/bytebase/omni v0.0.0-20261102094319-61f070707dc7 h1:3rwQ9dpUCGv19YJJfxUivF9ZwiFFa0QCMLBr/YRP+Jc=
-github.com/bytebase/omni v0.0.0-20261102094319-61f070707dc7/go.mod h1:9XZE1hqtvr09Oc+DdLu1/yCb8MDcoy/EPdA4AONDHlE=
+github.com/bytebase/omni v0.0.0-20261104062238-c42b07874f14 h1:ebjGmuKMemJL2tSmEV6+ZTNQ+KdXf2q+6+y+KHB/TQo=
+github.com/bytebase/omni v0.0.0-20261104062238-c42b07874f14/go.mod h1:9XZE1hqtvr09Oc+DdLu1/yCb8MDcoy/EPdA4AONDHlE=
github.com/bytebase/pgx/v5 v5.0.0-20261103142809-663c807705c4 h1:CVgGkwGGV1wLd9Fju0XcY1cac2sf7IKOLA80bWGUwG8=
github.com/bytebase/pgx/v5 v5.0.0-20261103142809-663c807705c4/go.mod h1:u2Fi6no03HCSBYE+ZVdLxbwdu3xyi2vU+K/YNJioSds=
github.com/bytebase/tidb v0.0.0-20251104040057-d29df9dd1b3b h1:FIMLXCmledlGHw7NzIT2BGVflB2ZNamudc+QtTNITH0=