diff options
| author | soryu <soryu@soryu.co> | 2026-02-16 17:59:38 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-16 17:59:38 +0000 |
| commit | b3de779d87450033f1e0361144c621a1d5f1dbf8 (patch) | |
| tree | 7cb84c2f953bf86f1dd3ec8ff305d70810ac55de /makima/src/db/models.rs | |
| parent | 7d2079d7c13804766405af8044574bfc93a86897 (diff) | |
| download | soryu-b3de779d87450033f1e0361144c621a1d5f1dbf8.tar.gz soryu-b3de779d87450033f1e0361144c621a1d5f1dbf8.zip | |
Fix contracts page overflow, remove contract link from orders, add directive name (#65)
* feat: soryu-co/soryu - makima: Add frontend pick-up-orders button and API integration
* WIP: heartbeat checkpoint
* feat: soryu-co/soryu - makima: Remove contract link from orders and add directive name to order metadata (frontend)
* fix: contracts page overflow - use contained scrolling layout
Changed the contracts page to use contained scrolling matching the
orders/directives pages, preventing the page from growing beyond
viewport height.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve completion_task_id FK violation and duplicate button
The completion_task_id column has an FK to tasks(id), but
claim_directive_for_completion was being called with a placeholder UUID
that did not exist in the tasks table, causing FK constraint violations.
Fix: Create the task FIRST via create_task_for_owner, then use the real
task.id when calling claim_directive_for_completion. Applied in all three
locations: phase_completion Part 1 (idle directives), Part 3 (verification
tasks), and trigger_completion_task (manual PR creation).
Also removes a duplicate "Pick Up Orders" button in DirectiveDetail.tsx.
* fix: restore Order type changes lost during rebase conflict resolution
Re-apply changes from the orders-refactor commit that were dropped when
resolving rebase conflicts with --ours:
- Replace contractId with directiveName in Order interface
- Make directiveId required in CreateOrderRequest
- Remove contractId from UpdateOrderRequest
- Change listOrders parameter from contractId to search
- Remove linkOrderToContract function
- Simplify convertOrderToStep to single argument
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'makima/src/db/models.rs')
| -rw-r--r-- | makima/src/db/models.rs | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/makima/src/db/models.rs b/makima/src/db/models.rs index bfed942..2951159 100644 --- a/makima/src/db/models.rs +++ b/makima/src/db/models.rs @@ -2880,8 +2880,8 @@ pub struct UpdateDirectiveStepRequest { // ============================================================================= /// An order — a card-based work item (feature, bug, spike, chore, improvement) -/// similar to GitHub Issues or Linear cards. Orders can be linked to directives -/// or contracts for execution. +/// similar to GitHub Issues or Linear cards. Orders are linked to directives +/// for execution. #[derive(Debug, Clone, FromRow, Serialize, Deserialize, ToSchema)] #[serde(rename_all = "camelCase")] pub struct Order { @@ -2901,8 +2901,8 @@ pub struct Order { pub directive_id: Option<Uuid>, /// Linked directive step (optional) pub directive_step_id: Option<Uuid>, - /// Linked contract (optional) - pub contract_id: Option<Uuid>, + /// Denormalized directive name for searchability (auto-populated by DB trigger) + pub directive_name: Option<String>, /// Repository context pub repository_url: Option<String>, pub created_at: DateTime<Utc>, @@ -2920,8 +2920,8 @@ pub struct CreateOrderRequest { pub order_type: Option<String>, #[serde(default = "default_empty_labels")] pub labels: serde_json::Value, - pub directive_id: Option<Uuid>, - pub contract_id: Option<Uuid>, + /// Directive ID is required for new orders. + pub directive_id: Uuid, pub repository_url: Option<String>, } @@ -2942,7 +2942,6 @@ pub struct UpdateOrderRequest { pub labels: Option<serde_json::Value>, pub directive_id: Option<Uuid>, pub directive_step_id: Option<Uuid>, - pub contract_id: Option<Uuid>, pub repository_url: Option<String>, } @@ -2967,8 +2966,8 @@ pub struct OrderListQuery { pub priority: Option<String>, /// Filter by linked directive ID pub directive_id: Option<Uuid>, - /// Filter by linked contract ID - pub contract_id: Option<Uuid>, + /// Text search across title, description, and directive_name (case-insensitive) + pub search: Option<String>, } /// Request body for linking an order to a directive. @@ -2978,17 +2977,4 @@ pub struct LinkDirectiveRequest { pub directive_id: Uuid, } -/// Request body for linking an order to a contract. -#[derive(Debug, Deserialize, ToSchema)] -#[serde(rename_all = "camelCase")] -pub struct LinkContractRequest { - pub contract_id: Uuid, -} - -/// Request body for converting an order to a directive step. -#[derive(Debug, Deserialize, ToSchema)] -#[serde(rename_all = "camelCase")] -pub struct ConvertToStepRequest { - pub directive_id: Uuid, -} |
