π OpenHands: AI-Driven Development
fix: render event trigger filter in a monospace font (#1814)
Hiep Le70e61c6c6eba
diff --git a/__tests__/components/automations/detail/configuration-section.test.tsx b/__tests__/components/automations/detail/configuration-section.test.tsxindex 92ebe12896..cd76284a31 100644--- a/__tests__/components/automations/detail/configuration-section.test.tsx+++ b/__tests__/components/automations/detail/configuration-section.test.tsx@@ -114,4 +114,21 @@ describe("ConfigurationSection", () => {expect(screen.getByText(longFilter)).toBeInTheDocument();expect(screen.getByText("SETTINGS$SKILLS_SHOW_LESS")).toBeInTheDocument();});++ it("does not render the filter field when the event trigger has no filter", () => {+ const automation: Automation = {+ ...eventAutomation,+ trigger: {+ type: "event",+ source: "github",+ on: "pull_request.opened",+ },+ };++ render(<ConfigurationSection automation={automation} />);++ expect(+ screen.queryByText("AUTOMATIONS$DETAIL$EVENT_FILTER"),+ ).not.toBeInTheDocument();+ });});diff --git a/src/components/features/automations/detail/configuration-section.tsx b/src/components/features/automations/detail/configuration-section.tsxindex 3d651e9a6c..9de89c908f 100644--- a/src/components/features/automations/detail/configuration-section.tsx+++ b/src/components/features/automations/detail/configuration-section.tsx@@ -29,7 +29,7 @@ function FilterExpression({ filter }: { filter: string }) {return (<div className="flex flex-col gap-1">- <span className="break-all">+ <span className="font-mono break-all">{isLong && !expanded? `${filter.slice(0, FILTER_TRUNCATE_LENGTH)}β¦`: filter}