Repository navigation
feat(settings): the Secrets tab edits each dev env file - #86
Merged
flowtricks merged 2 commits intoNov 17, 2026
Merged
Conversation
The Secrets tab read and wrote `.env` only, while the dev server also loads `.env.local`, `.env.development` and `.env.development.local`, later files winning. A key set only in `.env.development` did not show, and a key overridden in `.env.local` showed a value dev does not use. A dropdown under the title now picks one of the four files, listed in load order and opening on `.env`. Every `secrets:*` message names its file, and the parser refuses any other name, `.env.production` included. A row whose name a later file sets again says "Dev uses the value in <file>", worked out in the main process from that file's names alone. Switching files remounts the view, so nothing revealed or typed for one file is shown beside another's names. `.env.development` is usually committed on purpose, for values that are not secret, so the tab offers no .gitignore rule for it and shows no Git warning; `secrets:ignore` refuses it too. The layout keeps every button on one line: the .gitignore offer is the button alone, its explanation in the tooltip, and the tracked warning is shorter. The empty state no longer has a Create button, since adding a secret already creates the file, private; an existing empty file now says it is empty instead of "Adding a secret creates .env". The texts that named `.env` name the chosen file, in the five languages. The MCP tab still stores secrets in `.env`. The Sanity login and the page template env read now share the same file list, so the Sanity login also reads `.env.development.local`.
The "Add to .gitignore" button carries its reason only in its tooltip, and that tooltip was the system's: it waited about a second and a half and, on macOS, did not show again on a second hover. The button now uses the app's delayed tip, as the info mark beside the title does, so the reason shows after the shared wait on every hover. Screen readers still read it as the button's description.
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.
The Secrets tab only showed
.env, but the dev server also loads.env.local,.env.developmentand.env.development.local(later files win). A key set only in.env.developmentwas invisible, and a key overridden in.env.localshowed a value dev doesn't use.What changes
.env..env.developmentgets no .gitignore offer and no Git warning: it's usually committed on purpose..env.Two changes to your existing tab, so you know why
createchange is still in the contract: the MCP tab uses it.Before (no .env yet):

After (no .env yet):

Tests
Contract, main process and panel tests cover each file, the overrides, the .gitignore refusal for
.env.developmentand the file switch clearing revealed values. Full local gate: 974/974.