Commit Graph

305 Commits

Author SHA1 Message Date
Fusion 507b71c586 fix: React crash when opening terminal sessions
The backend was returning 'tool_type_interface_type' (string) but the
frontend expected 'tool_type_interfaces' (array). This caused
undefined.includes() crash when clicking Open on terminal sessions.

Changed both list_instances and get_user_sessions to return
tool_type_interfaces as an array. Also added clone_mode and branch
to get_user_sessions response.
2026-05-23 07:36:46 +02:00
Fusion aebcf25bf4 fix: OpenCode instances fail with 'no port configured' error
For terminal-only tools like OpenCode, default_port is 0 which is falsy
in Python. The code incorrectly treated port 0 as 'not configured' and
marked the instance as error. Now we only check if tool_type exists,
and default to port 0. Terminal tools skip tunnel creation anyway.
2026-05-23 07:29:56 +02:00
Fusion ae42cac61e fix: terminal tools always showing as unhealthy
For terminal-only tools (no URL), only check container status for
overall health instead of requiring tunnel health. Terminal tools
do not have tunnels, so tunnel_status stays as 'not_applicable'
which was failing the healthy check.
2026-05-22 23:55:51 +02:00
alex e2ad7d7fb6 fix: prevent null default_port for terminal tools 2026-05-22 21:49:31 +00:00
alex 9e1334eb6d fix: remove port exposure from terminal tool (opencode) 2026-05-22 21:47:02 +00:00
alex c41993310b Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev 2026-05-22 21:33:29 +00:00
alex cb25f21c44 feat: add SSH key signing and verification UI 2026-05-22 21:33:21 +00:00
Fusion 392e85ead4 Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev 2026-05-22 23:30:54 +02:00
Fusion a4bf8afac9 fix: make full URL the default for repository cloning
When cloning a repository, the Full URL input is now shown by default
instead of the Owner/Repo Name fields.
2026-05-22 23:30:41 +02:00
alex a559470369 fix: add openssh-client to API Dockerfile for SSH git clone support 2026-05-22 21:29:28 +00:00
alex 8cab17472e Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev 2026-05-22 21:27:25 +00:00
alex e9d404b1ff feat: add SSH key payload signing and verification endpoints
- POST /ssh-keys/{id}/sign - sign payload with Ed25519 private key
- POST /ssh-keys/{id}/verify - verify signature with public key
- Returns base64-encoded signatures
2026-05-22 21:27:10 +00:00
Fusion dab6c74046 Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev 2026-05-22 23:23:36 +02:00
alex ca8b255148 fix: log detailed error messages in repository preflight and clone 2026-05-22 21:21:45 +00:00
Fusion 02a2ad6df5 feat: allow modification of built-in tool types
Remove restrictions on updating and deleting built-in tool types.
Show delete button for all tool types in Tool Workshop.
2026-05-22 23:20:59 +02:00
alex 4ef0f108ea fix: use SSH key during repository preflight and clone 2026-05-22 21:19:15 +00:00
alex dc8ef0e463 fix: chain clone_mode migration after single_interface migration 2026-05-22 21:12:46 +00:00
Fusion 6a7657aeda chore: remove unused tool-types and tool-configs pages
These pages are superseded by the Tool Workshop page.
No functional changes.
2026-05-22 23:04:35 +02:00
alex eca8b8815b Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev 2026-05-22 21:02:13 +00:00
Fusion d0f7a97f92 Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev 2026-05-22 23:01:59 +02:00
alex 765cb965e6 fix: sanitize template variables before YAML validation 2026-05-22 21:01:59 +00:00
Fusion 063a839790 feat: implement repository clone mode with SSH key support
- Add clone_mode and branch fields to tool_instances
- Add ssh_key_id to git_repositories for per-repo SSH key assignment
- Implement host-side git cloning with branch selection (default: main)
- Mount SSH keys into containers for git operations in clone mode
- Add dirty state check on clone-mode instance deletion with confirmation
- Update SessionsPage with mount/clone selector, branch input, SSH key display
- Add SSH key selector to repository creation form
- Add dirty delete confirmation modal with changed files list
- Update API schemas and endpoints for new fields
- Sync delta specs to main specs (git-repo, tool-instances, repo-clone-mode)
- Archive completed OpenSpec change: repo-clone-mode-with-ssh
- Document git requirement for custom tool types

Quality gates: Frontend typecheck and build passed
OpenSpec: repo-clone-mode-with-ssh archived with all tasks complete
2026-05-22 22:56:35 +02:00
alex ae41a64e66 fix: shorten migration revision ID to fit alembic_version column 2026-05-22 20:50:52 +00:00
alex 0901b1e832 fix: make migration database-agnostic for SQLite and PostgreSQL 2026-05-22 20:48:21 +00:00
alex 7cc720786e Merge branch 'feat/enforce-single-tool-type-with-port-config' into dev 2026-05-22 20:44:23 +00:00
alex e167a6be12 feat: enforce single tool type with port configuration
- Replace interfaces array with single interface_type string (web/terminal)
- Add requires_port boolean to indicate port/tunnel needs
- Create Alembic migration for database schema change
- Update backend model, API validation, and seed data
- Update frontend types and tool workshop UI with dropdown
- Add conditional port field rendering based on interface type
- Update all frontend and backend tests

OpenSpec change: enforce-single-tool-type-with-port-config
Quality gates: frontend typecheck PASS, lint PASS, tests 37/37 PASS
2026-05-22 20:44:17 +00:00
alex 0fa926284c feat: enforce single tool type with port config
- Replace interfaces array with interface_type string and requires_port boolean
- Add database migration for schema change
- Update backend model, API schemas, and validation
- Update frontend types and tool workshop UI
- Add dropdown for interface type selection
- Conditionally show/hide port fields based on requires_port
- Update tests and mock data
- All frontend tests pass (37/37)
- Frontend typecheck and lint pass
2026-05-22 20:32:10 +00:00
alex 5c17de0c3c fix: handle FastAPI validation error objects in tool workshop
- Add extractErrorMessage helper to safely stringify validation error arrays
- Apply to tool type, config, and folder save handlers
- Fixes React error #31 when rendering error objects directly in JSX

Closes: redesign-tool-workshop
2026-05-22 20:04:42 +00:00
alex 8efadc4432 fix: add defensive null checks to prevent filter crash
- Add fallback to empty arrays for toolTypes, configs, and folders
- Handle undefined API responses gracefully
- Prevent Cannot read properties of undefined (reading 'filter') error

Quality gates: npm run build passed
2026-05-22 19:54:40 +00:00
miguel 1e40540ef4 feat: show banner for bare mirror repositories
- Add isMirror prop to GitToolbar\n- Show warning banner when repo is a bare mirror\n- Explain that editing/committing/pulling/merging are unavailable\n- Suggest deleting and recreating to enable full features\n\nQuality gates: vitest (43 passed)
2026-05-22 21:51:17 +02:00
alex 7cbbb41661 feat: redesign tool workshop with split-pane layout
- Replace tabbed interface with split-pane layout
- Left sidebar: scrollable tool type list with selection and create button
- Right panel: editable tool type details with tabs for configs and folders
- Add dirty state tracking with unsaved changes warning
- Improve mobile responsiveness

Quality gates: npm run build passed
2026-05-22 19:49:54 +00:00
Fusion 952a9f3234 fix: correct merge migration to use down_revision tuple
The merge migration was using depends_on instead of down_revision,
which prevented Alembic from recognizing it as a merge point.
2026-05-22 21:47:42 +02:00
Fusion ab8872f79e fix: add merge migration to resolve multiple alembic heads
Resolves conflict between numeric migration branch (0013) and
tool-workshop migration branch (8ed7dd80973d) both depending on
0012_default_port_req.
2026-05-22 21:44:43 +02:00
Fusion be4893e2a7 fix: add missing migration for probe_result column
Adds probe_result JSON column to tool_instances table.
This column stores readiness probe results and was added to the
model but the migration was missing.
2026-05-22 21:42:10 +02:00
Fusion b3c6a5fdc9 Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev 2026-05-22 21:39:59 +02:00
Fusion b7d17cea78 fix: complete in-progress OpenSpec changes
- git-repo-working-clones: Complete remaining test task
- opencode-web-terminal: Add port validation tests, fix model validator
- session-management-fixes: Mark frontend tasks as complete (already implemented)

All in-progress changes now complete.
2026-05-22 21:39:43 +02:00
miguel 36d6448f5f merge: integrate session management fixes and sessions hub 2026-05-22 21:39:37 +02:00
miguel 20a5f6a9a1 feat: session management fixes and sessions hub
- Add confirmation dialogs for stop/delete on dashboard
- Filter deleted sessions immediately without reload
- Add tunnel health polling with error badges
- Add Sessions nav item with active count badge
- Route /sessions to SessionsPage component

Quality gates: 43/43 tests pass, typecheck pass, lint pass

Refs: openspec/changes/session-management-fixes
Refs: openspec/changes/sessions-hub
2026-05-22 21:39:28 +02:00
miguel 1c94583307 fix: handle bare repos in branch creation and checkout
- Fall back to symbolic-ref when checkout --orphan fails on bare repos\n- Fall back to symbolic-ref when checkout fails on bare repos\n- Make get_current_branch handle bare repos with unborn branches\n- Add integration tests for bare repo branch operations\n\nQuality gates: pytest integration tests (12 passed)
2026-05-22 21:33:18 +02:00
miguel 95a7454bee fix: handle bare repos in branch creation and checkout
- Fall back to symbolic-ref when checkout --orphan fails on bare repos\n- Fall back to symbolic-ref when checkout fails on bare repos\n- Make get_current_branch handle bare repos with unborn branches\n- Add integration tests for bare repo branch operations\n\nQuality gates: pytest integration tests (12 passed)
2026-05-22 21:32:51 +02:00
Fusion 649496b762 Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev 2026-05-22 21:28:59 +02:00
Fusion d13e16f5e1 feat(health-monitoring): complete instance health monitoring implementation
Backend:
- Container startup verification with docker inspect polling
- Readiness probe integration with ToolType configuration
- Enhanced health endpoint checking container + tunnel status
- Smart tunnel recovery distinguishing connection errors vs HTTP errors
- New status states: starting, probing, unhealthy

Frontend:
- Updated status badges for new states (starting, probing, unhealthy)
- Show tunnel error only when tunnel_status is unreachable
- Show app error badge with status code for error_response
- Add collapsible probe output section for diagnostics
- Only show Recreate Tunnel button for unreachable tunnels

Quality Gates:
- Frontend type checking: PASSED
- Frontend build: PASSED
- Backend unit tests: 56 passed

Addresses instance-health-monitoring OpenSpec change
2026-05-22 21:28:45 +02:00
Fusion d5f9df33b7 feat(frontend): update sessions page for enhanced health monitoring
- Add new status badges: starting, probing, unhealthy
- Show tunnel error only when tunnel_status is unreachable
- Show app error badge with status code for error_response
- Add collapsible probe output section for diagnostics
- Update health polling to check all active instances
- Only show Recreate Tunnel button for unreachable tunnels
2026-05-22 21:26:05 +02:00
miguel 468e0eacda merge: integrate UI redesign and test fixes into dev 2026-05-22 21:21:16 +02:00
miguel 99097090e6 fix: resolve test failures after merge and add missing labels
- Fix tool-workshop test selectors to match component labels
- Fix API test mocks for axios client
- Add htmlFor attributes to form labels in tool-workshop
- Update type signatures to match API interfaces

Quality gates: 43/43 tests pass, typecheck pass, lint pass
2026-05-22 21:15:06 +02:00
Fusion 2a9e57ad0d chore: archive superseded cloudflare-tunnel-instances OpenSpec change
This change proposed using Cloudflare API for persistent tunnels.
Superseded by temporary tunnel approach using 'cloudflared tunnel --url'
which requires no API tokens, account IDs, or DNS configuration.
2026-05-22 21:01:44 +02:00
Fusion e4c5e7f2db chore: archive tool-workshop OpenSpec change
- Update tasks.md to mark all 140 tasks as complete
- Archive tool-workshop change to openspec/changes/archive/2026-05-22-tool-workshop/
2026-05-22 20:57:30 +02:00
Fusion 70957e462a fix: exclude test files from TypeScript build
- Add exclude pattern for **/*.test.ts and **/*.test.tsx in tsconfig.json
- Fixes deployment build failures caused by type mismatches in test mocks
2026-05-22 20:53:38 +02:00
miguel 6f35eb77ae feat: redesign authenticated UI with home overview and settings hub
- Add HomePage with open sessions grid, projects overview, and session composer
- Add SettingsPage with tabs for General, SSH Keys, Tool Types, Tool Configs
- Update navigation to Home, Projects, Settings
- Redirect legacy routes (/sessions, /ssh-keys, /tool-types, /tool-configs)
- Apply Inter font and warm editorial styling
- Update tests for new dashboard and projects pages

Quality gates: typecheck pass, lint pass, 15/15 tests pass

Refs: openspec/changes/ui-redesign-home-settings
2026-05-22 20:38:05 +02:00
Fusion 684a11610a docs: add git branching strategy and merge workflow to AGENTS.md
- Add branching strategy section with prefix conventions (feat/, fix/, refactor/, docs/, chore/)
- Add completion and merge workflow steps (branch from dev, merge back, push)
- Emphasize no direct commits to main or dev branches
2026-05-22 20:37:50 +02:00