Skip to content

Show generated token inline in sources table #1911

@Simrayz

Description

@Simrayz

After generating a token for a source system, show the token value inline in the sources table row instead of (only) in a toast notification.

Motivation

The current flow puts the token in a toast that auto-closes. Tokens can't be retrieved after creation (hashed at rest), so if the user misses the toast they have to regenerate. This came up in review of #1901.

Proposed solution

  • Use hx-post for token generation instead of the hidden form + redirect
  • Return an HTMX partial that swaps the row to include the token value in a read-only text field with a copy-to-clipboard button
  • The token is only visible until the next page load (session-transient)
  • Keep a brief success toast for confirmation, but without the token value

This follows the pattern used by GitHub/GitLab for newly created tokens.

Metadata

Metadata

Assignees

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions