<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima/frontend/src/components, branch makima/contract-lifecycle-cleanup</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=makima%2Fcontract-lifecycle-cleanup</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=makima%2Fcontract-lifecycle-cleanup'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-01-20T16:39:04+00:00</updated>
<entry>
<title>Fix: prevent supervisor auto-start for completed contracts</title>
<updated>2026-01-20T16:39:04+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-20T16:39:04+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=94e14814573c8f1ba31f940c0479334a16b32f39'/>
<id>urn:sha1:94e14814573c8f1ba31f940c0479334a16b32f39</id>
<content type='text'>
When viewing a completed contract, the supervisor was auto-starting
on component mount. This would resurrect completed contracts and
cause them to continue running.

Changes:
- Add contract.status !== 'completed' check to the auto-start condition
- Add contract.status to the useEffect dependency array

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add right-click context menu for contracts on contracts and board pages (#8)</title>
<updated>2026-01-19T17:55:22+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-19T17:55:22+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=52d121269195f0e799d0ab4241e4facc3c7c0596'/>
<id>urn:sha1:52d121269195f0e799d0ab4241e4facc3c7c0596</id>
<content type='text'>
Implement a reusable ContractContextMenu component that provides:
- Mark as Complete/Active/Archive status actions (conditionally shown)
- Go to Supervisor Task link (when supervisor exists)
- Delete action with confirmation

Integrate context menu into:
- ContractList.tsx on the contracts page
- WorkflowBoard on the workflow/board page via PhaseColumn and WorkflowContractCard

Features match ElementContextMenu patterns:
- Fixed positioning with z-50
- Click outside and Escape key close handlers
- Viewport overflow prevention
- Dark theme colors (#0a1628, #0d1b2d, #75aafc, #9bc3ff)

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Remove 'task' type contract</title>
<updated>2026-01-19T17:40:25+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-19T17:40:25+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=164941cbd591b46f69a034bb9b86521fd7700ddb'/>
<id>urn:sha1:164941cbd591b46f69a034bb9b86521fd7700ddb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use formatting in question in output</title>
<updated>2026-01-19T00:14:29+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-18T23:42:27+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=b64eddc8c2f250cdcbacae18cce107bf4c86f9f4'/>
<id>urn:sha1:b64eddc8c2f250cdcbacae18cce107bf4c86f9f4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Clean up mesh page (#6)</title>
<updated>2026-01-18T19:55:37+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-18T19:55:37+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=b3eb58d50eea5b235a1c33d5c8787dc81064c46b'/>
<id>urn:sha1:b3eb58d50eea5b235a1c33d5c8787dc81064c46b</id>
<content type='text'>
* Filter mesh page task list to show only supervisor tasks

- Add `isSupervisor` filter to rootTasks filter in TaskList component
- Only supervisor tasks will appear in the mesh page task list
- Regular tasks are now hidden from the main view
- Update empty state messages to reflect supervisor-only filtering
- When clicking a supervisor task, its detail still shows orchestrated tasks

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* Add supervisor task button to workflow board contract cards

- Add supervisorTaskId field to ContractSummary type in backend and frontend
- Update SQL queries in repository.rs to include supervisor_task_id
- Add navigation button (▶) to WorkflowContractCard that links to /mesh/{supervisorTaskId}
- Button only shows when contract has a supervisorTaskId
- Button has tooltip "Open Supervisor Task" and stops propagation to avoid triggering card click

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* Add full task page navigation button to TaskTree rows

Add a hover-visible arrow icon (↗) to each task row in the TaskTree
component that links to the full task page (/tasks/{taskId}). The button:
- Appears on hover using opacity transition
- Stops event propagation to avoid triggering parent onSelect
- Matches existing hover styling patterns with the #75aafc color scheme

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

---------

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Add pushed heartbeats and multi-question select</title>
<updated>2026-01-18T18:55:04+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-18T18:55:04+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=9dbc2c3199047609a9f8496fec07ecdb10aee73d'/>
<id>urn:sha1:9dbc2c3199047609a9f8496fec07ecdb10aee73d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve Mesh Tab: Organize by contract with status filter (#5)</title>
<updated>2026-01-18T18:02:08+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-18T18:02:08+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=e0da93a20a965125ba4cbb46e3e0e179f06c2a08'/>
<id>urn:sha1:e0da93a20a965125ba4cbb46e3e0e179f06c2a08</id>
<content type='text'>
* Add status filter toggle to Mesh Tab TaskList component

Add a filter toggle at the top of the TaskList that allows filtering by
contract status (All, Active, Completed, Archive) with Active as the default.

Changes:
- Backend: Add contract_status field to TaskSummary struct in models.rs
- Backend: Update all SQL queries returning TaskSummary to include
  c.status as contract_status from the contracts table join
- Frontend: Add contractStatus to TaskSummary TypeScript type
- Frontend: Add useState for statusFilter with 'active' as default
- Frontend: Add filter button group in header area next to '+ New Task'
- Frontend: Update groupedTasks useMemo to filter based on contract status
- Frontend: Update empty state message to reflect current filter

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* Task completion checkpoint

* feat(mesh): show all contract tasks for supervisor tasks

When viewing a supervisor task (task.isSupervisor === true), the
TaskDetail component now shows all tasks in the contract instead
of showing the subtasks tree.

Changes:
- Add contractTasks prop to TaskDetailProps for passing contract tasks
- Add displayTasks computed value that uses contractTasks for supervisors
- Change section header from "Subtasks" to "Contract Tasks" for supervisors
- Hide the "+ Add Subtask" button for supervisor tasks
- Update empty state message for supervisors
- Fetch contract tasks in mesh.tsx when viewing a supervisor task
- Filter out the supervisor itself from the contract tasks list

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* Task completion checkpoint

* Task completion checkpoint

---------

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Fix contract task type creation</title>
<updated>2026-01-18T17:37:52+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-18T17:37:52+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=5b1f886db9b92722c1b4f1524f09456febc824e0'/>
<id>urn:sha1:5b1f886db9b92722c1b4f1524f09456febc824e0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add phase guard toggle for contract phase confirmation (#2)</title>
<updated>2026-01-17T19:47:35+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-17T19:47:35+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=900472091e4d9b4000508b0d266d786ef41107bd'/>
<id>urn:sha1:900472091e4d9b4000508b0d266d786ef41107bd</id>
<content type='text'>
* Add phase_guard field to Contract model and database

This adds a new boolean field to control whether the supervisor should
wait for user confirmation before progressing to the next phase. When
enabled, users can review and potentially amend phase outputs (like
plans, requirements docs) before the contract continues.

Changes:
- Add migration for phase_guard column (defaults to false)
- Add phase_guard to Contract, CreateContractRequest, and
  UpdateContractRequest structs
- Update create_contract_for_owner and update_contract_for_owner
  repository functions to handle phase_guard
- Update all CreateContractRequest instantiations with phase_guard field

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* feat: Add phase_guard for contract phase transitions

Implement phase_guard logic in the advance_phase tool. When a contract
has phase_guard enabled, the phase transition now:

1. Asks for user confirmation before advancing
2. Allows users to request changes to phase deliverables
3. Passes feedback to the task without advancing if changes requested

Changes:
- Add phase_guard field to Contract model and CreateContractRequest
- Add PhaseTransitionRequest, PhaseFileInfo, PhaseTaskInfo structs
- Update ChangePhaseRequest with confirmed and feedback fields
- Update ContractToolRequest::AdvancePhase with confirmed/feedback
- Modify advance_phase handling in contract_chat.rs with phase_guard logic
- Update change_phase endpoint in contracts.rs with phase_guard support
- Add database migration for phase_guard column

When phase_guard=false: Phase advances immediately (current behavior)
When phase_guard=true: Returns pending_confirmation status with deliverables
If user provides feedback: Returns feedback to task, doesn't advance

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* feat(frontend): Add UI for phase transition confirmation requests

When phase_guard is enabled and a supervisor tries to advance the contract
phase, users now see a confirmation modal with:
- Current and proposed next phase visualization
- Phase deliverables checklist (if available)
- Summary of the phase work
- Options to "Approve &amp; Advance" or "Request Changes" with feedback

Components added:
- PhaseConfirmationModal: Full modal dialog for phase confirmations
- PhaseConfirmationInline: Inline variant for task output view
- PhaseConfirmationNotification: Global notification wrapper
- PhaseConfirmationToast: Alternative toast-style notification

Integration:
- Added phase_confirmation message type to TaskOutput renderer
- Extended PendingQuestion API type with phase confirmation data
- Integrated notification into main app layout

The UI uses the existing supervisor question infrastructure (polling via
/api/v1/mesh/questions) and responds with APPROVE or CHANGES_REQUESTED
prefixed feedback.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

* feat(frontend): Add Phase Guard toggle to AutopilotPanel

Added the phase_guard toggle to the AutopilotPanel component, which allows
users to enable/disable requiring confirmation before phase transitions.

Changes:
- Added phaseGuard and autonomousLoop fields to Contract interface in api.ts
- Added phaseGuard field to UpdateContractRequest in api.ts
- Added Phase Guard toggle UI in AutopilotPanel with similar styling to master
- Toggle shows an 'active' badge when enabled
- Connected toggle to contract update API

The toggle appears below the autopilot control buttons and allows users to
require confirmation before the supervisor advances to the next phase.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

---------

Co-authored-by: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;</content>
</entry>
<entry>
<title>Add autopilot panel and retry system</title>
<updated>2026-01-17T05:38:07+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-16T19:50:27+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=75d9644d44ba998a32ed14c072e883a75145ab72'/>
<id>urn:sha1:75d9644d44ba998a32ed14c072e883a75145ab72</id>
<content type='text'>
</content>
</entry>
</feed>
