From cc4892d857b4a923a2fb81d3c0135d9cc4127142 Mon Sep 17 00:00:00 2001 From: "open-swe-dev-andrinoid[bot]" Date: Tue, 20 Jan 2026 18:45:14 +0000 Subject: [PATCH 1/4] Apply patch [skip ci] --- fix_code.py | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 fix_code.py diff --git a/fix_code.py b/fix_code.py new file mode 100644 index 0000000..1715598 --- /dev/null +++ b/fix_code.py @@ -0,0 +1,94 @@ +import sys + +def modify_vite(): + try: + with open('vite.config.ts', 'r') as f: + lines = f.readlines() + + new_lines = [] + public_dir_added = False + for line in lines: + new_lines.append(line) + if 'export default defineConfig({' in line and not public_dir_added: + # Check if publicDir is already there to avoid duplicates + if not any('publicDir' in l for l in lines): + new_lines.append(' publicDir: "static",\n') + public_dir_added = True + + with open('vite.config.ts', 'w') as f: + f.writelines(new_lines) + print("Modified vite.config.ts") + except Exception as e: + print(f"Error modifying vite.config.ts: {e}") + +def modify_messages(): + try: + with open('routes/tenant/messages/index.tsx', 'r') as f: + lines = f.readlines() + + # Swap lines 1 and 2 (0-indexed) -> lines 2 and 3 (1-indexed) + # Line 2 is index 1, Line 3 is index 2 + if len(lines) > 2 and 'import { define }' in lines[1] and 'import { page }' in lines[2]: + lines[1], lines[2] = lines[2], lines[1] + + with open('routes/tenant/messages/index.tsx', 'w') as f: + f.writelines(lines) + print("Modified routes/tenant/messages/index.tsx") + else: + print("Skipped routes/tenant/messages/index.tsx (conditions not met)") + except Exception as e: + print(f"Error modifying routes/tenant/messages/index.tsx: {e}") + +def modify_settings(): + try: + with open('routes/tenant/settings/index.tsx', 'r') as f: + lines = f.readlines() + + # Find the lines to replace + for i, line in enumerate(lines): + if 'export default define.page(' in line: + # Check next line + if i+1 < len(lines) and 'function TenantSettingsPage' in lines[i+1]: + lines[i] = 'export default define.page(function TenantSettingsPage({\n' + lines[i+1] = ' data,\n}: {\n data: SettingsPageData;\n}) {\n' + break + + with open('routes/tenant/settings/index.tsx', 'w') as f: + f.writelines(lines) + print("Modified routes/tenant/settings/index.tsx") + except Exception as e: + print(f"Error modifying routes/tenant/settings/index.tsx: {e}") + +def modify_service(): + try: + with open('services/messageService.ts', 'r') as f: + lines = f.readlines() + + # Find lines for schema and interfaces imports + schema_idx = -1 + interfaces_idx = -1 + + for i, line in enumerate(lines): + if 'from "../db/schema.ts"' in line: + schema_idx = i + if 'from "../db/interfaces.ts"' in line: + interfaces_idx = i + + if schema_idx != -1 and interfaces_idx != -1 and schema_idx < interfaces_idx: + # Swap them + lines[schema_idx], lines[interfaces_idx] = lines[interfaces_idx], lines[schema_idx] + + with open('services/messageService.ts', 'w') as f: + f.writelines(lines) + print("Modified services/messageService.ts") + else: + print("Skipped services/messageService.ts (conditions not met or already correct)") + + except Exception as e: + print(f"Error modifying services/messageService.ts: {e}") + +if __name__ == '__main__': + modify_vite() + modify_messages() + modify_settings() + modify_service() From 369785fa9ab0389c547a1d726533b9dd8442b90d Mon Sep 17 00:00:00 2001 From: "open-swe-dev-andrinoid[bot]" Date: Tue, 20 Jan 2026 18:45:27 +0000 Subject: [PATCH 2/4] Apply patch [skip ci] --- routes/tenant/messages/index.tsx | 2 +- routes/tenant/settings/index.tsx | 7 +++++-- services/messageService.ts | 2 +- vite.config.ts | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/routes/tenant/messages/index.tsx b/routes/tenant/messages/index.tsx index 01f147f..2c51d7b 100644 --- a/routes/tenant/messages/index.tsx +++ b/routes/tenant/messages/index.tsx @@ -1,6 +1,6 @@ // routes/tenant/messages/index.tsx -import { define } from "../../../utils.ts"; import { page } from "fresh"; +import { define } from "../../../utils.ts"; import { SessionCookie } from "../../auth/callback.ts"; import { DashboardMessage, diff --git a/routes/tenant/settings/index.tsx b/routes/tenant/settings/index.tsx index 4d9464e..f0cd4a3 100644 --- a/routes/tenant/settings/index.tsx +++ b/routes/tenant/settings/index.tsx @@ -56,8 +56,11 @@ export const handler = define.handlers({ }, }); -export default define.page( - function TenantSettingsPage({ data }: { data: SettingsPageData }) { +export default define.page(function TenantSettingsPage({ + data, +}: { + data: SettingsPageData; +}) { const { user, error } = data as SettingsPageData; if (error) { diff --git a/services/messageService.ts b/services/messageService.ts index d64b183..fccadef 100644 --- a/services/messageService.ts +++ b/services/messageService.ts @@ -3,8 +3,8 @@ import { and, asc, desc, eq, ilike, inArray, or, sql } from "drizzle-orm"; import { db } from "../db/db.ts"; -import { leases, messages, properties, users } from "../db/schema.ts"; import { Message } from "../db/interfaces.ts"; +import { leases, messages, properties, users } from "../db/schema.ts"; import { addE2EMessage, deleteE2EMessage, diff --git a/vite.config.ts b/vite.config.ts index 342ad16..e1dcb43 100755 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,6 +4,7 @@ import { fresh } from "@fresh/plugin-vite"; import tailwindcss from "@tailwindcss/vite"; export default defineConfig({ + publicDir: "static", plugins: [fresh(), tailwindcss()], server: { From a4c36695682b43b225df56735353bdecfc15d9a5 Mon Sep 17 00:00:00 2001 From: "open-swe-dev-andrinoid[bot]" Date: Tue, 20 Jan 2026 18:48:35 +0000 Subject: [PATCH 3/4] Apply patch [skip ci] --- fix_code.py | 94 ----------------------------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 fix_code.py diff --git a/fix_code.py b/fix_code.py deleted file mode 100644 index 1715598..0000000 --- a/fix_code.py +++ /dev/null @@ -1,94 +0,0 @@ -import sys - -def modify_vite(): - try: - with open('vite.config.ts', 'r') as f: - lines = f.readlines() - - new_lines = [] - public_dir_added = False - for line in lines: - new_lines.append(line) - if 'export default defineConfig({' in line and not public_dir_added: - # Check if publicDir is already there to avoid duplicates - if not any('publicDir' in l for l in lines): - new_lines.append(' publicDir: "static",\n') - public_dir_added = True - - with open('vite.config.ts', 'w') as f: - f.writelines(new_lines) - print("Modified vite.config.ts") - except Exception as e: - print(f"Error modifying vite.config.ts: {e}") - -def modify_messages(): - try: - with open('routes/tenant/messages/index.tsx', 'r') as f: - lines = f.readlines() - - # Swap lines 1 and 2 (0-indexed) -> lines 2 and 3 (1-indexed) - # Line 2 is index 1, Line 3 is index 2 - if len(lines) > 2 and 'import { define }' in lines[1] and 'import { page }' in lines[2]: - lines[1], lines[2] = lines[2], lines[1] - - with open('routes/tenant/messages/index.tsx', 'w') as f: - f.writelines(lines) - print("Modified routes/tenant/messages/index.tsx") - else: - print("Skipped routes/tenant/messages/index.tsx (conditions not met)") - except Exception as e: - print(f"Error modifying routes/tenant/messages/index.tsx: {e}") - -def modify_settings(): - try: - with open('routes/tenant/settings/index.tsx', 'r') as f: - lines = f.readlines() - - # Find the lines to replace - for i, line in enumerate(lines): - if 'export default define.page(' in line: - # Check next line - if i+1 < len(lines) and 'function TenantSettingsPage' in lines[i+1]: - lines[i] = 'export default define.page(function TenantSettingsPage({\n' - lines[i+1] = ' data,\n}: {\n data: SettingsPageData;\n}) {\n' - break - - with open('routes/tenant/settings/index.tsx', 'w') as f: - f.writelines(lines) - print("Modified routes/tenant/settings/index.tsx") - except Exception as e: - print(f"Error modifying routes/tenant/settings/index.tsx: {e}") - -def modify_service(): - try: - with open('services/messageService.ts', 'r') as f: - lines = f.readlines() - - # Find lines for schema and interfaces imports - schema_idx = -1 - interfaces_idx = -1 - - for i, line in enumerate(lines): - if 'from "../db/schema.ts"' in line: - schema_idx = i - if 'from "../db/interfaces.ts"' in line: - interfaces_idx = i - - if schema_idx != -1 and interfaces_idx != -1 and schema_idx < interfaces_idx: - # Swap them - lines[schema_idx], lines[interfaces_idx] = lines[interfaces_idx], lines[schema_idx] - - with open('services/messageService.ts', 'w') as f: - f.writelines(lines) - print("Modified services/messageService.ts") - else: - print("Skipped services/messageService.ts (conditions not met or already correct)") - - except Exception as e: - print(f"Error modifying services/messageService.ts: {e}") - -if __name__ == '__main__': - modify_vite() - modify_messages() - modify_settings() - modify_service() From 7530f18ac6d092cadf8028bb444b8c08285800d3 Mon Sep 17 00:00:00 2001 From: "open-swe-dev-andrinoid[bot]" Date: Tue, 20 Jan 2026 18:49:11 +0000 Subject: [PATCH 4/4] Empty commit to trigger CI