#14 [Task]: Improve secret creation and token result dialogs
Originally created by: thomijasir
Originally owned by: thomijasir
Task description
Improve the frontend flows for creating secrets and viewing newly created runner and AI tokens.
This work is limited to the web UI. Do not change how empty secret values work in the CLI.
Allow an intentional empty secret value
The create-secret dialog currently rejects an empty value. Add a checkbox labeled Use empty value so users can save an empty string intentionally.
Expected behavior:
- The value field is required by default.
- Selecting
Use empty valuedisables the value field and submits an empty string. - Clearing the checkbox enables the field again and restores normal validation.
- The dialog makes the choice clear so an accidental blank value is not silently accepted.
- Existing CLI behavior remains unchanged.
Fix token copy actions
After creating a runner token, the one-time token dialog has a Copy button that does not work. The AI token creation flow has the same problem.
- Fix copying in both flows.
- Copy the complete plaintext token to the clipboard.
- Show clear success feedback after copying.
- If clipboard access fails, keep the token selectable and show a useful error.
- Add tests for both runner and AI token copy actions.
Redesign the token result layout
Redesign the one-time token result state for both runner and AI tokens. The current hierarchy and button placement are awkward.
The new layout should:
- Give the plaintext token the strongest visual emphasis.
- Place Copy next to the token value.
- Keep the one-time visibility warning close to the token.
- Make the final action, such as Done, easy to find without competing with Copy.
- Work at narrow and wide viewport sizes.
- Support keyboard navigation and expose useful accessible labels and status feedback.
- Use the same visual pattern for runner and AI tokens where their behavior matches.
Acceptance criteria
- [ ] The create-secret dialog requires a value unless
Use empty valueis selected. - [ ] Selecting the checkbox disables the value field and saves an empty string.
- [ ] Clearing the checkbox restores non-empty validation.
- [ ] No CLI behavior changes are included.
- [ ] Copy works after creating a runner token.
- [ ] Copy works after creating an AI token.
- [ ] Both flows show copy success and failure feedback.
- [ ] Runner and AI token result states use a consistent, responsive layout.
- [ ] Keyboard and screen-reader behavior is covered.
- [ ] Frontend tests cover the empty-value option, copy actions, and relevant dialog states.
Ticket changed by: dopbase