🤖 feat: secrets management in Settings → Projects#2139
🤖 feat: secrets management in Settings → Projects#2139ammar-agent wants to merge 26 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9760618e4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30646883f9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebb7311056
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
@codex review Addressed the previous race condition comment - the new |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da82e2fe2a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ad4aa6cc9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1faf0aca4e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 945c2a37f0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
src/browser/components/Settings/sections/ProjectSecretsSection.tsx
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcab0eb50a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 380967f25e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5620739b26
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
0c91777 to
eb5d1bb
Compare
- Add 'Import from...' dropdown in the secrets modal that lists other projects - Fetch and merge secrets from selected source project - Skip existing keys (by uppercase comparison) to avoid overwriting - Add UI test to verify import behavior and key preservation
Address Codex review comment: use setSecrets((current) => ...) to avoid race conditions when user edits secrets while import is in-flight. Also improve test consistency: - Use setupTestDom() helper - Keep import './dom' for Radix bootstrap side effects
- Move 'Import from...' dropdown above the secrets list for better visibility - Add SecretsModalWithImport story to capture the feature visually - Story sets up two projects with secrets and opens the modal via play function
Address Codex review: prevent race where user clicks Save before import completes, which would close modal without persisting imported secrets.
- Create new ProjectSecretsSection component for inline secrets editing - Integrate secrets UI into ProjectSettingsSection with proper heading - Remove standalone SecretsModal component - Update ProjectSidebar key icon to open Settings → Projects (via openProjectSettings) - Tooltip changed from 'Manage secrets' to 'Project settings' - Update story: SecretsModalWithImport → ProjectSettingsWithSecrets - Update UI test to work with Settings modal flow The secrets UI now lives in Settings → Projects, keeping all project-level configuration in one place. Import from other projects still works the same way.
Add ref tracking to handleImportFromProject to discard results if the user switches projects while an import is in flight. Addresses Codex review comment about race condition.
- Replace KeyRound with Settings icon - Update aria-label from 'Manage secrets for X' to 'Settings for X' - Use standard hover colors instead of yellow - Update test and story selectors
The :has-text pseudo-class is Playwright-specific and throws in happy-dom.
Add onSecretsChanged callback to notify parent when secrets are saved, so MCP section's secret key validation reflects new keys immediately.
Ensures the ref is updated synchronously before any state updates in the same render cycle when project changes.
Return early when projectPath is empty to avoid: - Loading secrets for empty path during initial Settings render - Saving secrets to empty path if user somehow triggers save
Add confirmation prompt when user tries to switch projects in dropdown while secrets have unsaved changes, preventing accidental data loss.
When clicking sidebar settings button while modal is open, use handleProjectChange to trigger the confirmation prompt.
5fb093f to
b0a85e0
Compare
Summary
Moves secrets management from a standalone modal into the Settings → Projects section, keeping all project-level configuration in one place. The sidebar project icons have been updated to use a Settings gear icon that opens the full project settings page.
Background
The original implementation added a separate SecretsModal opened via a key icon on each project header. This worked but meant project secrets were separate from other project settings (like MCP servers). Consolidating into Settings → Projects provides a more consistent UX.
Implementation
ProjectSecretsSectioncomponent: Inline secrets editor with Add/Import/Save/Discard functionalityProjectSettingsSection: Added as a new section between the project selector and MCP ServersProjectSidebar: Settings icon (was key icon) now opens Settings → Projects viaopenProjectSettings()SecretsModal: No longer neededKey behaviors preserved:
New behaviors:
Race condition fixes (Codex feedback):
useLayoutEffectfor ref update to avoid stale import writesprojectPathduring initial Settings renderisImportingstate when project changesValidation
SecretsModalWithImport→ProjectSettingsWithSecretsmake static-checkpassesTEST_INTEGRATION=1 bun x jest tests/ui/secretsImport.integration.test.tsGenerated with
mux• Model:anthropic:claude-opus-4-5• Thinking:high• Cost:$15.53