- Notifications
You must be signed in to change notification settings - Fork1.1k
Commit3011207
authored
feat: add display name field for tasks (#20856)
## ProblemTasks currently only expose a machine-friendly name field (e.g.`task-python-debug-a1b2`), but this value is primarily an identifierrather than a clean, descriptive label. We need a separatedisplay-friendly name for use in the UI.This PR introduces a new `display_name` field and updates the task-namegeneration flow. The Claude system prompt was updated to return validJSON with both `name` and `display_name`. The name generation logicfollows a fallback chain (Anthropic > prompt sanitization > randomfallback). To make task names more closely resemble their display names,the legacy `task-` prefix has been removed. For context, PR#20834 introduced a small Task iconto the workspace list to help identify workspaces associated to tasks.## Changes- Database migration: Added `display_name` column to tasks table- Updated system prompt to generate both task name and display name asvalid JSON- Task name generation now follows a fallback chain: Anthropic > promptsanitization > random fallback- Removed `task-` prefix from task names to allow more descriptive names- Note: PR#20834 adds a Task icon toworkspaces in the workspace list to distinguish task-created workspaces**Note:** UI changes will be addressed in a follow-up PRRelated to:#208011 parente8bf074 commit3011207
File tree
23 files changed
+780
-124
lines changed- cli
- coderd
- apidoc
- database
- dbgen
- migrations
- queries
- taskname
- codersdk
- docs
- admin/security
- reference/api
- enterprise/audit
- site/src
- api
- testHelpers
23 files changed
+780
-124
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| |||
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
223 | | - | |
224 | | - | |
225 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
114 | | - | |
115 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
116 | 121 | | |
117 | | - | |
118 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
119 | 125 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| |||
215 | 220 | | |
216 | 221 | | |
217 | 222 | | |
| 223 | + | |
218 | 224 | | |
219 | 225 | | |
220 | 226 | | |
| |||
304 | 310 | | |
305 | 311 | | |
306 | 312 | | |
| 313 | + | |
307 | 314 | | |
308 | 315 | | |
309 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
1056 | 1058 | | |
1057 | 1059 | | |
1058 | | - | |
1059 | | - | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1060 | 1063 | | |
1061 | 1064 | | |
1062 | 1065 | | |
| |||
1066 | 1069 | | |
1067 | 1070 | | |
1068 | 1071 | | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
1069 | 1078 | | |
1070 | 1079 | | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
1071 | 1103 | | |
1072 | 1104 | | |
1073 | 1105 | | |
| |||
1098 | 1130 | | |
1099 | 1131 | | |
1100 | 1132 | | |
| 1133 | + | |
1101 | 1134 | | |
1102 | 1135 | | |
1103 | 1136 | | |
| |||
1111 | 1144 | | |
1112 | 1145 | | |
1113 | 1146 | | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
1114 | 1153 | | |
1115 | | - | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1116 | 1158 | | |
1117 | 1159 | | |
1118 | 1160 | | |
| |||
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
1582 | 1584 | | |
1583 | 1585 | | |
1584 | 1586 | | |
| 1587 | + | |
1585 | 1588 | | |
1586 | 1589 | | |
1587 | 1590 | | |
1588 | 1591 | | |
1589 | | - | |
| 1592 | + | |
| 1593 | + | |
1590 | 1594 | | |
1591 | 1595 | | |
1592 | 1596 | | |
| |||
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 87 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
0 commit comments
Comments
(0)