Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(desktop-app): r1-l1 narrow regex capture before returning rule body
Diego Zacariascde478b23ee0
diff --git a/desktop-app/ui/src/__tests__/chatDrawerNoHorizontalOverflow.test.ts b/desktop-app/ui/src/__tests__/chatDrawerNoHorizontalOverflow.test.tsindex 43453dc44..b9ebd05db 100644--- a/desktop-app/ui/src/__tests__/chatDrawerNoHorizontalOverflow.test.ts+++ b/desktop-app/ui/src/__tests__/chatDrawerNoHorizontalOverflow.test.ts@@ -27,8 +27,9 @@ function ruleBody(selector: string): string {const normalized = selector.replace(/\s+/g, ' ').trim()const escaped = normalized.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')const match = styles.match(new RegExp(`(?:^|[};/]) ?${escaped} ?{([^}]*)}`))- if (!match) throw new Error(`rule not found: ${selector}`)- return match[1]+ const body = match?.[1]+ if (body === undefined) throw new Error(`rule not found: ${selector}`)+ return body}describe('chat drawer — no horizontal overflow', () => {