Skip to content

feat(site): show required workspace secrets#24787

Closed
dylanhuff-at-coder wants to merge 8 commits into
mainfrom
split/plat-100-required-secrets-ui
Closed

feat(site): show required workspace secrets#24787
dylanhuff-at-coder wants to merge 8 commits into
mainfrom
split/plat-100-required-secrets-ui

Conversation

@dylanhuff-at-coder

@dylanhuff-at-coder dylanhuff-at-coder commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Adds a required secrets table to workspace creation and workspace parameter flows.

Missing required secrets are shown with recovery guidance and block create/update submission until the backend reports the requirements are satisfied.

Also guards dynamic-parameter WebSocket consumers against stale responses so older parameter evaluations do not overwrite newer input.

This PR description update was generated by Coder Agents.

dylanhuff-at-coder commented Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-secret-live-refresh branch from d1c033e to bc9d432 Compare April 28, 2026 15:08
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-required-secrets-ui branch from 65784a6 to f4eec23 Compare April 28, 2026 15:08
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-required-secrets-ui branch from f4eec23 to d0134af Compare April 28, 2026 15:41
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-secret-live-refresh branch from bc9d432 to a107410 Compare April 28, 2026 15:41
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-required-secrets-ui branch from d0134af to e821140 Compare April 28, 2026 18:53
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-secret-live-refresh branch from a107410 to 38a6a00 Compare April 28, 2026 18:53
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-required-secrets-ui branch 2 times, most recently from 631fded to d04b277 Compare April 28, 2026 19:33
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-secret-live-refresh branch from 38a6a00 to e3033de Compare April 29, 2026 16:36
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-required-secrets-ui branch 2 times, most recently from 917431f to b4793e7 Compare April 29, 2026 16:42
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-secret-live-refresh branch 2 times, most recently from e55e194 to e760f0b Compare April 29, 2026 17:24
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-required-secrets-ui branch from b4793e7 to 13f3d49 Compare April 29, 2026 17:24
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-secret-live-refresh branch 2 times, most recently from 9f4db1e to 6605621 Compare May 4, 2026 15:40
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-required-secrets-ui branch from 13f3d49 to 04f8a03 Compare May 4, 2026 15:40
Base automatically changed from split/plat-100-secret-live-refresh to main May 6, 2026 16:27
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-required-secrets-ui branch from 04f8a03 to 56d70e9 Compare May 6, 2026 16:34
@dylanhuff-at-coder
dylanhuff-at-coder force-pushed the split/plat-100-required-secrets-ui branch from 56d70e9 to 295d95d Compare May 6, 2026 16:47
@dylanhuff-at-coder

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid work: the SecretsTable component is clean, accessible (aria-label on table, sr-only status text, focus-visible on tooltip triggers), and the Storybook coverage is thorough with play functions that verify sort order, tooltip content, link targets, and button disabled state. The multi-layer submission blocking (disabled button + formik onSubmit + controller handleSubmit) is the right pattern. The wsResponseId fix is a real correctness improvement applied consistently.

3 P2, 12 P3, 2 Nit, 2 Note. The P2s: auto-create bypasses the new secrets gate, the "account settings" copy misleads every user who sees it, and there is no re-check path after adding a secret via CLI. Most P3s are convergent across multiple reviewers.

The wsResponseId fix is correct and necessary but is a separate concern from the secrets feature. If the secrets feature is reverted, the fix goes with it. Consider extracting it to a separate commit.

"The user sees parameters jump to an intermediate state then back, which is the exact scenario the WorkspaceParametersPage guard was written to prevent." (Knov, on the missing stale-response guard)


site/src/pages/CreateWorkspacePage/CreateWorkspacePage.tsx:248

P2 [DEREM-4] Auto-create path bypasses the new secret requirements check. autoCreateReady checks hasAllRequiredExternalAuth and autoCreateConsented but never checks whether secrets are satisfied. A user (or deep link) hitting ?mode=auto with a template that requires unset secrets submits the build without the frontend gate this PR promises.

The external auth check at lines 255-277 proves the auto-create path is expected to enforce prerequisites. The omission is a gap, not a design boundary.

Could we add && !secretsBlocking (or a similar check on latestResponse?.secret_requirements) to the autoCreateReady condition, and add an auto-mode abandonment block parallel to the external auth one?

(Mafuuu)

🤖

🤖 This review was automatically generated with Coder Agents.

Comment thread site/src/modules/workspaces/SecretsTable/SecretsTable.tsx Outdated
Comment thread site/src/modules/workspaces/SecretsTable/SecretsTable.tsx Outdated
Comment thread site/src/pages/CreateWorkspacePage/CreateWorkspacePage.tsx
Comment thread site/src/pages/CreateWorkspacePage/CreateWorkspacePage.tsx
Comment thread site/src/modules/workspaces/SecretsTable/SecretsTable.tsx Outdated
Comment thread site/src/modules/workspaces/SecretsTable/SecretsTable.tsx Outdated
Comment thread site/src/modules/workspaces/SecretsTable/SecretsTable.tsx Outdated
Comment thread site/src/modules/workspaces/SecretsTable/SecretsTable.stories.tsx Outdated
@dylanhuff-at-coder
dylanhuff-at-coder marked this pull request as ready for review May 13, 2026 21:20
@dylanhuff-at-coder

Copy link
Copy Markdown
Contributor Author

Demo of the this work, showing page updating without reloading on user secret changes
https://github.com/user-attachments/assets/008880a2-91c5-49cf-b17f-e0aa4b420757

@tracyjohnsonux

tracyjohnsonux commented May 16, 2026

Copy link
Copy Markdown
Contributor

I marked a bunch of non-critical hopefully easy update text items

One item I flagged was the warning banner style. I added the correct styling in figma. These should already be present in the frontend.
https://www.figma.com/design/tpa9Tfxw3C9cbRQLEwyxHd/Secrets?node-id=450-5452&t=EOpSx8Gj2VzruhvI-4

image

@dylanhuff-at-coder

Copy link
Copy Markdown
Contributor Author

@tracyjohnsonux Thanks for the feedback in Chromatic, I addressed all the comments raised and this PR is ready for another review

@dylanhuff-at-coder

Copy link
Copy Markdown
Contributor Author

Closing this PR as we are pivoting away from template secret requirements

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