Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

feat(create-issue): add border beam to switch-to-agent button (#2157)

Jiayuan Zhangc3ddb57b82e8
diff --git a/packages/ui/styles/base.css b/packages/ui/styles/base.css
index c7f9a51a07..2f92fa4730 100644
--- a/packages/ui/styles/base.css
+++ b/packages/ui/styles/base.css
@@ -114,6 +114,69 @@
animation: chat-text-shimmer 2.5s linear infinite;
}
+/* Border beam: a brand-tinted highlight sweeps continuously around the
+ * element's rounded border, drawing the eye to a CTA that would otherwise
+ * blend into the chrome (e.g. the "switch to agent" affordance in manual
+ * create). Built with a conic-gradient on a ::before whose mask carves out a
+ * 1px ring; an animated @property angle drives the rotation so only the
+ * gradient repaints, not layout. The ring respects `border-radius: inherit`,
+ * so any rounded host picks up the right curvature for free. Pair with a
+ * subtle background tint on the host so the highlight has something to ride
+ * on at low contrast. */
+@property --border-beam-angle {
+ syntax: "<angle>";
+ initial-value: 0deg;
+ inherits: false;
+}
+
+@keyframes border-beam-rotate {
+ to { --border-beam-angle: 360deg; }
+}
+
+.border-beam {
+ position: relative;
+}
+
+.border-beam::before {
+ content: "";
+ position: absolute;
+ inset: 0;
+ border-radius: inherit;
+ padding: 1px;
+ background: conic-gradient(
+ from var(--border-beam-angle),
+ transparent 0deg,
+ transparent 220deg,
+ #ffbe7b 245deg,
+ #ff777f 270deg,
+ #ff8ab4 295deg,
+ #a07cfe 320deg,
+ #5b9dff 345deg,
+ transparent 360deg
+ );
+ -webkit-mask:
+ linear-gradient(#000 0 0) content-box,
+ linear-gradient(#000 0 0);
+ -webkit-mask-composite: xor;
+ mask-composite: exclude;
+ animation: border-beam-rotate 3.2s linear infinite;
+ pointer-events: none;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .border-beam::before {
+ animation: none;
+ background: linear-gradient(
+ 90deg,
+ #ffbe7b,
+ #ff777f,
+ #ff8ab4,
+ #a07cfe,
+ #5b9dff
+ );
+ }
+}
+
/* Sidebar: open triggers (dropdown/popover) get active background */
[data-sidebar="menu-button"][data-popup-open] {
background-color: var(--sidebar-accent);
diff --git a/packages/views/modals/create-issue.tsx b/packages/views/modals/create-issue.tsx
index 3f252e07bc..f2ca1b5a94 100644
--- a/packages/views/modals/create-issue.tsx
+++ b/packages/views/modals/create-issue.tsx
@@ -546,9 +546,9 @@ export function ManualCreatePanel({
type="button"
onClick={switchToAgent}
title={t(($) => $.create_issue.switch_to_agent_tooltip)}
- className="flex shrink-0 items-center gap-1.5 text-xs px-2 py-1 rounded-sm text-muted-foreground hover:text-foreground hover:bg-accent/60 transition-colors cursor-pointer"
+ className="border-beam group flex shrink-0 items-center gap-1.5 text-xs px-2 py-1 rounded-sm text-muted-foreground bg-brand/5 hover:bg-brand/10 hover:text-foreground transition-colors cursor-pointer"
>
- <ArrowLeftRight className="size-3.5" />
+ <ArrowLeftRight className="size-3.5 text-brand/80 transition-transform duration-300 group-hover:rotate-180" />
{t(($) => $.create_issue.switch_to_agent)}
</button>
<label className="flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground cursor-pointer select-none">