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.
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
hx-postfor token generation instead of the hidden form + redirectThis follows the pattern used by GitHub/GitLab for newly created tokens.