Skip to content

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

Update task name when creating new task. Also still provide some text if task name is empty in order to leave enough clickable area

天舟dbdf564c9eef
diff --git a/frontend/src/views/TaskDetail.vue b/frontend/src/views/TaskDetail.vue
index 0483e2e21d..1662144249 100644
--- a/frontend/src/views/TaskDetail.vue
+++ b/frontend/src/views/TaskDetail.vue
@@ -352,12 +352,16 @@ export default {
newName: string,
postUpdated: (updatedTask: Task) => void
) => {
- patchTask(
- {
- name: newName,
- },
- postUpdated
- );
+ if (state.new) {
+ (state.task as TaskNew).name = newName;
+ } else {
+ patchTask(
+ {
+ name: newName,
+ },
+ postUpdated
+ );
+ }
};
const updateDescription = (
diff --git a/frontend/src/views/TaskHighlightPanel.vue b/frontend/src/views/TaskHighlightPanel.vue
index 07f711da04..5dc1ffe29d 100644
--- a/frontend/src/views/TaskHighlightPanel.vue
+++ b/frontend/src/views/TaskHighlightPanel.vue
@@ -28,7 +28,9 @@
class="ml-2 mt-3 mb-2.5 w-full text-lg font-bold leading-7 whitespace-nowrap truncate"
:class="task.status == 'OPEN' ? 'text-main' : 'text-control-light'"
>
- <span @click.prevent="clickName">{{ state.name }}</span>
+ <span @click.prevent="clickName">{{
+ state.name ? state.name : "Task name"
+ }}</span>
</p>
</div>
<div v-if="!$props.new">