feat(mcp): add account settings web UI for YT instance #123

Merged
Claude-Run merged 1 commit from feat/YT-70-account-web-ui into main 2026-07-17 17:54:23 +02:00
Member

Give a signed-in local account a self-service settings surface at /account, the landing page after sign-in. It shows identity, TOTP state, and instance connection state, and hosts the actions a user now owns end to end: change password (gated on the current password), re-enrol or reset TOTP, regenerate recovery codes, connect / test / disconnect the YouTrack instance, and delete the account.

Deleting cascades in the database to the instance row, the recovery codes, and every app-issued authorization code / access / refresh token, and clears the stateless session cookie, so no credential outlives the account.

Saving an instance now tests the base URL and token against GET /api/users/me before trusting them, records the resolved login, and stores verified_at on success. A failing test is classified into one of three actionable outcomes (token rejected, host unreachable, or URL not YouTrack) and never surfaces the raw upstream body. The same test is available on demand via POST /instance/test. The instance page names where YouTrack mints a token (Profile -> Account Security -> Tokens, YouTrack scope) and mentions neither Hub registration nor an admin scope, since needing neither is why Hub OAuth was dropped.

The stored token stays write-only: no template carries a token field, so it is never rendered back. Every handler is scoped to the signed-in account, so one account cannot read, test, or remove another's instance.

#YT-70

Give a signed-in local account a self-service settings surface at `/account`, the landing page after sign-in. It shows identity, TOTP state, and instance connection state, and hosts the actions a user now owns end to end: change password (gated on the current password), re-enrol or reset TOTP, regenerate recovery codes, connect / test / disconnect the YouTrack instance, and delete the account. Deleting cascades in the database to the instance row, the recovery codes, and every app-issued authorization code / access / refresh token, and clears the stateless session cookie, so no credential outlives the account. Saving an instance now tests the base URL and token against `GET /api/users/me` before trusting them, records the resolved login, and stores `verified_at` on success. A failing test is classified into one of three actionable outcomes (token rejected, host unreachable, or URL not YouTrack) and never surfaces the raw upstream body. The same test is available on demand via `POST /instance/test`. The instance page names where YouTrack mints a token (Profile -> Account Security -> Tokens, YouTrack scope) and mentions neither Hub registration nor an admin scope, since needing neither is why Hub OAuth was dropped. The stored token stays write-only: no template carries a token field, so it is never rendered back. Every handler is scoped to the signed-in account, so one account cannot read, test, or remove another's instance. #YT-70
feat(mcp): add account settings web UI for YT instance
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 35s
Create release / Create release from merged PR (pull_request) Has been skipped
0df241ebb5
Give a signed-in local account a self-service settings surface at `/account`, the landing page after sign-in. It shows identity, TOTP state, and instance connection state, and hosts the actions a user now owns end to end: change password (gated on the current password), re-enrol or reset TOTP, regenerate recovery codes, connect / test / disconnect the YouTrack instance, and delete the account.

Deleting cascades in the database to the instance row, the recovery codes, and every app-issued authorization code / access / refresh token, and clears the stateless session cookie, so no credential outlives the account.

Saving an instance now tests the base URL and token against `GET /api/users/me` before trusting them, records the resolved login, and stores `verified_at` on success. A failing test is classified into one of three actionable outcomes (token rejected, host unreachable, or URL not YouTrack) and never surfaces the raw upstream body. The same test is available on demand via `POST /instance/test`. The instance page names where YouTrack mints a token (Profile -> Account Security -> Tokens, YouTrack scope) and mentions neither Hub registration nor an admin scope, since needing neither is why Hub OAuth was dropped.

The stored token stays write-only: no template carries a token field, so it is never rendered back. Every handler is scoped to the signed-in account, so one account cannot read, test, or remove another's instance.

#YT-70
Claude-Run deleted branch feat/YT-70-account-web-ui 2026-07-17 17:54:23 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/youtrack-cli!123
No description provided.