Skip to content

feat(tangent): manage a project's secrets in a Secrets window - #2941

Merged
camielvs merged 2 commits into
cvs/acting-teamfrom
cvs/tangent-secrets-window
Oct 31, 2026
Merged

camielvs merged 2 commits into
cvs/acting-teamfrom
cvs/tangent-secrets-window

Conversation

@camielvs

@camielvs camielvs commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Tangent's project dock gains a Secrets window when the project's workspace maps to a team. It lists the workspace's secrets, the ones runs in the project use when they act as the team. Your own secrets stay in Settings → Secrets. The copy calls the team the workspace: a team takes its workspace's name, and the workspace is what people know it by.

  • In a team's project, the window is headed "Workspace: {workspace}", with the team id as its tooltip. Add ("Add a workspace secret"), replace and delete act as the team. A member whose role can't write sees the list without those actions. Hiding them is the only guard, since the backend doesn't check write access on /api/secrets/.
  • A project whose workspace has no team gets no Secrets window, since it has no workspace secrets. The window opens once the team is known, so it never appears and then vanishes, and it closes when you move to a project without a team.
  • When the project has a team you can't act as (not a member, refused by the backend, or the lookup failed), the window says the workspace's secrets aren't available, and why. It doesn't list your own secrets in their place, where they would pass for the workspace's.

A team's name carries the workspace icon wherever it's written into copy, with the team id on hover, the icon centred on the text. TeamName does this for the add dialog, the delete confirmation and the window's notice. The replace dialog shows the secret's key icon at its top left, like the secret's row.

Deleting a workspace secret is titled Delete shared secret "{name}"? and says it's removed for the whole workspace, naming it in bold: "This removes the secret from the {workspace} workspace. Runs that use it will fail. This can't be undone." ConfirmationDialog takes any node as its description, so the name carries its icon there, and TeamName's bold sets the name in semibold and the icon at a matching stroke. Settings → Secrets keeps its wording, which has no workspace.

The add and replace controls take an optional team id, and the delete control an optional team. Each invalidates that team's cache key. Their failure toasts now show the backend's reason, which matters once a request can be refused for acting as a team.

Related Issue and Pull requests

Type of Change

  • New feature

Line Breakdown

Category Added Removed
Production code 506 38
Tests 746 25
Config / CI / tooling 1 0
Total 1253 63

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

None yet.

Test Instructions

pnpm vitest run src/routes/v2/pages/Tangent src/components/shared/Teams src/components/shared/SecretsManagement

On a deployment with team impersonation, you need:

  • the host page setting window.__TANGLE_TEAM_IMPERSONATION__;
  • a workspace whose teamId metadata is a team's id;
  • you as a member of that team.

Then:

  1. Open a Tangent project in that workspace and open the Secrets window. It's headed "Workspace: {workspace}". Adding a secret there adds it to the team. Deleting one asks first, saying it's removed from the workspace.
  2. Open a project in a workspace with no team. There's no Secrets window, and coming from step 1 it closes.
  3. Open a project whose team you're not in. The window says the workspace's secrets aren't available because you're not in it, and lists none.

Without the impersonation config, no project has a Secrets window.

Additional Comments

The React Compiler now covers src/components/shared/Teams.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: cvs/tangent-secrets-window/f3d06a4

@camielvs
camielvs added this pull request to stack #2930 October 22, 2026 22:34
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch from 9086ffb to 954d167 Compare October 23, 2026 22:58
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch from 954d167 to 49949eb Compare October 23, 2026 23:50
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch 2 times, most recently from 384ee3e to 7cba35a Compare October 27, 2026 00:59
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch from 7cba35a to 71dfa24 Compare October 27, 2026 17:33
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch from 71dfa24 to cfb14fb Compare October 28, 2026 19:43
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch 3 times, most recently from fabc188 to c23f7b9 Compare October 29, 2026 19:45
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch from c23f7b9 to 5e5915b Compare October 29, 2026 20:21
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch from 5e5915b to 78b74bd Compare October 29, 2026 20:42
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch from 78b74bd to 333d683 Compare October 29, 2026 23:33
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch 2 times, most recently from 01fc4e0 to 26e05a3 Compare October 30, 2026 18:51
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch from 26e05a3 to dd28aec Compare October 30, 2026 20:35
@camielvs
camielvs marked this pull request as ready for review October 30, 2026 21:23
@camielvs
camielvs requested a review from a team as a code owner October 30, 2026 21:24
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch from dd28aec to 348613b Compare October 30, 2026 21:46
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch 2 times, most recently from 4e9eec3 to 3eaca13 Compare October 31, 2026 00:08
camielvs and others added 2 commits October 30, 2026 17:12
Tangent's project dock gains a Secrets window when the project's
workspace maps to a team. It lists the workspace's secrets, the ones
runs in the project use when they act as the team. Your own secrets
stay in Settings → Secrets.

The copy calls the team the workspace. A team takes its workspace's
name, and the workspace is what people know it by.

- In a team's project the window is headed "Workspace: <workspace>" with
  the team id as its tooltip, and add, replace and delete act as the
  team. A member whose role can't write sees the list without those
  actions. Hiding them is the only guard, since the backend doesn't
  check write access on `/api/secrets/`.
- A project whose workspace has no team has no workspace secrets, so it
  gets no Secrets window. The window opens once the team is known, so
  it never appears and then vanishes.
- When the project has a team but you can't act as it (not a member,
  refused by the backend, or the lookup failed), the window says the
  workspace's secrets aren't available and why. It doesn't list your
  own secrets in their place, where they would pass for the
  workspace's.

The add, replace and delete controls take an optional team id and
invalidate that team's cache key. Their failure toasts now show the
backend's reason, which matters once a request can be refused for
acting as a team.

From #2886: the dock registration and its order test, `ListRowIcon`,
and the secret row's look. Replace and delete are inline buttons rather
than a menu, so the row reuses the confirming delete button. Settings →
Secrets stays your own secrets.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Feedback from the first staging pass.

- A team's name, which is its workspace's, now carries the workspace
  icon wherever it's written into copy, with the team id on hover.
  `TeamName` does this, and the add dialog, the delete confirmation and
  the window's notice use it. Its 12px icon sits 0.1em below the
  baseline, which centres it on the capitals of both 12px and 14px
  text. `bold` sets the name in semibold and the icon at stroke 3, the
  weight that matches. The React Compiler covers
  `src/components/shared/Teams`, where it lives.
- Deleting a workspace secret asks 'Delete shared secret "<name>"?'
  and says it's removed for the whole workspace, named in bold: "This
  removes the secret from the <workspace> workspace. Runs that use it
  will fail. This can't be undone." `ConfirmationDialog` now takes any
  node as its description, so the name carries its icon there too.
- Adding a secret is titled "Add a workspace secret".
- The replace dialog shows the secret's key icon at its top left, like
  the secret's row.
- The empty-state line under the list is gone. The add button is enough.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@camielvs
camielvs force-pushed the cvs/tangent-secrets-window branch from 3eaca13 to f3d06a4 Compare October 31, 2026 00:12
@camielvs
camielvs merged commit 252eea0 into master Oct 31, 2026
18 checks passed
@camielvs
camielvs deleted the cvs/tangent-secrets-window branch October 31, 2026 00: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.

2 participants