Skip to content

Manage project environments from the workspace - #17

Merged
sirsjg merged 1 commit into
mainfrom
feat/environment-management
Sep 9, 2026
Merged

sirsjg merged 1 commit into
mainfrom
feat/environment-management

Conversation

@sirsjg

@sirsjg sirsjg commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a Manage control at the end of the environment tab row that opens an environment manager: add, rename, reorder, protect, and delete environments using the existing API endpoints. Controls are gated by role to mirror the authorization matrix; the server still enforces everything.
  • Deleting an environment that holds secrets requires an explicit second confirmation, and the workspace drops the orphaned secrets, repairs the active tab and diff baseline, and refreshes the matrix.
  • Project responses now include a live environments array (id, name, slug, protected, display order). Project cards read it instead of settings.defaultEnvironments, and manager edits update the card in place. docs/openapi.json regenerated.
  • Fixes the cross-environment matrix: cell contents are packed to the top so markers line up across columns, and the consistency report orders environments by display order rather than by id.

Test plan

  • npm run typecheck
  • Web unit tests (23), projects and API unit tests
  • Playwright e2e (9 specs, including a new environments.spec.ts covering add, reorder, rename, protect, duplicate-slug error, both delete paths, and card sync)
  • npm run docs:check
  • Postgres integration suite runs in CI (no local database); it exercises the new project environments subquery

🤖 Generated with Claude Code

https://claude.ai/code/session_01BYWxxR2NNnYAt3CyVfBpUv

Add an environment manager sheet to the project workspace so environments
can be added, renamed, reordered, protected, and deleted without leaving
the vault. Controls follow the authz matrix: members create and edit,
owners and admins also delete, read-only members never see the entry
point. Deleting an environment that still holds secrets asks for an
explicit second confirmation.

Project responses now carry the live environment list in display order,
so project cards reflect the real environments rather than the defaults
setting that only seeds a new project. The workspace pushes manager edits
back to the shell so cards update without a reload.

Also fix two matrix issues in the cross-environment diff: cells now pack
their lines to the top so the presence and change markers line up across
columns, and the consistency report orders environments by display order
instead of by id.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BYWxxR2NNnYAt3CyVfBpUv
@sirsjg
sirsjg merged commit 20ba1b3 into main Sep 9, 2026
9 checks passed
@sirsjg
sirsjg deleted the feat/environment-management branch September 9, 2026 02:25
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.

1 participant