Skip to content

Keep project commands in reviewable config files, with a local override and a one-click migration PR (#438) - #1708

Merged
currentbits merged 2 commits into
mainfrom
coder/settings-as-code-layered-config-files-wi-c39838
Oct 24, 2026
Merged

currentbits merged 2 commits into
mainfrom
coder/settings-as-code-layered-config-files-wi-c39838

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Project commands can now live in reviewable, layered config files, not just Solenta's store. A gitignored solenta.local.json overrides the shared solenta.json on one checkout. Both files are checked against a published JSON schema, and a button moves the commands that are still app-only into solenta.json through a PR. Closes #438.

Changes

  • solenta.local.json layer. Setup and onSettle replace the shared ones. Quick actions merge with solenta.json by id (or by name), and {"id": "test", "hidden": true} hides a shared entry on this checkout. The trust hash covers the merged set, so a local edit asks for approval again. A shared-only file keeps its existing hash and repo:<index> button ids. App settings still win over both files.
  • Unknown keys are file errors. This covers the top level, quick action rows, devServer and automation rows, so a typo like setpu shows in Edit project instead of being ignored. "$schema": "https://solenta.app/solenta.schema.json" gives editor autocomplete; the schema lives at site/solenta.schema.json, and a test pins it to the parser's key set.
  • Edit project → Move to solenta.json. It starts a new worktree thread from origin's default branch, writes the saved setup and quick actions into solenta.json (other keys kept, $schema first), gitignores solenta.local.json, commits and opens a PR through the existing createPr. Saved settings stay until the user clears them after the merge, so nothing changes before review.

Verification

  • Full npm run test:electron before rebasing: 5031/5031 pass. After rebasing onto main, the related electron suites pass (165) and so do the editProject/threadHeader renderer tests (100). npm run typecheck (including the preload sync check) and npx vite build pass.
  • electron/test/layered-config.test.js runs the migration against a real git repo with a bare origin. The checkout sits on an unrelated branch, and the test asserts the PR branch has only the one commit and the expected solenta.json/.gitignore. It stops at createPr because a local origin isn't a forge. Not tested: opening a real GitHub PR from the button.

Notes for reviewers

  • Stricter parsing. An existing solenta.json with stray keys, or two quick actions with the same name, now shows an error instead of loading.
  • Typo isolation. The top-level check sits in the commands parser, so a typo blocks the file's commands but not its automations or dev-server probe.
  • Schema URL. It only resolves after the site is deployed.
  • Left out on purpose. Reading solenta.json only from the default branch (it would break the Automations: permission scopes (private vs project-shared) #1590 write-then-read automations UI), the org-managed layer, and TOML.

claude-opus-5-5 via Claude Code
🤖 Generated with Claude Code

…e-to-solenta.json PR (#438)

- solenta.local.json (gitignored, per checkout) layers over solenta.json:
  setup/onSettle replace, quickActions merge by id (or name) and a local
  {"id": ..., "hidden": true} hides a shared entry. Trust hashes the
  merged set; shared-only files keep their hash and button ids.
- Unknown keys in solenta.json / solenta.local.json (top level, quick
  action rows, devServer, automation rows) are file errors, not ignored.
- site/solenta.schema.json, served at solenta.app, gives "$schema"
  editor autocomplete; a test pins it to the parser's key set.
- Edit project > Move to solenta.json: a new worktree thread from
  origin's default branch writes the stored setup + quick actions into
  solenta.json, gitignores solenta.local.json and opens a PR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T10:50:46.978349Z 5a829db PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 5a829db906

ℹ️ 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".

Comment thread electron/configMigrate.js Resolved
Comment thread electron/repoConfig.js Resolved
@currentbits
currentbits merged commit c66a224 into main Oct 24, 2026
6 checks passed
currentbits pushed a commit that referenced this pull request Oct 24, 2026
)

#1708 added solenta.local.json and its own setupSource; both now share
one field. A local or shared solenta.json setup still beats the repo's
env spec.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Settings as code: layered config files with schema, repo-shared layer, migration flow

1 participant