mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-02 10:44:52 +01:00
## Thinking Path > - Paperclip helps people manage agents. > - Each agent can use a managed provider account. > - People can connect that account during onboarding or from agent settings. > - The two screens used different sign-in controls. > - This change brings the wizard controls to the account dialog and groups other providers in a grid. ## Linked Issues or Issue Description **Subsystem affected** Agent settings and managed AI connections. **Current behavior** The account dialog uses different controls from onboarding and displays other providers in separate lists. **Proposed behavior** Show provider sign-in, code entry, expiry, and retry inside the credential panel. Show other providers in a compact grid. ## What Changed - Share the provider marks and sign-in controls with onboarding. - Keep the account fields visible while sign-in prepares. - Crossfade between the account form and provider grid. Keep the modal width stable. ## Verification - All 29 tests in AdapterLoginChrome and AgentProviderConnection passed. - The UI TypeScript check passed. - To check the layout, open Connect account from agent settings, choose Other Models, then return to the provider form. ## Risks - The dialog shares controls with onboarding. Changes to their defaults could affect both entry points. - Subscription sign-in depends on the selected execution environment. ## Model Used OpenAI GPT-6 through Codex, with local editing and test execution. ## 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) - [ ] 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 - [ ] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [ ] I will address all Greptile and reviewer comments before requesting merge
56 lines
4.0 KiB
TypeScript
56 lines
4.0 KiB
TypeScript
import type { ComponentType } from "react";
|
|
|
|
/**
|
|
* Full-colour brand marks for the sources this step offers.
|
|
*
|
|
* The registry's own icons are monochrome, drawn to sit in dense config UI
|
|
* where a row of saturated logos would be noise. This step is the opposite
|
|
* case: two large tiles carrying the whole choice, where the brand is the
|
|
* fastest thing to recognise.
|
|
*
|
|
* Keyed by adapter type with a fallback, so the row stays registry-driven. An
|
|
* adapter with no brand file here still renders — with its registry icon —
|
|
* rather than a gap where a tile should be.
|
|
*/
|
|
const MODEL_SOURCE_BRAND_MARKS: Record<string, string> = {
|
|
claude_local: "/brands/claude-color.svg",
|
|
};
|
|
|
|
|
|
/**
|
|
* OpenAI's blossom, inline rather than served from `/brands`.
|
|
*
|
|
* The supplied asset is a white fill, which was fine while this row only ever
|
|
* sat on a dark tile. It follows the reader's system setting now, and white on
|
|
* the light tile is invisible. Inlining lets the path take
|
|
* `currentColor` and be legible in both, which an `<img>` cannot do.
|
|
*/
|
|
function OpenAiBlossom({ className }: { className?: string }) {
|
|
return (
|
|
<svg viewBox="114 114 488 488" className={className} fill="none" aria-hidden>
|
|
<path
|
|
fill="currentColor"
|
|
d="M508.749 317.399C516.777 287.314 508.991 253.884 485.389 230.282C461.788 206.681 428.36 198.895 398.273 206.923C376.231 184.928 343.39 174.956 311.148 183.596C278.906 192.234 255.45 217.292 247.36 247.361C217.291 255.451 192.233 278.91 183.595 311.149C174.957 343.391 184.927 376.232 206.924 398.274C198.896 428.359 206.683 461.789 230.284 485.391C253.885 508.992 287.313 516.779 317.401 508.75C339.442 530.745 372.286 540.717 404.525 532.079C436.767 523.441 460.223 498.384 468.313 468.315C498.383 460.224 523.44 436.766 532.078 404.526C540.716 372.285 530.747 339.443 508.749 317.402V317.399ZM470.899 244.776C486.892 260.77 493.488 282.601 490.687 303.412L415.577 260.046C412.411 258.218 408.509 258.218 405.345 260.046L317.401 310.82V277.526C317.401 275.191 318.652 273.005 320.676 271.837L387.644 233.174C414.178 218.353 448.346 222.223 470.901 244.776H470.899ZM357.837 311.144L398.275 334.491V381.185L357.837 404.532L317.398 381.185V334.491L357.837 311.144ZM264.776 269.693C265.207 239.305 285.644 211.649 316.453 203.393C338.3 197.54 360.505 202.744 377.127 215.573L302.014 258.937C298.848 260.764 296.898 264.144 296.898 267.798V369.346L268.065 352.699C266.043 351.531 264.776 349.353 264.776 347.017V269.691V269.693ZM203.391 316.454C209.244 294.608 224.854 277.978 244.276 269.999V356.73C244.276 360.384 246.226 363.763 249.392 365.591L337.337 416.365L308.503 433.013C306.481 434.181 303.961 434.188 301.939 433.02L234.971 394.357C208.868 378.789 195.138 347.261 203.391 316.454ZM244.775 470.9C228.781 454.906 222.186 433.075 224.986 412.264L300.096 455.63C303.263 457.457 307.164 457.457 310.328 455.63L398.273 404.856V438.149C398.273 440.485 397.022 442.671 394.997 443.839L328.029 482.502C301.495 497.322 267.327 493.452 244.772 470.9H244.775ZM450.897 445.982C450.466 476.371 430.029 504.027 399.22 512.283C377.373 518.136 355.168 512.932 338.547 500.102L413.659 456.738C416.826 454.911 418.775 451.532 418.775 447.877V346.329L447.609 362.977C449.631 364.145 450.897 366.323 450.897 368.659V445.985V445.982ZM512.282 399.221C506.429 421.068 490.819 437.697 471.397 445.676V358.946C471.397 355.292 469.448 351.912 466.281 350.085L378.336 299.311L407.17 282.663C409.192 281.495 411.712 281.487 413.734 282.655L480.702 321.318C506.805 336.887 520.536 368.415 512.282 399.221Z"
|
|
/>
|
|
</svg>
|
|
);
|
|
}
|
|
|
|
const MODEL_SOURCE_INLINE_MARKS: Record<string, ComponentType<{ className?: string }>> = {
|
|
codex_local: OpenAiBlossom,
|
|
};
|
|
|
|
export function ModelSourceMark({
|
|
type,
|
|
Fallback,
|
|
}: {
|
|
type: string;
|
|
Fallback: ComponentType<{ className?: string }>;
|
|
}) {
|
|
const Inline = MODEL_SOURCE_INLINE_MARKS[type];
|
|
if (Inline) return <Inline className="size-full" />;
|
|
const brand = MODEL_SOURCE_BRAND_MARKS[type];
|
|
if (!brand) return <Fallback className="size-full" />;
|
|
return <img src={brand} alt="" className="size-full" />;
|
|
}
|