# Release v0.17.8 - Changelog

Released: 2026-02-20

## Overview

JIRA integration improvements and token lifecycle management.

## Features

### JIRA token expiry tracking and warning
- **Tracks `tokenUpdatedAt`** on each instance when a PAT is saved, separate from `updatedAt` which changes on any edit
- **Client shows expiry warnings** based on 30-day PAT lifetime: yellow warning at 5 days remaining, red alert when expired
- **Handles legacy instances** without `tokenUpdatedAt` gracefully — prompts user to re-save to start tracking

### JIRA ticket transitions, deletion, and update CLI
- **`jira-update-ticket.js` CLI** — update fields, add comments, transition status, or delete tickets from the command line
- **`--transition "Done"`** moves a ticket to any status by name (or numeric ID); `--transitions` lists available transitions
- **`--delete`** deletes a ticket directly from the CLI
- **`getTransitions()` and `deleteTicket()`** added to the JIRA service and routes for programmatic use

### CoS agent git isolation for managed apps
- **Managed app tasks always get an isolated worktree** based on the latest `origin/main` (or `origin/master`) — prevents cross-agent contamination from dirty state, stale branches, or other agents' uncommitted changes
- **Worktrees now fetch + base off the remote default branch** instead of whatever `HEAD` happens to be locally — agents start from a known-clean state
- **JIRA feature branches** also start from the latest default branch when working on managed apps
- **Agent prompt includes explicit git hygiene rules** — verify clean working tree before starting, stage only specific files (never `git add .`), and refuse to commit or PR unrelated changes

## Improvements

### Task velocity indicator in QuickSummary
- **Pace indicator** shows how today's task completion compares to your personal historical average
- Displays percentage (e.g., "120% vs avg") with color-coded visual feedback
- Labels: exceptional (150%+), above-average (120%+), on-track (80%+), slow/light (<80%)
- Only appears after 3+ days of historical data to ensure meaningful comparisons
- Helps users quickly gauge if they're having a productive day relative to their norm

### Today's Accomplishments in QuickSummary
- **Expandable accomplishments list** shows what tasks completed today at a glance
- Displays task count with expand/collapse toggle for detailed view
- Each accomplishment shows the task description with a success checkmark
- Helps users quickly see what was done without navigating to the Agents tab

### Queue completion time estimate in QuickSummary
- **ETA indicator** predicts when pending tasks will complete based on historical task durations
- Uses learning data to match task types to their average completion times
- Falls back to overall average for unknown task types
- Accounts for currently running agents (assumes half completion time remaining)
- Shows formatted time (e.g., "~15m", "~2h 30m") with hover tooltip showing data confidence

### Week-over-week task comparison in QuickSummary
- **Weekly comparison indicator** shows this week's task count vs last week (same number of days)
- Displays change percentage with trend arrow (up/down/neutral)
- Green up arrow for >10% improvement, yellow down arrow for >10% decline
- Helps users quickly see if they're on track for the week compared to last week
- Only appears when there's historical data from last week to compare against

### Enhanced learning-based model selection
- Model selection now uses the full routing accuracy data from task learning
- Supports tier-specific recommendations (not just upgrades to heavy)
- Actively avoids model tiers that have consistently failed for specific task types
- Logs which tiers were avoided and why, improving transparency

### CityHud scan line: CSS animation instead of setInterval
- Replaced 50ms `setInterval` (20 React re-renders/sec) with a pure CSS `@keyframes` animation
- Eliminates unnecessary React state updates and re-renders for a visual-only effect

### Convert sync file I/O to async in server route handlers
- `attachments.js` GET /: replaced `readdirSync` + `statSync` loop with async `readdir` + `Promise.all(stat)`
- `detect.js` POST /repo: replaced `statSync` with async `stat`
- `visionTest.js` runVisionTestSuite: replaced `readdirSync` with async `readdir`
- Prevents event loop blocking when listing large directories

### Replace raw JSON.parse with safeJSONParse in 5 services
- `platformAccounts.js`, `agentPersonalities.js`, `cosEvolution.js`, `missions.js`, `agentDrafts.js`
- Corrupted JSON files now gracefully fall back to defaults instead of crashing the process

### Atomic state writes and full mutex coverage for CoS state
- `saveState()` now writes to a temp file then renames (atomic on POSIX), preventing half-written JSON on crash/interrupt
- `start()`, `stop()`, `pause()`, `resume()` now use `withStateLock` — previously these 4 lifecycle functions wrote state without the mutex, racing with 18+ other locked write paths
- Root cause fix for the recurring `state.json` corruption that produced 500+ `.corrupted` backup files

### Interactive 3D memory graph visualization
- **React Three Fiber 3D force-directed graph** with Coulomb repulsion, spring attraction, and center gravity — nodes settle via physics simulation
- **Colored by type** (fact/learning/observation/decision/preference/context) with sphere radius scaled by importance
- **Interactions**: hover tooltip, click to select + highlight connections (dims unrelated nodes/edges), orbit controls for rotate/zoom/pan, re-layout button
- **Detail panel** shows full memory content, tags, timestamps, confidence, and clickable list of connected nodes
- **Legend overlay** with type colors and edge style (linked vs similar)
- **URL-driven view routing** — memory tab views (`list`, `timeline`, `graph`) are now deep-linkable via `?view=graph` query param

### Automated release-check self-improvement task
- **Weekly `release-check` CoS task** evaluates whether `dev` has accumulated enough changelog entries for a release, creates a PR to `main`, requests GitHub Copilot code review, iterates on feedback (up to 5 rounds), and auto-merges when clean
- Fully integrated with existing schedule system — appears in Schedule tab with enable/disable toggle and on-demand trigger
