feat: add Settings page with API tokens and account deletion#81
Merged
tomasz-tomczyk merged 12 commits intomainfrom Apr 10, 2026
Merged
feat: add Settings page with API tokens and account deletion#81tomasz-tomczyk merged 12 commits intomainfrom
tomasz-tomczyk merged 12 commits intomainfrom
Conversation
Introduces a new on_mount hook that works for both selfhosted and hosted users, plus skeleton SettingsLive at /settings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deletes user, cascading to API tokens and device codes. Reviews are preserved with user_id set to nil via DB cascade. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GitHub-style layout with sidebar navigation. Includes API token management (create/revoke) and account deletion with typed confirmation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers token CRUD, delete account with confirmation flow, and account info display. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updates dashboard header to link to Settings. Removes TokensLive since its functionality is now part of SettingsLive. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Non-selfhosted users now land on /settings instead of /dashboard (which would redirect to / since dashboard is selfhosted-only). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The settings tests don't need oauth_provider configured globally. Removing it fixes test isolation issues with DashboardLiveTest and allows the test module to run with async: true. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Redirects to / instead of /auth/login when no OAuth provider is configured, preventing a 500 error from nil strategy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
phoenix_html.js only handles data-confirm for elements with data-method (e.g. <.link method="delete">), not for LiveView phx-click buttons. This caused the Revoke button on the settings page to silently fail — no event reached the server. Add a capture-phase click handler that intercepts data-confirm on phx-click elements: shows the native confirm dialog, blocks the event on cancel, and temporarily strips data-confirm on confirm to prevent phoenix_html.js from showing a duplicate dialog. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
phoenix_html.js already handles data-confirm on all clicked elements, including phx-click buttons — it dispatches a phoenix.link.click custom event that checks for data-confirm and shows window.confirm(). The capture-phase handler added in 5cd7e62 was unnecessary and could cause double-confirm dialogs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1d44085 to
c648a08
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/settingsaccessible to all authenticated users (selfhosted and hosted)/tokenspage):require_userLiveView hook that works in both selfhosted and hosted modes/settingsinstead of/dashboardTest plan
/settingswithout auth → redirected to OAuth loginmix precommitpasses (381 tests, 0 failures)🤖 Generated with Claude Code