From 2ac9ca92a47d53bbb7de2cb915ca62c1abc9d49e Mon Sep 17 00:00:00 2001 From: Knee Cola Date: Mon, 17 Nov 2025 11:50:54 +0100 Subject: [PATCH 1/8] mcp: migrated serena to run inside a docker --- .mcp.json | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/.mcp.json b/.mcp.json index ad2686c..dbd1a2a 100644 --- a/.mcp.json +++ b/.mcp.json @@ -1,28 +1,26 @@ { "mcpServers": { "serena": { - "command": "uvx", - "args": [ - "--from", - "git+https://github.com/oraios/serena", - "serena", - "start-mcp-server", - "--enable-web-dashboard", - "false" - ] + "command": "docker", + "args": [ + "run", + "--rm", + "-i", + "--network", "host", + "-v", "./:/workspaces/projects", + "ghcr.io/oraios/serena:0.1.4", + "serena", "start-mcp-server", + "--transport", "stdio", + "--project", "/workspaces/projects", + "--enable-web-dashboard", "false" + ], + "autoApprove": { + "commands": ["*"] + } }, "context7": { "type": "http", "url": "https://mcp.context7.com/mcp" - }, - "git": { - "command": "uvx", - "args": [ - "mcp-server-git" - ], - "env": { - "MCP_GIT_ALLOW": "/home/knee-cola/web-pro/evidencija-rezija" - } } } } \ No newline at end of file From c3ca55eedfa61f4f8a9f4c1a048e587856a155d5 Mon Sep 17 00:00:00 2001 From: Knee Cola Date: Mon, 17 Nov 2025 13:12:52 +0100 Subject: [PATCH 2/8] mcp Serena: auto approving commands --- .claude/settings.local.json | 13 +++++++++++-- .mcp.json | 8 +++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index b290255..4cf079b 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,8 +1,17 @@ { + "permissions": { + "allow": [ + "mcp__serena__read_file", + "mcp__serena__search_for_pattern", + "mcp__serena__find_file", + "mcp__serena__list_dir", + "mcp__serena__think_about_collected_information" + ] + }, + "enableAllProjectMcpServers": true, "enabledMcpjsonServers": [ "serena", "context7", "git" - ], - "enableAllProjectMcpServers": true + ] } diff --git a/.mcp.json b/.mcp.json index dbd1a2a..741c7d8 100644 --- a/.mcp.json +++ b/.mcp.json @@ -15,7 +15,13 @@ "--enable-web-dashboard", "false" ], "autoApprove": { - "commands": ["*"] + "commands": [ + "search_for_pattern", + "read_file", + "find_file", + "list_dir", + "think_about_collected_information" + ] } }, "context7": { From 0ae514048715f39f830b2e45bf48d2b410bc9a91 Mon Sep 17 00:00:00 2001 From: Knee Cola Date: Mon, 17 Nov 2025 13:18:15 +0100 Subject: [PATCH 3/8] Add billedToTenant property to Bill interface with UI support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added new boolean property to track whether a bill should be paid by the tenant. Changes: - Added billedToTenant property to Bill interface in db-types.ts - Added checkbox UI control in BillEditForm for billedToTenant - Added state management and change handler for the checkbox - Added i18n translations (EN: "Billed to tenant", HR: "Plaća podstanar") - Set default value to true for new bills Note: Server action implementation pending - property not yet persisted to database. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/lib/db-types.ts | 2 ++ app/ui/BillEditForm.tsx | 17 +++++++++++++++-- messages/en.json | 3 ++- messages/hr.json | 3 ++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/app/lib/db-types.ts b/app/lib/db-types.ts index d9d6cc8..bf2caef 100644 --- a/app/lib/db-types.ts +++ b/app/lib/db-types.ts @@ -38,6 +38,8 @@ export interface Bill { name: string; /** is the bill paid */ paid: boolean; + /** true if tenant to cover the bill */ + billedToTenant: boolean; /** payed amount amount in cents */ payedAmount?: number | null; /** attached document (optional) */ diff --git a/app/ui/BillEditForm.tsx b/app/ui/BillEditForm.tsx index 29a61a1..09581d3 100644 --- a/app/ui/BillEditForm.tsx +++ b/app/ui/BillEditForm.tsx @@ -29,7 +29,7 @@ export const BillEditForm:FC = ({ location, bill }) => { const t = useTranslations("bill-edit-form"); const locale = useLocale(); - const { _id: billID, name, paid, attachment, notes, payedAmount: initialPayedAmount, barcodeImage: initialBarcodeImage } = bill ?? { _id:undefined, name:"", paid:false, notes:"" }; + const { _id: billID, name, paid, billedToTenant, attachment, notes, payedAmount: initialPayedAmount, barcodeImage: initialBarcodeImage } = bill ?? { _id:undefined, name:"", paid:false, billedToTenant:true, notes:"" }; const { yearMonth:{year: billYear, month: billMonth}, _id: locationID } = location; @@ -40,10 +40,16 @@ export const BillEditForm:FC = ({ location, bill }) => { const [ isScanningPDF, setIsScanningPDF ] = React.useState(false); const [ state, dispatch ] = useFormState(handleAction, initialState); const [ isPaid, setIsPaid ] = React.useState(paid); + const [ isBilledToTenant, setIsBilledToTenant ] = React.useState(billedToTenant); const [ payedAmount, setPayedAmount ] = React.useState(initialPayedAmount ? `${initialPayedAmount/100}` : "" ); const [ barcodeImage, setBarcodeImage ] = React.useState(initialBarcodeImage); const [ barcodeResults, setBarcodeResults ] = React.useState | null>(null); + + const billedToTenant_handleChange = (event: React.ChangeEvent) => { + setIsBilledToTenant(event.target.checked); + } + const billPaid_handleChange = (event: React.ChangeEvent) => { setIsPaid(event.target.checked); } @@ -202,9 +208,16 @@ export const BillEditForm:FC = ({ location, bill }) => { ))} +
+ +
+ {/* Show toggle only when adding a new bill (not editing) */} {!bill && ( -
+