# Release v0.14.21 - Changelog

Released: 2026-02-18

## Overview

This release adds Ghostty terminal theme integration and a project update workflow.

## Features

### Ghostty Shell Integration
- **6 custom terminal themes** (blue, green, purple, orange, red, cyan) — each theme has a distinct color palette tuned for different project types
- **`proj` launcher function** — open any project directory in a themed Ghostty window with `proj <path> [theme]`; auto-detects `.ghostty-theme` files for per-project theming
- **Auto-theme on `cd`** — OSC escape sequences dynamically recolor the terminal and update the tab title when entering/leaving directories with `.ghostty-theme` files (chpwd hook)
- **`proj-themes` listing** — shows all available themes with emoji indicators and descriptions
- **`setup-ghostty.js` installer** — copies themes to Ghostty config dirs, adds shell source line to `~/.zshrc` (all idempotent)
- **Opt-in during `setup.sh`** — first-time setup prompts for Ghostty integration; safe to skip if Ghostty isn't installed

### Update Script
- **`update.sh`** — one-command post-pull updater that refreshes dependencies, ensures data/browser setup, and re-syncs Ghostty themes
- **`npm run update`** — npm script equivalent for the same workflow

### Secret Env Var Masking
- **`secretEnvVars` field on providers** — flag individual env vars as secret so their values display as `***` on the provider list, preventing accidental exposure of tokens/keys
- **Lock/unlock toggle in provider form** — each env var row has a 🔒/🔓 button to toggle secret status; secret inputs use `type="password"`
- **"Secret" checkbox on new env var** — when adding a new env var, check "Secret" to auto-add it to the masked list
- **One-per-line env var display** — env vars now render vertically instead of comma-separated for better readability

### Agent Card App Badge
- **App name visible on agent cards** — running and completed agent cards now display a cyan badge showing which app the agent is working on (e.g., "portos", "kalshibot"), with workspace path tooltip on hover
- **App badge on task items** — pending, active, blocked, and completed tasks in the Tasks tab now show the same cyan app badge, resolving the app UUID to a human-readable name
- **Fixed UUID display** — agent cards and task items now resolve app UUIDs to app names via server-side lookup instead of showing raw UUIDs

### Per-Project Agent Concurrency Limits
- **`maxConcurrentAgentsPerProject` config** — new setting that caps how many agents can run simultaneously for any single project, preventing one app from hogging all available slots
- **Dual-limit enforcement** — the existing `maxConcurrentAgents` acts as the global cap, while the new per-project limit ensures fair distribution across projects
- **Autonomy level presets updated** — Standby (1/1), Assistant (2/1), Manager (3/2), YOLO (5/3) now include per-project defaults
- **ConfigTab UI** — new "Max Agents Per Project" row in the configuration panel with tooltip explaining the behavior

### Dashboard — CoS Decision Log Widget
- **New DecisionLogWidget** on the main dashboard — provides transparency into CoS decision-making by showing why tasks were skipped, switched, or adjusted
- **Decision types tracked**: task_skipped (poor success rate), task_switched (fallback to alternative), interval_adjusted (learning-based), rehabilitation (retrying skipped tasks), and task_selected (successful selection)
- **24-hour summary stats** — quick overview of decisions made in the last day with color-coded badges for skipped, switched, selected, and adjusted tasks
- **Expandable recent decisions list** — click to see detailed reasons for recent impactful decisions, including task type, success rate context, and relative timestamps
- **Transparency score** — percentage of decisions with recorded explanations, encouraging complete decision logging
- **New decision log service** (`server/services/decisionLog.js`) — records decisions with rolling 200-entry window, provides summary and pattern analysis APIs
- **New API endpoints**: `GET /api/cos/decisions`, `GET /api/cos/decisions/summary`, `GET /api/cos/decisions/patterns`
- **Real-time updates** via Socket.IO `decision` event when new decisions are recorded

### System Health Widget
- **Dashboard health overview** — new widget at the top of the dashboard showing server uptime, memory/CPU usage, PM2 process status, and app health at a glance
- **Color-coded status indicators** — healthy (green), warning (yellow), or critical (red) based on system metrics
- **Progress bars for resource usage** — visual memory and CPU usage bars that change color as thresholds are crossed (75%=warning, 90%=critical)
- **Warning banners** — prominent alerts for high memory, CPU load, errored processes, or excessive restarts
- **CoS status integration** — shows if Chief of Staff is running/paused with active agent count
- **New `/api/health/system` endpoint** — consolidates system metrics, PM2 process stats, app status, and CoS state in one API call

### JIRA Active Sprints API
- **`GET /api/jira/instances/:id/boards/:boardId/sprints`** — new endpoint to fetch active sprints for a JIRA board via the Agile REST API; used by the `/ticket` skill to dynamically resolve the current sprint ID instead of hardcoding sprint names

### JIRA Board ID & CLI Ticket Creator
- **`boardId` field on app JIRA config** — new field in the app edit modal and validation schema so sprint lookup can be driven by app config instead of hardcoded values
- **`scripts/jira-create-ticket.js` CLI** — standalone script that imports JIRA services directly, reads app config, auto-resolves the active sprint, and creates tickets with all fields (project, assignee, sprint, epic, story points, labels) in one call; used by the `/ticket` Claude Code skill

### JIRA Epic Search & Token Expiry Detection
- **`GET /api/jira/instances/:id/projects/:key/epics?q=`** — new endpoint to search epics by name in a project; the CLI ticket creator uses this to resolve fuzzy epic names (e.g., "grace support") to JIRA keys
- **`--epic` accepts search terms** — the CLI script now accepts either a JIRA key (`CONTECH-1553`) or a name search (`"grace support"`) and auto-resolves to the best-matching epic
- **Token expiry detection** — JIRA client interceptor detects when the API returns an HTML login page instead of JSON and throws a clear "token expired" error instead of crashing

### JIRA Integration in Task & Agent UI
- **"Create JIRA ticket" checkbox on task creation** — when the selected app has JIRA enabled, a checkbox auto-appears and defaults to checked; the flag flows through to task metadata for downstream ticket creation
- **JIRA ticket badge on agent cards** — running and completed agents display a linked JIRA ticket ID badge when a ticket was created, with a direct link to the ticket in JIRA

### Git Service: Branch & PR Helpers
- **`createBranch` / `checkout` / `createPR`** — new git service functions for programmatic branch creation, switching, and GitHub PR creation via `gh` CLI; enables agents to open PRs as part of their workflow

## Fixes

- **Disabled GLSL custom shaders** — fragment shaders (bloom, nebula, rain, etc.) ran per-pixel every frame causing GPU-bound lag on terminal output; themes now use color palettes only
- **Silenced Ghostty `SEL:` debug spam** — macOS Cocoa input selector messages (`SEL: insertNewline:`, `SEL: insertTab:`, etc.) leaked to the parent terminal when `proj` launched Ghostty as a background process; redirected stdout/stderr to `/dev/null`
- **Fixed "Invalid Date" on git status page** — git commit dates used `%ci` format (space-separated timezone) which some JS engines reject; switched to `%cI` for strict ISO 8601 output
- **Fixed "Run on App" dropdown hidden on mobile** — the absolutely-positioned app selector opened downward and was clipped by the parent's `overflow-hidden`; changed to open upward (`bottom-full`) so it stays visible within the expanded card
- **Fixed per-app overrides matrix not usable on mobile** — the wide table with tiny toggles required horizontal scrolling; added a mobile-specific card layout that shows each app's task type toggles vertically, while keeping the table on desktop
- **COS agents now create PRs for managed apps** — agents working on non-PortOS repositories now receive instructions to create pull requests to the default branch (main/master) instead of committing directly to dev; PortOS core work still commits to dev as before
