Files
PaperClipAI/ui/src/components/task-chat/composer-run-settings.css
T
DottaandPaperclip 4a8178e9cf fix(ui): stabilize composer model selection and refine effort slider (#15444)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Task composers let users select an agent, a model, and an effort
level.
> - The model label changes width when users move the effort slider.
> - This movement makes the control harder to use.
> - This pull request keeps the label fixed while the picker is open.
> - A larger slider gives clearer feedback during selection.

## Linked Issues or Issue Description

**What existing behavior does this improve?**
The shared model and effort picker in task composers.

**Current behavior**
The trigger shows each effort change while the picker is open. Different
label lengths move the control. The slider is small.

**Proposed behavior**
The trigger shows “Select model” while any picker view is open. It shows
the selected model and effort after the picker closes. The slider has a
thicker track and a larger thumb with hover and press feedback.

**Reason and benefit**
Users can change effort without moving the trigger. The larger thumb
gives clearer pointer feedback.

## What Changed

- Keep the trigger text fixed while the picker is open.
- Add slider size and feedback tokens.
- Remove the gray input outline and thumb border. Show keyboard focus on
the thumb.
- Keep a thumb focus outline when Windows high contrast suppresses
shadows.
- Keep native keyboard and pointer controls. Respect reduced motion.
- Test open and closed labels on desktop and mobile.

## Verification

- Picker tests: 27 pass. Composer settings and new-task tests: 86 pass.
- UI typecheck and UI build passed before the final CSS-only
high-contrast fix.
- Token gates pass.
- Full typecheck and build stop at installed Runner API type mismatches
outside these files.
- Revised Chromium checks pass for desktop pointer drag, no input
outline during drag, stable open label, keyboard input, and mobile
rendering. The earlier rendered-image check confirmed reduced-motion
behavior.
- The earlier full local suite did not finish. The approved visual
revision passed 113 focused tests. The final high-contrast fix passed 27
picker tests and token gates.
- Chromium high-contrast and reduced-motion verification shows a visible
thumb focus marker and working keyboard input.
- Open the model picker. Change effort. Confirm “Select model” stays
visible. Close the picker. Confirm the selected model and effort appear.

- All CI gates pass on final head
`7a64104e14251a354b06b7916d09d44692557c4f`, including full typecheck,
tests, build, and browser E2E. Greptile: 5/5 with no findings.

## Risks

- Low risk: shared UI only. Native range controls stay in place.
- Browser thumb rendering can differ between engines.

## Model Used

- OpenAI GPT-6 Codex. Code editing, tool use, and test execution. The
runtime does not expose an exact model variant or context window size.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-10-07 21:52:19 +00:00

111 lines
4.2 KiB
CSS

.composer-run-effort-range {
display: block;
appearance: none;
height: var(--composer-effort-track-height);
border-radius: var(--radius-4xl);
background: linear-gradient(to right, var(--tc-mode-ask) var(--fill), var(--muted) var(--fill));
cursor: pointer;
/* Native input outlines cross the thumb because the input is track-height. */
outline: none;
}
.composer-run-effort-range::-webkit-slider-thumb {
appearance: none;
width: var(--composer-effort-thumb-size);
height: var(--composer-effort-thumb-size);
border: 0;
border-radius: 50%;
background: var(--tc-mode-ask);
box-shadow: var(--shadow-sm);
transition: transform var(--motion-duration-fast) var(--motion-ease-out), box-shadow var(--motion-duration-fast) var(--motion-ease-out);
}
.composer-run-effort-range::-moz-range-thumb {
width: var(--composer-effort-thumb-size);
height: var(--composer-effort-thumb-size);
border: 0;
border-radius: 50%;
background: var(--tc-mode-ask);
box-shadow: var(--shadow-sm);
transition: transform var(--motion-duration-fast) var(--motion-ease-out), box-shadow var(--motion-duration-fast) var(--motion-ease-out);
}
/* Keep native pointer and keyboard behavior; animate only the thumb feedback. */
.composer-run-effort-range:hover::-webkit-slider-thumb,
.composer-run-effort-range:focus-visible::-webkit-slider-thumb {
transform: scale(var(--composer-effort-hover-scale));
box-shadow: var(--shadow-sm), var(--composer-effort-halo);
}
.composer-run-effort-range:hover::-moz-range-thumb,
.composer-run-effort-range:focus-visible::-moz-range-thumb {
transform: scale(var(--composer-effort-hover-scale));
box-shadow: var(--shadow-sm), var(--composer-effort-halo);
}
.composer-run-effort-range:active::-webkit-slider-thumb { transform: scale(var(--composer-effort-press-scale)); }
.composer-run-effort-range:active::-moz-range-thumb { transform: scale(var(--composer-effort-press-scale)); }
.composer-run-settings-accent { color: var(--tc-mode-ask); }
.composer-run-settings-height { overflow: hidden; transition: height var(--motion-duration-base) var(--motion-ease-out); }
.composer-mobile-dialog {
top: max(calc(var(--spacing) * 4), env(safe-area-inset-top));
width: calc(100vw - var(--spacing) * 4);
max-width: calc(var(--spacing) * 96);
max-height: calc(
var(--mobile-entity-picker-visual-viewport-height)
- max(calc(var(--spacing) * 4), env(safe-area-inset-top))
- max(calc(var(--spacing) * 4), env(safe-area-inset-bottom))
);
animation: none;
}
/* Let the live viewport constrain the list; a measured animation height would
keep it clipped when the software keyboard opens or the picker view changes. */
.composer-mobile-dialog .composer-run-settings-height {
display: flex;
height: auto !important;
min-height: 0;
max-height: inherit;
}
.composer-mobile-dialog .composer-run-settings-height > div {
display: flex;
flex-direction: column;
min-height: 0;
width: 100%;
}
.composer-mobile-dialog .composer-run-settings-list-view {
display: flex;
min-height: 0;
width: 100%;
flex-direction: column;
}
.composer-mobile-dialog .composer-run-settings-list-view > :not([role="listbox"]) {
flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
.composer-run-settings-height { transition: none; }
.composer-run-effort-range::-webkit-slider-thumb,
.composer-run-effort-range:hover::-webkit-slider-thumb,
.composer-run-effort-range:focus-visible::-webkit-slider-thumb,
.composer-run-effort-range:active::-webkit-slider-thumb { transition: none; transform: none; }
.composer-run-effort-range::-moz-range-thumb,
.composer-run-effort-range:hover::-moz-range-thumb,
.composer-run-effort-range:focus-visible::-moz-range-thumb,
.composer-run-effort-range:active::-moz-range-thumb { transition: none; transform: none; }
}
/* Forced colors suppress shadows, so keep keyboard focus on the thumb. */
@media (forced-colors: active) {
.composer-run-effort-range:focus-visible::-webkit-slider-thumb {
outline: calc(var(--spacing) * 0.5) solid Highlight;
outline-offset: calc(var(--spacing) * 0.5);
}
.composer-run-effort-range:focus-visible::-moz-range-thumb {
outline: calc(var(--spacing) * 0.5) solid Highlight;
outline-offset: calc(var(--spacing) * 0.5);
}
}