refactor(console): narrow console surface to chat and observability - #935
Merged
Conversation
…olicy Part of #919. Refs #931. Step 1 of the console-narrowing first cut: normative purpose statement (conversation / observability / targeted control), route inventory mapped to pillars, and the config policy (file-first, inspection-not-editing) recorded in DESIGN.md before any visual or route change.
…pection Part of #919. Refs #931. Step 3: replace the long-tail field editors with a validated read-only inspection view (value, env-override effective value, default/restart/secret badges, documented YAML key). Remove the generic JSON / LLM tier / LLM provider / embodiment preset modal editors; provider and tier editing deep links to the onboarding wizard reentry which already preserves masked keys via alias-replace. YAML tab becomes a read view — file-first per DESIGN.md. Onboarding, credential entry, restart, danger zone, pending-changes diff, and LLM connection test unchanged. Config.svelte 3200 -> 1393 lines.
Part of #919. Refs #931. Step 4: api.ts (1825 lines) becomes src/lib/api/{client,normalize,system,config,chat,sessions,tasks,git, memory,ops,extensions,channels,agentruntime,workspace}.ts with an index.ts barrel re-exporting the full surface — all existing '../lib/api' imports keep working. Runtime relative imports carry explicit .ts extensions so node --experimental-strip-types can load modules directly; tsconfig gains allowImportingTsExtensions. Tests that asserted on api.ts source now read the owning module. No endpoint, function, or type removed.
|
4 tasks
devlikebear
added a commit
that referenced
this pull request
Aug 24, 2026
Review follow-up to #935 (#931). Two bugs the config narrowing made reachable, plus the DESIGN.md contradictions it left behind. - buildConfigPayload merged llm_providers with what is on disk but rebuilt llm_tiers from heavy/standard/light alone and returned it wholesale. The alias-keyed PATCH replaces the on-disk set with whatever the patch sends — the same reason the provider merge exists — so a user with a custom tier (schema.go documents "heavy/standard/light or custom tiers") lost it by changing one model in the wizard. #935 routed Config.svelte's llm_tiers editing to that wizard deep link, which opened the path to normal users. - Inspect rendered uncommitted edits. shouldShowFieldActions hides Save/Discard outside Quick Start, but getDisplayValue preferred dirtyFields regardless, so a pane banner-labelled "Read-only inspection" showed an unsaved value as though the server had loaded it. - DESIGN.md claimed the 13 Quick Start gates "stay interactive" while the consequence table three bullets later made embodiment_providers_json read-only, and promised masked entry for 7 credential fields when only 2 still have an input. Both now describe what the code does, including that token rotation needs host filesystem access. - Recorded configStructured.ts's draft builders and the saveConfig / getProviders wrappers as retained-but-unreferenced, kept for the embodiment-preset follow-up DESIGN.md already names. Left in place rather than deleted because #931 is still open; the note is the delete inventory if that follow-up is declined. Verified: npm run check 529 files 0 errors, npm test 303/303 (the new tier test fails against the old code), go test ./internal/tarsserver/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Config.svelte3200 → 1393 LOC (−56%): Quick Start stays interactive; Fields tab becomes read-only inspection with YAML-key pointers and wizard deep links; YAML tab becomes a read view; 4 modal editors removed.lib/api.tsinto 14 domain modules behind a barrel re-export (lib/api/index.ts) — zero API surface change, old imports keep working; 27 test files repointed to owning modules.PUT /v1/admin/configandGET /v1/providersno longer called by the console but retained server-side; flagged as follow-up.Refs #931 · Part of #919 (LP-012) — first cut; issue stays open for form-primitive extraction and Playwright/manual validation.
Test plan