Skip to content

feat(mission-control): Complete UI/UX improvement plan — Phases 1–7 - #151

Merged
kherrera6219 merged 42 commits into
claude/upbeat-nightingale-c071bafrom
main
May 22, 2026
Merged

feat(mission-control): Complete UI/UX improvement plan — Phases 1–7#151
kherrera6219 merged 42 commits into
claude/upbeat-nightingale-c071bafrom
main

Conversation

@kherrera6219

Copy link
Copy Markdown
Owner

Summary\n\nThis PR documents the complete Mission Control UI/UX improvement plan implemented across Phases 1-7. All changes are already on main. Branch claude/upbeat-nightingale-c071ba is the pre-session baseline.\n\n## Phases completed\n\nPhase 1 — Foundation fixes: Ctrl+? hotkey bug, cancel-mission button colour, nav grouping (Workflow/Observability/Configuration), .mono-id UUID class, danger-button.\n\nPhase 2 & 3 — Component system: CopyId, useLastRefreshed, Mission History page, Mission Detail tabs (Execution/Artifacts/Contracts/Events), design token enforcement, OS theme support.\n\nPhase 4 — Accessibility: WCAG AA warning colour (#b45309, 4.6:1), :focus-visible scoping, reduced-motion transform:none, shape-differentiated metric dots, stepper aria-labels.\n\nPhase 5 — Notifications & export: NotificationBell, Audit Log page at /audit, lib/export.ts Blob downloads, GlobalSearch (Ctrl+K), semantic bus BusSparkline SVG ring buffer.\n\nPhase 6 — Domain UX: lib/glossary.ts + Tooltip on phase stepper, GuidedTour 6-step spotlight (Ctrl+G), CommandPalette full Ctrl+K modal, live StatusBar 15s poll, Mission Detail inline name edit.\n\nPhase 7 — Electron prep: ElectronTitlebar (frameless, platform-aware), electron/tray.ts, Repo Import Browse Local button, Settings Software Updates panel, lib/electron-bridge.ts IPC abstraction, electron/preload.ts contextBridge, electron/main.ts.\n\n## Score projections (plan)\n| Dimension | Before | After |\n|-----------|--------|-------|\n| IA | 6.0 | 10 | Layout | 6.5 | 10 | Interaction | 6.0 | 10 | Visual | 7.0 | 10 | Accessibility | 5.5 | 10 | Domain UX | 4.5 | 10 | Electron | - | 10 |\n\n🤖 Generated with Claude Code

…071ba

Implement Phase 8 (FETCH/IS Agent) and Phase 9 (FUSION/Master Logic Stream)
…map, LLM DEPABS replacement

Gap 3 — Token Cost Ledger (Phase 15)
- Add LlmUsageSummary type to types.ts
- Add getMissionTokenUsage to api-client.ts
- Add AGENT-36 through AGENT-41 to STATIC_AGENT_SLOTS in settings page
- Add V007 migration: llm_usage_events table with provider/agent indexes
- Add llm_cost_ledger.py: pricing table, record_llm_usage, get_mission_token_usage
- Extract token counts from OpenAI, Anthropic, Gemini provider responses
- Wire GET /v1/missions/{id}/token-usage endpoint

Gap 4 — Gemini Embeddings (Phase 16)
- Add _gemini_embedding() to knowledge_embeddings.py
- Wire Gemini branch into vector_for_content
- KNOWLEDGE_EMBEDDING_PROVIDER=gemini now active

Gap 5 — AIM Language Map
- Expand _LANGUAGE_BY_SUFFIX from 8 to 47 entries
- Add all Pod B systems languages: .c .cpp .rs .go .zig and variants
- Add Pod C enterprise: .cs .scala .kt
- Add Pod D mathematical: .r .jl .m .hs .ml
- Add platform-native desktop/game: .swift .lua .glsl .hlsl .wgsl
- Expand _SUPPORTED_EXTRACTOR_LANGUAGES to match
- Enables AIM for desktop and game porting missions

Gap 6 — LLM-driven DEPABS Replacement (Phase 23)
- Convert _generate_replacement_code from sync to async
- Add _llm_generate_replacement via AGENT-39-DEPABS anthropic_deep_audit profile
- Python ast.parse validation before accepting LLM output
- Add _depabs_recommendation() to llm_delegation.py
- Deterministic table handles known utilities; LLM fires for all others
Change 1 — CEO PORT strategy (llm_delegation.py)
- Replace weak PORT hint with mandatory two-cluster decomposition
- Cluster 1 (EXTRACTION): source pod, domain=source_extraction, HIGH priority
- Cluster 2 (GENERATION): target pod, domain=target_generation, MEDIUM priority, depends_on Cluster 1

Change 2 — Two-phase mission flow (mission_flow_v2.py, port_coordinator.py)
- Add PORT_TWO_PHASE_ENABLED=false feature flag to settings + .env.example
- New port_coordinator.py: source language detection from bundle extensions,
  _setup_port_two_phase, run_port_extraction_phase, full language/specialist/
  pod-manager maps for all 20 languages
- Extraction phase: AIM generation + LogicNode extraction from source code,
  stores port_source_logicnodes + port_source_aim, emits
  MISSION_PORT_EXTRACTION_COMPLETE
- Generation phase: injects port_source_logicnodes into codegen context,
  emits MISSION_PORT_GENERATION_COMPLETE

Change 2d — Codegen prompt (llm_delegation.py)
- _build_codegen_prompt now injects source behavior block when
  port_source_logicnodes present in mission_context

Change 3 — PORT equivalence checks (equivalence_verifier.py)
- _port_concept_coverage_checks: advisory domain.concept coverage check
- Verifies source extraction concepts appear in generated output
- All checks required=False (semantic equivalence is advisory for PORT)

Change 4 — Mission Control PORT phase indicator (missions/[id]/page.tsx)
- Two-phase progress indicator in Mission Signals panel
- [EXTRACTION: Python checkmark] -> [GENERATION: Rust bullet]
- Derives from port_phase, port_source_language, port_target_language,
  port_source_logicnodes presence
- New PORT fields typed in MissionChainTrace (types.ts)
Change 1 — Prompt asset registry (prompt_registry.py)
- PromptAsset dataclass: versioned, frozen, SHA-256 content hash auto-computed
- register(), get(), list_prompts(), load_prompt_assets() API
- Loaded at orchestrator startup via lifespan hook in main.py
- 5 JSON assets in prompt_assets/: pm_feature_contract.v1, ceo_delegation.v1,
  ceo_mission_contract.v1, specialist_codegen.v1, security_threat_analysis.v1

Change 2 — LLM safety envelope (llm_safety.py)
- check_outbound_prompt(): detects API keys, GitHub tokens, SSN, credit card patterns
- check_inbound_response(): detects prompt injection indicators in model output
- sanitize_outbound_prompt(): redacts sensitive patterns to [REDACTED]
- LLM_SAFETY_BLOCK_ENABLED flag (default: log-only mode)
- Wired into _call_with_recommendation() before every LLM call
- GET /v1/missions/{id}/token-usage exposed through API gateway

Change 3 — AI eval harness (tests/eval/)
- test_safety_evals.py: 10 offline safety tests (outbound/inbound)
- test_pm_contract_evals.py: 6 PM fallback contract quality tests
- test_prompt_registry_evals.py: 7 registry unit tests including disk load
- conftest_eval.py: live_llm marker for CI skip
- make eval target added to Makefile
- All 23 eval tests pass offline in 0.08s

Change 4 — Settings and config
- llm_safety_block_enabled added to Settings dataclass and factory
- LLM_SAFETY_BLOCK_ENABLED=false added to .env.example
- GET /internal/prompt-registry endpoint added

Ruff: clean. TypeScript: clean. 23/23 eval tests passing.
Phase 26 updates:
- Add pre-implementation findings section with live codebase reality check
- Confirm TLS key history issue (2 commits, server.key present)
- Note production_review_audit.py passes 17/17 but has no intelligence-layer checks
- Scope Change 3 (evidence refresh) to what is actually stale vs already fresh
- Clarify promotion_gate.py requires CLI args — add intelligence_gate.py instead
- Add 5 new audit checks: SEC-KEY-001, DR-001, AI-001, AI-002, PHASE-001
- Update exit criteria to 22 checks (17 existing + 5 new)

Phase 27 updates:
- Replace pre-work table status markers with actual done/not-done from code review
- Items done: AGENT-36-41 slots, LlmUsageSummary, getMissionTokenUsage,
  Gemini embeddings, AIM language map, DEPABS LLM replacement,
  PORT types/indicator, prompt registry, 23 eval tests
- Items outstanding: panel extraction (page.tsx at 1574 lines),
  ErrorBoundary, window.confirm, PM clarification panel, VcCommitStrategy types
- Add Change 4 (window.confirm replacement) as explicit change
- Update exit criteria to reflect actual current state
- Add noqa: E501 to long command-building lines in execute_git_history_scrub.py,
  run_automated_dr_drill.py, and production_review_audit.py (git/powershell
  command arrays that cannot be split without losing readability)
- Auto-fix import sort order in execute_git_history_scrub.py and
  run_automated_dr_drill.py (ruff --fix)
- Remove unused pytest import from test_safety_evals.py (ruff --fix)
- All checks: ruff clean, TypeScript clean, 97 eval tests passing
…mary fields in MissionChainTrace

Also adds vc_commit_strategy, integration_tests, and pod_audit_verdict fields, and untracks tsbuildinfo.
…state

Full rewrite of the canonical status document. Previous version described
the project as "Phase 15 remains planned" and contained stale March 2026
validation snapshots. This version reflects the actual current codebase.

Key changes:
- Project status updated: Phases 1-27 complete, 22/22 audit, 97 eval tests,
  RTO 37.13s, clean git history
- Shipped defaults table: all 17 feature flags with current default and notes
- LLM model assignments current as of 2026-05-17 verification
- Runtime topology section accurate (condensed vs full-dedicated)
- Data plane section: V001-V007 migrations, Qdrant active, Neo4j/S3 optional
- Security hardening: PII guard, prompt guard, LLM safety envelope, HMAC
  approvals, circuit breaker, gitleaks
- Mission Control: 22 panels across 3 subdirectories, 41-agent vault slots,
  ErrorBoundary, no window.confirm
- Language extraction: 20 routing keys, 47 AIM suffixes, 232 regex patterns,
  3 AST extractors behind feature flags
- Validation snapshot table: current pass/fail for all major checks
- Open work: 23 items across 4 sprints, ordered by impact, no legacy gaps
  that are already done
- Key file locations table for quick navigation
- Removed: stale March 2026 validation commands, inaccurate "Phase 15
  remains planned" claims, incorrect agent slot count (was 35, now 41),
  outdated "Open Gaps" section with already-completed items
New file: docs/SPRINT_BACKLOG.md

23 actionable items across 4 sprints derived from the IMPLEMENTATION_STATUS.md
Open Work section, grounded in a live codebase scan of feature flags,
missing LLM delegation functions, and unactivated defaults.

Sprint 1 (6 items) — Live Demo Gate:
  S1-01 Live provider-key BUILD_NEW demo
  S1-02 Token cost ledger activation (V007 migration + Cost panel data)
  S1-03 Flip AST extractors to default-on
  S1-04 Activate Gemini embeddings
  S1-05 Flip equivalence enforcement on
  S1-06 Flip security compliance enforcement on

Sprint 2 (8 items) — Intelligence Layer Completions:
  S2-01 PM clarification workflow (CLARIFYING state + /clarify endpoint + UI)
  S2-02 Security agent LLM activation (generate_security_analysis)
  S2-03 VC commit strategy agent LLM activation (generate_vc_commit_strategy)
  S2-04 Tester agent LLM activation (generate_integration_tests)
  S2-05 LLM semantic pod audit (generate_pod_audit_verdict, all 4 pods)
  S2-06 COMPLETE-transition deploy readiness wiring
  S2-07 Knowledge lake scheduled refresh background task
  S2-08 pm_clarification + llm_usage_summary chain trace wiring

Sprint 3 (4 items) — Platform Differentiation:
  S3-01 JS/TypeScript DEPABS splicing (esprima-based)
  S3-02 RQCA for compiled languages (C/C++/Rust/C# Pod B)
  S3-03 PORT two-phase activation (flip default after live PORT demo)
  S3-04 Desktop/game porting demo

Sprint 4 (8 items) — Scale and Operational Maturity:
  S4-01 Prompt cache optimization (Anthropic cache_control headers)
  S4-02 Multi-container RQCA environments
  S4-03 Agent scaling live validation
  S4-04 Neo4j knowledge graph activation
  S4-05 Object storage for large artifacts
  S4-06 Live qualification evidence refresh
  S4-07 Lighthouse CI enforcement
  S4-08 Long-duration reliability re-qualification

Each item includes: description, exact files to modify, test commands,
prerequisites, and evidence output path where applicable.
Phase 26 — Production Hardening: COMPLETE 2026-05-20
  - 22/22 production audit checks passing
  - SEC-KEY-001: git history clean of TLS keys (confirmed)
  - DR-001: DR drill evidence present, RTO 37.13s
  - AI-001: 5 versioned prompt assets
  - AI-002: 10 safety eval tests
  - PHASE-001: Phase 22-25 evidence files present
  - .secrets.baseline committed
  - IMPLEMENTATION_STATUS.md fully rewritten

Phase 27 — Mission Control Convergence: COMPLETE 2026-05-20
  - page.tsx: 546 lines (target <=600)
  - 22 panels across intelligence/(9) operational/(10) telemetry/(3)
  - ErrorBoundary: 52 lines, 45 uses, getDerivedStateFromError
  - window.confirm: zero occurrences
  - 23 Playwright E2E specs
  - All MissionChainTrace fields typed: VcCommitStrategy, IntegrationTests,
    PodAuditVerdict, pm_clarification, llm_usage_summary, PORT fields
  - AGENTS.md last-validated 2026-05-19
  - ROADMAP Phase 40-52 appended
  - SPRINT_BACKLOG.md created with 23-item todo list

Final gate: ruff clean, TypeScript clean, 97 eval tests passing, 22/22 audit
kherrera6219 and others added 12 commits May 20, 2026 00:15
Phase 25 — Prompt Versioning and AI Safety Governance: COMPLETE 2026-05-20

Evidence confirmed:
- prompt_registry.py: PromptAsset dataclass, SHA-256 hashes, register/get/list,
  load_prompt_assets() wired into orchestrator startup lifespan
- prompt_assets/: 5 versioned JSON assets (pm_feature_contract.v1,
  ceo_delegation.v1, ceo_mission_contract.v1, specialist_codegen.v1,
  security_threat_analysis.v1)
- llm_safety.py: 6 outbound secret patterns, 5 inbound injection patterns,
  check_outbound_prompt + check_inbound_response + sanitize_outbound_prompt
- Safety wired into every _call_with_recommendation() call in llm_delegation.py
- LLM_SAFETY_BLOCK_ENABLED=false default (log-only), in settings + .env.example
- GET /internal/prompt-registry endpoint live
- GET /v1/missions/{id}/token-usage proxied through API gateway
- make eval target in Makefile
- 23/23 Phase 25 eval tests passing (safety: 10, PM contract: 6, registry: 7)
- AI-001 and AI-002 audit checks both PASS in 22/22 production audit
- ruff clean, TypeScript clean
All 12 Gemini agents (AGENT-03-BROKER, AGENT-06-IS, AGENT-09-HW,
AGENT-11-DEPLOY, AGENT-30-PODD-MGR, AGENT-32-MATLAB, AGENT-33-R,
AGENT-34-JULIA, AGENT-35-MATHEMATICA, AGENT-37-HASKELL, AGENT-38-OCAML,
AGENT-40-TESTDATA) now use gemini-3.5-flash, the GA model announced at
Google I/O May 2026.

- agent_integrations.py: gemini_stem + gemini_knowledge profiles updated
- settings/page.tsx: all remaining gemini-3.1-pro-preview slots updated
- docker-compose.yaml: GEMINI_MODEL default changed
- llm_cost_ledger.py: gemini-3.5-flash pricing added ($1.50/$9.00/1M)
- promotion-policy.json: allowlist_models cleared (no preview waivers needed)
- agent_model_inventory_latest.json: merged into single gemini-3.5-flash
  stable group; blocked_agent_count 9 → 0
- docs: IMPLEMENTATION_STATUS, MODEL_PROMOTION_GOVERNANCE updated
- tests: fixture model strings updated; promotion gate test uses neutral
  placeholder model to keep gate-logic coverage intact
- .gitignore: test-keys/ added (local API key directory, never commit)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Consolidates every OpenAI model reference (gpt-5.3-codex, gpt-5.2-pro,
gpt-5.4-mini, gpt-4.1, gpt-4o, gpt-5.2-mini) to a single gpt-5.5 string
across all runtime sources, config, E2E fixtures, and test assertions.

- agent_integrations.py: openai_codegen profile → gpt-5.5
- agent_personas.py: both gpt-5.2-pro fallback defaults → gpt-5.5
- llm_delegation.py: codegen default fallback → gpt-5.5
- api-gateway/main.py + docker-compose.yaml: OPENAI_MODEL env defaults → gpt-5.5
- settings/page.tsx: 10 specialist agent model labels → gpt-5.5
- docs/evidence/agent_model_inventory_latest.json: merge gpt-5.3-codex group
  into gpt-5.5; fix stale gemini-3.1-pro-preview / gemini-3.1-flash-lite
  entries in individual agent records to gemini-3.5-flash (summary was
  already correct, individual records had not been updated)
- docs/IMPLEMENTATION_STATUS.md: collapse OpenAI model lines to single entry
- All test fixtures and E2E mocks updated to match

Legacy gpt-5.3-codex pricing entry in llm_cost_ledger.py intentionally
retained to avoid silent cost data corruption on historical llm_usage_events.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes claude-opus-4-7 and claude-sonnet-4-6 from all active agent routes.
Assignment rationale:

  gpt-5.5 (OpenAI, 28 agents):
    PM, CEO, Accountant, Security, Compliance, Tester, VC, all pod managers
    (Poda/Podb/Podc), all pod auditors A/B/C, all code specialists
    (Python/JS/Ruby/PHP/C/C++/Rust/Zig/Go/Java/C#/Scala/Kotlin),
    DEPABS, RQCA — jobs requiring deep structured reasoning, code generation,
    policy analysis, and multi-step planning.

  gemini-3.5-flash (Gemini, 13 agents):
    MATLAB, R, Julia, Mathematica, Haskell, OCaml specialists; Pod D manager
    and auditor (AGENT-31); IS, HW, Broker, Deploy, TestData — STEM/
    mathematical reasoning and high-volume operational routing where Gemini
    excels. Pod D auditor joins Pod D workers on gemini_stem to minimize
    correlated blind spots in mathematical code review.

Changes:
  - agent_integrations.py: replace anthropic_deep_audit / anthropic_general_audit
    profiles with openai_deep_audit (xhigh reasoning) / openai_audit (high
    reasoning); fix gemini_knowledge fallback from claude-sonnet-4-6 → gpt-5.5;
    remap all 14 previously-Anthropic agents to new OpenAI/Gemini profiles
  - settings/page.tsx: update 14 agent model labels
  - evidence JSON: full rewrite — 2-provider model table (openai+gemini only)
  - test fixtures: update agent model assertions and integration assertions
  - AGENT_LLM_PROVIDER_MODEL_MATRIX doc: add STATUS UPDATE 2026-05-20 header
  - IMPLEMENTATION_STATUS + MODEL_PROMOTION_GOVERNANCE: update model summary

Anthropic API infrastructure (api_gateway _call_anthropic, _anthropic_builder_
preview, ANTHROPIC_API_KEY env var) is intentionally retained as a dormant
provider path; legacy cost-ledger entries for claude models kept for historical
llm_usage_events accuracy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
test_export_agent_model_inventory: replace stable model fixture with
  explicit preview model so the classification logic still exercises
  the blocked_agent_count path (both prior models were GA stable after
  the migration, so blocked_agent_count was 0 instead of 1)

test_production_review_audit: extend expected check_ids list with the
  5 checks added since this test was last updated (SEC-KEY-001, DR-001,
  AI-001, AI-002, PHASE-001 — the audit script grew from 17 to 22 checks)

test_storage_unit: update expected schema migration version from "005"
  to "007" to match current migration table (V006 llm_usage_events and
  V007 runtime_qc_report were added since this assertion was written)

test_runtime_unit (3 tests): add missing storage.list_build_artifacts
  mock to all three advance_mission_lifecycle test variants — the
  _prepare_delivery_summary and _completion_artifacts_ready code paths
  call this function, which was not mocked, causing a live psycopg
  connection attempt to the postgres hostname at test time

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Validated review findings against source — several items were already
implemented. Phase 1 fixes the real bugs found during validation and
completes the high-leverage structural changes.

Bug fixes:
- Fix Ctrl+? shortcut hotkey: listener checked shiftKey+key==="/" but
  Shift+/ produces event.key==="?" on US keyboards; change to key==="?"
- Fix Cancel Mission confirm button: was violet/primary, now uses
  danger-button (red) with correct "Yes, Cancel Mission" / "Keep Running"
  wording and dangerous:true flag

Dialog system:
- Rewrite dialog-provider.tsx from Tailwind utility classes to shell
  custom CSS (confirm-dialog, confirm-dialog-body, confirm-dialog-actions)
- Add focus management: auto-focuses confirm button on open, restores
  prior focus on close, Escape key dismisses to false
- Add role="dialog" aria-modal="true" aria-labelledby for screen readers
- Add dangerous?: boolean prop — routes to danger-button vs primary-button

Navigation:
- Convert flat NAV_ITEMS to NAV_GROUPS: Workflow / Observability /
  Configuration sections with muted labels and hairline dividers
- Add /alerts and /performance to Observability group (pages existed,
  had no nav links)
- Update shell-nav.tsx to render groups; preserve flat NAV_ITEMS export
  derived from groups for backwards compatibility

CSS additions (globals.css):
- .danger-button — red filled button for destructive actions
- .mono-id — JetBrains Mono utility for UUIDs and technical IDs
- .confirm-dialog* — full dialog overlay CSS replacing Tailwind
- .shell-nav-group, .shell-nav-divider, .shell-nav-group-label
- Remove .shell-runtime-summary; badge now sits inline in header actions
  with right-border separator via .shell-header-actions > .status-badge

Header:
- Reposition Offline-ready badge from standalone block to inside
  shell-header-actions row; "Live data requires..." text moved to
  aria-label/title on the badge element

Agents page:
- Suppress Agent Snapshot and State Distribution panels when telemetry
  error is active (were rendering as empty panels below the error)
- Add "Configure in Settings →" CTA link to the telemetry error banner

Settings page:
- Add hasAnyKeyData computed flag: hides Masked/Last Rotated/Expires
  columns when all values are n/a (reduces table from 8 to 5 columns
  for a fresh setup operator)
- Rename "Select" button to "Configure" for action clarity
- Apply .mono-id to Slot ID column
- Add savePending state + spinner/"✓ Saved"/error feedback cycle on
  Save Runtime Preferences button

Mission detail:
- Cancel Mission button now uses danger-button class
- Mission ID in PageHeader title wrapped in <span class="mono-id">
- PageHeader title type widened from string to ReactNode

Missions list:
- mission-item-id now has mono-id class applied

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… UX features

Phase 2 — Component System + Core Missing Features:
- 2A: EmptyState multi-variant (empty/error/locked/offline) with CSS accents
- 2B: Mission detail 4-tab layout (Execution, Artifacts, Contracts, Events) with
      ARIA tablist/tabpanel and hidden-attribute panel preservation
- 2C: Optional human-readable mission name field in launch form
- 2D: Duplicate/re-run action on each recent mission (pre-fills form)
- 2E: /missions/history page — paginated archive table with state-group tabs,
      text search, pagination bar, and CopyId on every mission ID
- 2F: mission-console independent column scroll (overflow-hidden + per-column auto)
- 2G: Database retry/reconnect action buttons for DEGRADED and PLANNED adapters
- 2H: Chat history sidebar with localStorage persistence, session grouping
      (Today / Yesterday / date), and session save/restore
- 2I: CopyId component — monospace ID + clipboard button with ✓ feedback
- 2J: useLastRefreshed hook — live "Updated Xs ago" label wired to databases,
      missions, agents, and dashboard panels
- 2K: Settings slot search filter (table-search input + filteredRows useMemo)
- 2L: Prompt char counter with warn/at-limit colour states

Phase 3 — Design System Enforcement:
- 3A: Type-scale tokens (--text-xs through --text-3xl) + spacing completions in
      generated-tokens.css
- 3B: h1 30px/700, h2 20px/650 hierarchy from token scale
- 3C: DB card status accent borders (db-healthy / db-degraded / db-planned)
- 3D: Metric card values use --ink + --text-3xl instead of accent purple
- 3E: OS light-mode override via @media (prefers-color-scheme: light)

Bug fixes:
- chat/page.tsx: JSX structural bug — </div> closers for chat-layout and
  page shell-page were inside {contract && ()} block; moved outside so they
  render unconditionally

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4A — Contrast
  - Dark mode: #f59e0b already 7-8:1 on shell backgrounds (WCAG AAA, no change needed)
  - Light mode: --hgr-warning #d97706 → #b45309 (amber-700, 4.6:1 on white — WCAG AA)
  - font-weight: 600 added to .warning-box, .pill.acknowledged, .char-counter.warn
    for perceptual legibility reinforcement

4B / 4C — Focus ring scoping
  - textarea/select/input:focus-visible now gets outline: 3px solid var(--ring)
    with outline-offset: 2px (keyboard only, not mouse click)
  - accent border-color retained on plain :focus for caret-position feedback
  - Suppressor: input/select/textarea:focus:not(:focus-visible) { outline: none }

4D — Reduced motion
  - Existing @media (prefers-reduced-motion) * block already suppresses all
    animation-duration, iteration-count, transition-duration globally
  - Added explicit transform: none !important for button/card :hover states
  - Covers: skeleton shimmer, slideDown banner, spinner, progress fill,
    all hover transitions

4E — Color not alone
  - metric-dot shapes: healthy=circle, warning=diamond (rotate 45deg),
    critical=square (border-radius: 2px) — status readable without color
  - Phase stepper marker spans get aria-label="Completed|Active|Pending"
    so screen readers announce state, not the symbol glyph name

4F — Electron accessibleTitle documented in plan for Phase 7 implementation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5A — Header notification bell (NotificationBell component)
  - Polls listOperationsAlerts every 30s, badge count of open alerts
  - Right-side drawer with compact alert cards, severity pills
  - Native OS Notification() for critical alerts when tab hidden

5B — Audit/Activity Log page at /audit
  - Aggregates missions + alerts + bus events via Promise.allSettled
  - Category filter tabs, text search, 30/page pagination
  - CSV + JSON export

5C — Export utility lib/export.ts
  - downloadJson() and downloadCsv() via Blob + object-URL
  - missionsToCsvRows() helper
  - Export buttons on /missions/history and /audit and /semantic-bus

5D — Global search (GlobalSearch component)
  - Pre-loads missions/agents/logicNodes once on mount (local-first)
  - 200ms debounce, grouped results, keyboard navigation
  - Ctrl+K hotkey, ARIA listbox pattern
  - Wired into shell header center zone

5E — Semantic Bus sparkline (BusSparkline component)
  - 60s rolling 1s-bucket ring buffer
  - SVG polyline + area fill in --accent purple
  - Large msg/s rate label replaces buried plain text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6A — Tooltip Glossary (lib/glossary.ts + components/tooltip.tsx)
  - 20 domain term definitions: all Smelt-Cycle phases, LogicNode, Pod,
    Feature Contract, Mission Charter, Chain Trace, RQCA, AIM, Depth Mode,
    Logic Clusters, Pod Group Standards, Fusion
  - Tooltip component: hover/focus-within, aria-describedby, side prop
  - Applied to phase stepper in Mission Detail (bottom-side tooltips)

6B — First-Visit Guided Tour (components/guided-tour.tsx)
  - 6-step spotlight tour: sidebar, navigation, command palette, new mission,
    notification bell, status bar
  - Four-strip spotlight overlay leaves a hole around the target element
  - localStorage key hgr-tour-seen-v1 prevents re-show after completion
  - Progress dots, Back / Next / Skip, Ctrl+G to reopen via keyboard shortcut
  - Repositions on window resize via requestAnimationFrame

6C — Command Palette (components/command-palette.tsx)
  - Replaces GlobalSearch visible input with a styled trigger button
  - Empty query: all nav links grouped by Workflow/Observability/Configuration
    with keyboard shortcut badges + Quick Actions (shortcuts, refresh)
  - Query ≥ 2 chars: fuzzy search across missions, agents, logic nodes
  - Ctrl+K + custom event 'command-palette-open' to open from anywhere
  - Arrow key navigation, Enter to select, Escape to close
  - ARIA listbox pattern; full keyboard accessible

6D — Live Status Bar (components/status-bar.tsx)
  - Polls OperationsSummary every 15 s for active mission count and
    healthy service count (out of total runtime services)
  - Live dot (green glow) / offline dot (grey); 'synced Xm ago' label
  - Replaces static footer text in shell layout

6E — Mission Detail Inline Name Edit
  - Click ✎ in mission header to enter edit mode for the mission name
  - Enter/blur commits; Escape cancels
  - PATCH /v1/missions/{id} via new updateMissionMetadata() API helper
  - If mission already has a name: shows name + truncated UUID as subtitle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7A — Custom frameless titlebar (ElectronTitlebar component)
  - Hidden native frame; custom win/mac titlebar renders in Electron only
  - -webkit-app-region: drag on title area, no-drag on control buttons
  - Windows/Linux: minimize/maximize/close SVG buttons with hover states
  - macOS: 80px traffic-light zone, title centered, no custom controls
  - accessibleTitle: 'Mission Control — HolyGrail Refinery' (Phase 4F)
  - BrowserWindow: frame:false, spellcheck:true, contextIsolation:true,
    sandbox:true, nodeIntegration:false
  - .shell:has(.electron-titlebar) shifts layout by --electron-titlebar-h

7B — System tray (electron/tray.ts)
  - Tray icon with context menu: Open, New Mission, View Missions, Quit
  - Double-click shows/focuses main window
  - Template image flag for macOS dark/light menu bar
  - Status bar calls electronUpdateTray() every 15s with active mission
    count and live/offline status; tooltip updates accordingly

7C — Local filesystem import (electron/main.ts + repo/page.tsx)
  - 'Browse Local…' button on Repo Import page calls
    dialog.showOpenDialog() in Electron, sets URL as file:// path
  - In the browser: informational 'Desktop app: Browse local repos' hint
  - electronShowOpenDialog() / electronShowSaveDialog() helpers in bridge
  - IPC: fs:show-open-dialog, fs:show-save-dialog (ipcMain.handle)

7D — Auto-update settings panel (electron/updater.ts + settings/page.tsx)
  - 'Software Updates' Panel added to Settings page
  - Electron: shows current version, 'Check for Updates' button,
    'Install & Relaunch' CTA when download is complete
  - Browser: shows NEXT_PUBLIC_APP_VERSION with pointer to desktop app
  - electron-updater: autoDownload:true, autoInstallOnAppQuit:true
  - Renderer notified via updater:downloaded IPC event

7E — IPC architecture (app/lib/electron-bridge.ts + electron/preload.ts)
  - electron-bridge.ts: isElectron(), all safe renderer wrappers,
    Window['electronAPI'] global type declaration, IPC_CHANNELS constants
  - preload.ts: contextBridge.exposeInMainWorld with full API surface
  - All IPC channel names in IPC_CHANNELS — single source of truth shared
    between renderer (app/lib/) and main process (electron/)
  - tsconfig.json excludes electron/ from Next.js build (separate
    electron/tsconfig.json handles main process compilation)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codesyncapp

codesyncapp Bot commented May 22, 2026

Copy link
Copy Markdown

Check out the playback for this Pull Request here.

const [launching, setLaunching] = useState(false);
const [error, setError] = useState<string | null>(null);
const [sessions, setSessions] = useState<ChatSession[]>([]);
const [activeSessionId, setActiveSessionId] = useState<string | null>(null);
LOGGER.info(
"v2: mission %s blocked by security/compliance report %s",
mission_id,
security_compliance_report.get("report_id"),
LOGGER.info(
"v2: mission %s blocked by dependency absorption report %s",
mission_id,
dependency_absorption_report.get("report_id"),
LOGGER.info(
"v2: mission %s blocked by runtime QC report %s",
mission_id,
runtime_qc_report.get("verdict"),
LOGGER.info(
"PORT two-phase setup: source=%s specialist=%s target=%s",
source_language,
source_specialist,

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c72370da06

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Load the Next.js app — dev server in development, static export in production.
const appUrl = isDev
? `http://localhost:${NEXT_DEV_PORT}`
: `file://${path.join(__dirname, "../out/index.html")}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Point Electron production URL at exported Next bundle

When running the transpiled Electron build, __dirname is under dist/electron/electron, so path.join(__dirname, "../out/index.html") resolves to dist/electron/out/index.html instead of the app’s exported out/index.html. In production this yields ERR_FILE_NOT_FOUND/blank window unless files are manually copied into that unexpected path. The load target should be derived from the real app root (or explicitly configured) so packaged builds can boot reliably.

Useful? React with 👍 / 👎.

import { IPC_CHANNELS } from "../app/lib/electron-bridge";

const isDev = process.env.ELECTRON_DEV === "1";
const NEXT_DEV_PORT = 3100; // Match next dev --port in package.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align Electron dev URL with Next.js dev port

The Electron dev URL is hardcoded to port 3100, but the Mission Control dev script runs Next on port 3000, so ELECTRON_DEV=1 launches against a non-listening endpoint by default. This makes local Electron startup fail with connection errors unless developers override one side manually. Keeping these values in sync (or making the port configurable) avoids a broken default dev flow.

Useful? React with 👍 / 👎.

import path from "path";
import { app, BrowserWindow, Menu, nativeImage, Tray } from "electron";

export function setupTray(mainWindow: BrowserWindow | null): Tray {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use current BrowserWindow in tray handlers

Tray actions close over the mainWindow argument passed at setup time. On macOS, closing all windows does not quit the app, and a new window is later created on activate, but these tray callbacks still target the original (destroyed) window object. That causes tray commands like “Open Mission Control” to fail (and can throw object-destroyed errors) instead of reopening the active window.

Useful? React with 👍 / 👎.

@kherrera6219
kherrera6219 merged commit 0934fdc into claude/upbeat-nightingale-c071ba May 22, 2026
14 of 20 checks passed
kherrera6219 added a commit that referenced this pull request May 22, 2026
…071ba

Merge pull request #151 from kherrera6219/main
kherrera6219 added a commit that referenced this pull request Jul 2, 2026
feat(mission-control): Complete UI/UX improvement plan — Phases 1–7
kherrera6219 added a commit that referenced this pull request Jul 2, 2026
…071ba

Merge pull request #151 from kherrera6219/main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants