From 3b76dff95a9c09f63b3f5ff4951cebe4e2ffc73c Mon Sep 17 00:00:00 2001
From: soryu <soryu@soryu.co>
Date: Thu, 29 Jan 2026 16:33:11 +0000
Subject: Fix new contract dialog not fitting on screen (#48)

* Add comprehensive Red Team system specification

Defines the adversarial review feature for contracts that monitors work tasks
in real-time to catch quality issues, plan deviations, and standards violations.

Key components specified:
- Contract configuration (red_team_enabled, red_team_prompt)
- Red team task lifecycle and spawning logic
- makima red-team notify CLI command for supervisor alerts
- Task output subscription for real-time monitoring
- Database schema changes (contracts, tasks, notifications table)
- API endpoints for notification and status
- System prompt template for red team behavior
- Security considerations and access control

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Task completion checkpoint

* Task completion checkpoint

* Task completion checkpoint

* Fix new contract dialog not fitting on screen

Added viewport-relative constraints to the create contract modal:
- max-height: 90vh to limit dialog height to 90% of viewport
- overflow-y: auto to enable scrolling when content overflows
- padding on the backdrop container for edge margins on small screens

This ensures the dialog is accessible on all screen sizes while
maintaining scrollability for longer content.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
---
 makima/frontend/src/routes/contracts.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'makima/frontend/src/routes/contracts.tsx')

diff --git a/makima/frontend/src/routes/contracts.tsx b/makima/frontend/src/routes/contracts.tsx
index fc76f60..8dcfe34 100644
--- a/makima/frontend/src/routes/contracts.tsx
+++ b/makima/frontend/src/routes/contracts.tsx
@@ -539,8 +539,8 @@ function ContractsPageContent() {
 
         {/* Create contract modal */}
         {isCreating && (
-          <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
-            <div className="w-full max-w-lg p-6 bg-[#0a1628] border border-[rgba(117,170,252,0.3)]">
+          <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4">
+            <div className="w-full max-w-lg max-h-[90vh] overflow-y-auto p-6 bg-[#0a1628] border border-[rgba(117,170,252,0.3)]">
               <h3 className="font-mono text-sm text-[#75aafc] uppercase mb-4">
                 Create Contract
               </h3>
-- 
cgit v1.2.3

