/settings/ai edits the household's AI settings: Provider and Model pill
dropdowns (model list from GET /settings/ai/models plus "Type a model
id"), the API key as its masked last four with a Replace sheet that PUTs
the key then verifies it ("Verified · Oct 1" or the verify error), the
Creativity (temperature) slider, the mono system prompt, Reset (confirms,
then reset-prompt) and Save changes (PATCHes only the edited fields).
A 400 from the endpoint lock says to remove the key before switching
provider; the sheet's Remove key does that.
Unsaved changes are guarded on leaving: the app now runs under a data
router (createBrowserRouter) so the page can use useBlocker, plus
beforeunload for reloads and closing the tab.
Adds the Select pill-dropdown primitive. The test helper declaredStyle
skips pseudo-element rules, which jsdom cannot match.
Maestro task: a0847bb7-54d0-4244-ab15-f82500d0fa7f
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
51 lines
924 B
CSS
51 lines
924 B
CSS
.field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-2);
|
|
min-width: 0;
|
|
}
|
|
|
|
.label {
|
|
font-family: var(--font-body);
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
color: var(--color-neutral-700);
|
|
}
|
|
|
|
.control {
|
|
position: relative;
|
|
display: block;
|
|
}
|
|
|
|
.select {
|
|
appearance: none;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
min-width: 44px;
|
|
height: 56px;
|
|
padding: 0 36px 0 16px;
|
|
border: 1px solid var(--color-neutral-300);
|
|
border-radius: var(--radius-pill);
|
|
background: var(--color-surface);
|
|
color: var(--color-text);
|
|
font-family: var(--font-body);
|
|
font-size: 15px;
|
|
font-weight: 700;
|
|
text-overflow: ellipsis;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.select:disabled {
|
|
opacity: 0.45;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* The chevron sits over the select's right padding and lets taps through. */
|
|
.chevron {
|
|
position: absolute;
|
|
top: 50%;
|
|
right: 14px;
|
|
transform: translateY(-50%);
|
|
pointer-events: none;
|
|
}
|