Skip to content

refactor(console): narrow the console surface to chat and observability #931

Description

@devlikebear

Part of #919. Phase 3. LP-012.

Independent of the other phases; can run in parallel.

Summary

Reduce the console to what a browser is genuinely better at — conversation and observability — and move configuration toward file- and CLI-first, so the remaining surface can be designed rather than merely maintained.

Problem

The console has grown to 41.5k LOC across 66 Svelte components. The distribution is the issue:

Component LOC
Config.svelte 3200
Chat.svelte 2167
TasksPanel.svelte 1962
SessionConfigPanel.svelte 1862
ChatPanel.svelte 1861
AgentRuntimeRunView.svelte 1763
lib/api.ts 1825

Config.svelte at 3200 lines is the largest file in the frontend and mirrors a YAML file that is already the source of truth (workspace/config/tars.config.yaml), already documented (config/tars.config.example.yaml), and already validated server-side. Every new config field costs a form control, and the config surface is 60+ fields and growing — #923 and #925 each add more.

The CLI shows the same pattern: 37 registered subcommands.

This is the "simplify and sharpen" problem, and it is worth stating plainly that it is not a repository-layout problem — see #930. Moving code does not reduce it.

Scope

This issue is a decision plus a first cut, not a blanket rewrite.

  • Decide and document what the console is for. Proposed: conversation, session/cwd control, and observability (pulse, ops, memory, agent runtime, work timeline). Configuration is file-first, with the console offering inspection and validation rather than full editing.
  • Audit Config.svelte against actual usage: which fields are edited in the console versus the YAML file. Keep onboarding and credential entry — those genuinely need a UI.
  • Replace the long-tail editors with a validated read view plus a deep link to the relevant documented YAML key.
  • Extract shared form primitives so the remaining editors stop duplicating layout.
  • Split lib/api.ts by domain.
  • Review the 37 CLI subcommands for overlap with console-only paths and mark candidates for deprecation — do not remove in this issue.
  • Consult frontend/console/DESIGN.md before any visual change, and update it in the same PR where the result deviates.

Acceptance Criteria

  • The console's purpose is written down and the route list matches it.
  • Config.svelte is materially smaller, with the removed surface either relocated or documented as file-first.
  • Onboarding and credential flows are unchanged in capability.
  • No server route is orphaned; anything the console stops calling is either still reachable via CLI/API or explicitly deprecated.
  • DESIGN.md reflects the result.

Validation

  • cd frontend/console && npm run check
  • cd frontend/console && npm run test:ci
  • Playwright suite
  • make console-build && make dev-serve, walking onboarding and each remaining route
  • make test

Out of Scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions