Add inline editing for todo list titles with hover pencil icon #270255
+176
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds the ability to edit todo list titles inline with a hover icon, making it easier for users to update their tasks directly from the chat interface.
Changes
User Experience
When hovering over a todo item, a pencil icon now appears next to the title. Clicking this icon enables inline editing:
Enter
or clicking outsideEscape
Implementation Details
TypeScript Changes (
chatTodoListWidget.ts
).todo-title-container
wrapper to hold both the title and edit buttoncodicon-pencil
) that appears on hoverstartEditingTitle()
method usingcontenteditable
for inline editingEnter
to save,Escape
to cancel) and blur event for auto-saveCSS Changes (
chat.css
).todo-title-container
with flexbox layout.todo-edit-button
with opacity transition (hidden by default, visible on hover).editing
state styling with focus outline and background changesTest Coverage (
chatTodoListWidget.test.ts
)Accessibility
role="button"
,aria-label="Edit title"
)Design Decisions
Testing
Files Modified
src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.ts
(+97 lines)src/vs/workbench/contrib/chat/browser/media/chat.css
(+52 lines)src/vs/workbench/contrib/chat/test/browser/chatTodoListWidget.test.ts
(+28 lines)Total: 177 lines added across 3 files
Original prompt
Do it
[Chronological Review: The conversation began with the user requesting to follow instructions in a specific prompt file to make To Do List titles editable with a hover icon for inline editing. The user clarified that they wanted only hover functionality without constraints or undo options. The user repeated the request to "do it" multiple times, indicating urgency and a desire for action. The conversation has been focused on implementing a specific feature in the user's project.][Intent Mapping:
[Technical Inventory:
[Code Archaeology: No specific code files or functions have been discussed or modified yet, as the conversation has been focused on feature requests rather than code implementation.]
[Progress Assessment: User has clearly defined the feature they want to implement, but no implementation has been completed yet. The conversation is still in the request phase.]
[Context Validation: All necessary context for continuing the work is captured, including user requests and specifications for the feature.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: User requested to implement editable To Do List titles with hover functionality, stating, "Follow instructions in [plan-deep.prompt.md]. Make To Do List titles editable. Maybe with a hover icon with pencil and using the inline editing that VS code already has." - Session Context: The conversation has focused on defining and clarifying the feature requirements for the To Do List titles. - User Intent Evolution: The user has consistently emphasized the need for hover functionality without additional constraints or undo options.- Technical Foundation:
- [Core Technology]: VS Code (specific version not mentioned).
- [Feature Requirement]: Editable To Do List titles with hover functionality.
- Codebase Status:
- Purpose: Contains instructions for implementing the requested feature.
- Current State: No modifications have been made yet as the conversation is still in the planning phase.
- Problem Resolution:
- Issues Encountered: No technical problems have been identified yet.
- Solutions Implemented: No solutions have been implemented as the feature request is still pending.
- Debugging Context: No ongoing troubleshooting efforts have been mentioned.
- Lessons Learned: User has a clear vision of the desired functionality.
- Progress Tracking:
- Completed Tasks: None yet; the feature has not been implemented.
- Partially Complete Work: User has defined the feature requirements but no coding has begun.
- Validated Outcomes: None; the feature is still in the request phase.
- Active Work State:
- Current Focus: Implementing hover functionality for editable To Do List titles.
- Recent Context: User has repeatedly requested to "do it," indicating urgency.
- Working Code: No specific code snippets have been discussed yet.
- Immediate Context: User is awaiting action on the hover functionality request.
- Recent Operations:
- Last Agent Commands: User requested to implement hover functionality for editable titles.
- Tool Results Summary: No specific tool results have been returned as implementation has not yet occurred.
- Pre-Summary State: The agent was preparing to implement the hover functionality when the token budget was exceeded.
- Operation Context: The commands were executed to fulfill the user's goal of enhancing the To Do List feature.
- Continuation Plan:
- [Pending Task 1]: Implement hover functionality for editable To Do List titles as specified by the user.
- [Pending Task 2]: Ensure that the implementation adheres to the user's request for no constraints or undo options.
- [Priority Information]: The implementation of the hover feature is the most urgent task.
- [Next Action]: Immediate next step is to begin coding the hover functionality for editable titles based on the user's specifications.
</...
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.