Reorganize Settings sections + add LLM model/prompt configs (#116)

* Reshuffle/organize settings UI
* Settings: AI prompt display/minor touch-ups
* API key settings tests
* Moved import/export together
* Collapsible LLM prompt DIVs
* Add export tests
This commit is contained in:
Juan José Mata
2025-08-22 11:43:24 -07:00
committed by GitHub
parent fb6e094f78
commit d054cd0bb2
38 changed files with 1036 additions and 420 deletions

View File

@@ -10,10 +10,9 @@ class Settings::ApiKeysTest < ApplicationSystemTestCase
test "should show no API key state when user has no active keys" do
visit settings_api_key_path
assert_text "Create Your API Key"
assert_text "Get programmatic access to your Maybe data"
assert_text "Access your account data programmatically"
assert_text "API Key"
assert_link "Create API Key", href: new_settings_api_key_path
assert_text "Access your account data programmatically"
end
test "should navigate to create new API key form" do
@@ -33,7 +32,7 @@ class Settings::ApiKeysTest < ApplicationSystemTestCase
fill_in "API Key Name", with: "Test Integration Key"
choose "Read/Write"
click_button "Create API Key"
click_button "Save API Key"
# Should redirect to show page with the API key details
assert_current_path settings_api_key_path
@@ -100,7 +99,7 @@ class Settings::ApiKeysTest < ApplicationSystemTestCase
fill_in "API Key Name", with: "New API Key"
choose "Read Only"
click_button "Create API Key"
click_button "Save API Key"
# Should redirect to show page with new key
assert_text "New API Key"
@@ -133,8 +132,8 @@ class Settings::ApiKeysTest < ApplicationSystemTestCase
# Wait for redirect after revoke
assert_no_selector "#confirm-dialog"
assert_text "Create Your API Key"
assert_text "Get programmatic access to your Maybe data"
assert_text "API Key"
assert_text "Access your account data programmatically"
# Key should be revoked in the database
api_key.reload
@@ -167,7 +166,7 @@ class Settings::ApiKeysTest < ApplicationSystemTestCase
# Try to submit without name
choose "Read Only"
click_button "Create API Key"
click_button "Save API Key"
# Should stay on form with validation error
assert_current_path new_settings_api_key_path