You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Settings as code: layered config files with schema, repo-shared layer, migration flow #438
Inspired by Conductor's settings system (the most disciplined config design in the category): layered TOML files — managed (org) > project-local (gitignored) > repo-shared (committed, only takes effect after merge to the default branch) > user > defaults. JSON schema URLs on the first line give editor autocomplete. Unknown keys are rejected in repo files (catches typos), ignored in managed. Named scripts merge by ID across layers, with a local layer able to hide a shared entry. Legacy config gets a migration flow that opens a PR.
Solenta's settings currently live in the store blob; a layered file-based system makes project config reviewable, shareable, and diffable — and the repo-shared layer pairs with #378 (repo-versioned agent defs).
Concrete prior art for the repo-shared layer: T3's t3.json at the repo root (packages/contracts/src/t3ProjectFile.ts @ beab6886). Deliberately tiny — four keys, all optional:
$schema — https://t3.codes/schema/t3.json, same editor-autocomplete trick as the TOML design above.
defaultThreadEnvMode — "worktree" | "local", where new threads in this repo start. Precedence is explicit and documented in the schema annotation itself: composer pick > per-project setting in the app > checked-in t3.json > global default. That is the layering, stated where the person editing the file will read it.
scripts[] — shared with everyone who opens the repo, each with icon, runOnWorktreeCreate, previewUrl, autoOpenPreview (max N entries).
Two things worth stealing beyond the file itself: every field carries a description annotation that is the schema doc (one source of truth for the file, the schema, and the settings UI), and runOnWorktreeCreate gives the repo a say in worktree provisioning — the checked-in half of #396.
Implemented on branch coder/settings-as-code-layered-config-files-wi-c39838 (commit 37bf94df), kept as JSON by decision. TOML was dropped because "$schema" gives editor autocomplete with no new dependency.
Local layer:solenta.local.json, gitignored and per checkout, sits over solenta.json. Quick actions merge by id (or by name when there is no id), and {"id": "x", "hidden": true} hides a shared entry. The trust hash covers the merged set, so a local edit asks for approval again.
Strict keys: an unknown key is now a file error at the top level, in quick action rows, in devServer and in automation rows.
Migration: Edit project → Move to solenta.json opens a PR from a new worktree thread based on origin's default branch. Stored settings are left in place until the user clears them after the PR merges.
Activity
currentbits commentedon Aug 20, 2026
Concrete prior art for the repo-shared layer: T3's
t3.jsonat the repo root (packages/contracts/src/t3ProjectFile.ts@beab6886). Deliberately tiny — four keys, all optional:$schema—https://t3.codes/schema/t3.json, same editor-autocomplete trick as the TOML design above.iconPath— workspace-relative project icon, checked before built-in icon locations (see Project icons: auto-detected from the repo (favicon, app icon, HTML link), overridable per project #610).defaultThreadEnvMode—"worktree" | "local", where new threads in this repo start. Precedence is explicit and documented in the schema annotation itself: composer pick > per-project setting in the app > checked-int3.json> global default. That is the layering, stated where the person editing the file will read it.scripts[]— shared with everyone who opens the repo, each withicon,runOnWorktreeCreate,previewUrl,autoOpenPreview(max N entries).Two things worth stealing beyond the file itself: every field carries a
descriptionannotation that is the schema doc (one source of truth for the file, the schema, and the settings UI), andrunOnWorktreeCreategives the repo a say in worktree provisioning — the checked-in half of #396.currentbits commentedon Oct 24, 2026
Implemented on branch
coder/settings-as-code-layered-config-files-wi-c39838(commit 37bf94df), kept as JSON by decision. TOML was dropped because"$schema"gives editor autocomplete with no new dependency.solenta.local.json, gitignored and per checkout, sits oversolenta.json. Quick actions merge by id (or by name when there is no id), and{"id": "x", "hidden": true}hides a shared entry. The trust hash covers the merged set, so a local edit asks for approval again.devServerand in automation rows.site/solenta.schema.jsonis meant to be served at https://solenta.app/solenta.schema.json, but it only appears there once the site is deployed.Deliberately skipped (agreed on the thread):
solenta.jsononly from the default branch: the Automations: permission scopes (private vs project-shared) #1590 automations UI writes the working-tree file and reads it back straight away.Tests: the full electron suite passed (5031 tests). New
electron/test/layered-config.test.js; theeditProjectrenderer cases pass.Keep hidden rows' ids and migrated onSettle references (#438 review)
Keep project commands in reviewable config files, with a local overri…
Merge origin/main: layer the env spec under solenta.local.json too (#438