Repository navigation
web: Secrets page for the computer's organization secrets (095 step 3) - #987
Merged
Merged
Conversation
…tep 3) Lists the organization layer from GET /computer/secrets with who last set each name, when a session last got it, and how many Slack thread or personal copies override it. Add, replace (never prefilled) and delete call the public Computer API routes, which already accept a dashboard session; History reads the per-name events. apiFetch gains a base so the dashboard can call /api.
Drops the overridden warning, history, kind and file options, and the updated/last-used columns, per review: v1 shows the name and lets the organization set it.
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.
Step 3 of 095: the dashboard page for the computer's organization secrets. It uses the API from diggerhq/blue#332 and #986, both merged and deployed.
Requested by @mohamed Habib in Slack.
Scope: per review, the page only lists secret names and lets members add, replace and delete them, with a short note below the list: these are organization-wide, and a Slack thread or person can override a value in Slack. It leaves out override counts, history, variable and file options, and updated or last-used columns. The API still supports those.
Decisions and risks
/api/managed-agents/computer/secrets…routes, which already accept a dashboard session cookie (same-origin check included).apiFetchgains abaseparameter (/apior the default/api/dashboard)./computer/secrets.Review map:
ComputerSecrets.tsx(page and dialogs),computer-secrets-api.ts, small edits toclient.ts,App.tsxandapp-shell-nav.ts, and preview mocks inmock.ts(?secrets=nonefor the empty state).Verification:
tsc -bclean, eslint clean on the changed files, the newComputerSecrets.test.tsxpasses 5/5 (list, empty, add with a refused name, replace, delete confirm), andapp-shell.test.tspasses. The screenshots come from preview mode, with no real data.