Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/tidy-worktree-finish.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"kilo-code": patch
---

Show a filled checkbox and crossed-out title, then collapse the worktree card only after successful deletion. Respect reduced motion and require the explicit Delete? button to confirm deletion instead of a card click.
Check off deleted worktrees like a todo item: the checkbox springs in, the title is crossed out from left to right, and the card is swept away in under half a second, only after successful deletion. Respect reduced motion and require the explicit Delete? button to confirm deletion instead of a card click.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ export const WorktreeItem: Component<WorktreeItemProps> = (props) => {
}}
title={t("agentManager.worktree.doubleClickRename")}
>
{props.label}
{/* Inner span keeps the finish strikethrough tight to the text. */}
<span class="am-wt-name">{props.label}</span>
</span>
}
>
Expand Down
139 changes: 127 additions & 12 deletions packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css
Original file line number Diff line number Diff line change
Expand Up @@ -734,19 +734,39 @@ html[data-theme="kilo-vscode"]
min-width: 0;
}

/*
* Check-off feel, in one pass: the row tints, the box springs in, the check draws,
* the title is struck through, then the row is swept out. Hold is short so a click
* still feels instant; every step is transform, opacity, or a single small repaint.
*/
.am-worktree-completed {
--am-finish-color: var(--icon-success-base, var(--vscode-testing-iconPassed, #73c991));
/* Monochrome on purpose: deletion borrows the list's own greys, never an accent hue. */
--am-finish-mark: var(--text-weak, var(--vscode-descriptionForeground));
--am-finish-line: var(--text-weaker, var(--vscode-disabledForeground));
--am-finish-tint: var(--surface-base-hover, var(--vscode-list-hoverBackground));
--am-finish-hold: 220ms;
--am-finish-collapse: 200ms;
pointer-events: none;
animation: am-worktree-collapse 1000ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
animation: am-worktree-collapse var(--am-finish-collapse) cubic-bezier(0.3, 0, 0.2, 1) var(--am-finish-hold) forwards;
}

.am-worktree-completed .am-worktree-exit-content {
overflow: hidden;
animation: am-worktree-sweep var(--am-finish-collapse) cubic-bezier(0.3, 0, 0.2, 1) var(--am-finish-hold) forwards;
}

.am-worktree-completed .am-worktree-branch {
text-decoration: line-through;
text-decoration-color: var(--am-finish-color);
.am-worktree-completed .am-worktree-item {
animation: am-worktree-finish-tint 420ms ease-out;
}

/* Struck through by growing the line from the left, so the title reads as checked off. */
.am-worktree-completed .am-wt-name {
background-image: linear-gradient(var(--am-finish-line), var(--am-finish-line));
background-repeat: no-repeat;
background-position: 0 calc(50% - 1px);
background-size: 100% 1px;
color: var(--text-weaker);
animation: am-worktree-strike 180ms cubic-bezier(0.22, 0.9, 0.24, 1) 20ms both;
}

.am-worktree-completed .am-wt-hover-actions {
Expand All @@ -756,15 +776,35 @@ html[data-theme="kilo-vscode"]
}

.am-worktree-finish-box {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
background: var(--am-finish-color);
background: var(--am-finish-mark);
width: 12px;
height: 12px;
border: 1px solid var(--am-finish-color);
border: 1px solid var(--am-finish-mark);
border-radius: 3px;
color: var(--surface-base, var(--vscode-editor-background));
/* Spring the scale, but land the opacity fast so the click reads immediately. */
animation:
am-worktree-check-pop 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
am-worktree-check-fade 90ms ease-out;
}

.am-worktree-finish-box::after {
content: "";
position: absolute;
inset: -2px;
border: 1px solid var(--am-finish-line);
border-radius: 50%;
opacity: 0;
animation: am-worktree-check-ring 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.am-worktree-finish-box [data-component="icon"] path {
Comment thread
marius-kilocode marked this conversation as resolved.
Resolved
stroke-dasharray: 12;
animation: am-worktree-check-draw 150ms cubic-bezier(0.4, 0, 0.3, 1) 40ms both;
}

.am-worktree-completion-status {
Expand All @@ -776,21 +816,96 @@ html[data-theme="kilo-vscode"]
}

@keyframes am-worktree-collapse {
0%,
60% {
from {
grid-template-rows: 1fr;
opacity: 1;
}
100% {
to {
grid-template-rows: 0fr;
}
}

@keyframes am-worktree-sweep {
from {
transform: translateX(0);
opacity: 1;
}
to {
transform: translateX(10px);
opacity: 0;
}
}

@keyframes am-worktree-finish-tint {
from {
background: color-mix(in srgb, var(--am-finish-tint) 100%, transparent);
}
to {
background: color-mix(in srgb, var(--am-finish-tint) 0%, transparent);
}
}

@keyframes am-worktree-strike {
from {
background-size: 0 1px;
color: var(--text-base);
}
to {
background-size: 100% 1px;
color: var(--text-weaker);
}
}

@keyframes am-worktree-check-pop {
from {
transform: scale(0.3);
}
to {
transform: scale(1);
}
}

@keyframes am-worktree-check-fade {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

@keyframes am-worktree-check-ring {
from {
transform: scale(0.6);
opacity: 0.5;
}
to {
transform: scale(2.1);
opacity: 0;
}
}

@keyframes am-worktree-check-draw {
from {
stroke-dashoffset: 12;
}
to {
stroke-dashoffset: 0;
}
}

@media (prefers-reduced-motion: reduce) {
.am-worktree-completed {
animation-duration: 1ms;
animation-delay: 600ms;
animation-delay: 260ms;
}

.am-worktree-completed .am-worktree-exit-content,
.am-worktree-completed .am-worktree-item,
.am-worktree-completed .am-wt-name,
.am-worktree-finish-box,
.am-worktree-finish-box::after,
.am-worktree-finish-box [data-component="icon"] path {
animation: none;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function createWorktreeCompletion(
// Fallback for hidden webviews or interrupted CSS animations.
timers.set(
worktree.id,
setTimeout(() => release(worktree.id), 1400),
setTimeout(() => release(worktree.id), 900),
)
}),
)
Expand Down
Loading