Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Update task description when creating the task

天舟31f3add93c53
diff --git a/frontend/src/views/TaskDescription.vue b/frontend/src/views/TaskDescription.vue
index ce10cfa445..82c0b197cb 100644
--- a/frontend/src/views/TaskDescription.vue
+++ b/frontend/src/views/TaskDescription.vue
@@ -52,6 +52,10 @@
@input="
(e) => {
sizeToFit(e.target);
+ // When creating the task, we will emit the event on keystroke to update the in-memory state.
+ if ($props.new) {
+ $emit('update-description', state.editDescription);
+ }
}
"
@focus="
diff --git a/frontend/src/views/TaskDetail.vue b/frontend/src/views/TaskDetail.vue
index 1662144249..06e1cd9a32 100644
--- a/frontend/src/views/TaskDetail.vue
+++ b/frontend/src/views/TaskDetail.vue
@@ -368,12 +368,16 @@ export default {
newDescription: string,
postUpdated: (updatedTask: Task) => void
) => {
- patchTask(
- {
- description: newDescription,
- },
- postUpdated
- );
+ if (state.new) {
+ (state.task as TaskNew).description = newDescription;
+ } else {
+ patchTask(
+ {
+ description: newDescription,
+ },
+ postUpdated
+ );
+ }
};
const tryStartTaskStatusTransition = (