feat: add file renaming functionality in ContextView

- Implemented a rename dialog for files, allowing users to rename selected context files.
- Added state management for the rename dialog and file name input.
- Enhanced file handling to check for existing names and update file paths accordingly.
- Updated UI to include a pencil icon for triggering the rename action on files.
- Improved user experience by ensuring the renamed file is selected after the operation.
This commit is contained in:
Cody Seibert
2025-12-16 22:36:22 -05:00
parent 4996a63bcc
commit 83fab5321e
5 changed files with 197 additions and 44 deletions

View File

@@ -328,8 +328,8 @@ export const KanbanCard = memo(function KanbanCard({
<TooltipTrigger asChild>
<div
className={cn(
"absolute px-2 rounded-md z-10",
"top-2 left-2",
"absolute px-2 py-1 text-sm font-bold rounded-md flex items-center justify-center z-10",
"top-2 left-2 min-w-[36px]",
feature.priority === 1 &&
"bg-red-500/20 text-red-500 border-2 border-red-500/50",
feature.priority === 2 &&
@@ -337,22 +337,9 @@ export const KanbanCard = memo(function KanbanCard({
feature.priority === 3 &&
"bg-blue-500/20 text-blue-500 border-2 border-blue-500/50"
)}
style={{ height: "28px" }}
data-testid={`priority-badge-${feature.id}`}
>
{Array.from({ length: 4 - feature.priority }).map((_, i) => (
<ChevronUp
key={i}
style={{
position: "absolute",
left: "50%",
transform: "translateX(-50%)",
top: `${2 + i * 3}px`,
width: "12px",
height: "12px",
}}
/>
))}
P{feature.priority}
</div>
</TooltipTrigger>
<TooltipContent side="right" className="text-xs">

View File

@@ -788,8 +788,14 @@ export function useBoardActions({
return;
}
// Sort by priority (lower number = higher priority, priority 1 is highest)
// This matches the auto mode service behavior for consistency
const sortedBacklog = [...backlogFeatures].sort(
(a, b) => (a.priority || 999) - (b.priority || 999)
);
// Start only one feature per keypress (user must press again for next)
const featuresToStart = backlogFeatures.slice(0, 1);
const featuresToStart = sortedBacklog.slice(0, 1);
for (const feature of featuresToStart) {
// Only create worktrees if the feature is enabled