Commit 0f27c4c
fix: clarify Discord self-assignment failures (#26)
* Move Discord issue buttons onto host-side issue updates
The reopen and assign buttons patched issues over unauthenticated HTTP, which failed against authenticated Paperclip deployments. This change resolves the issue's company through the host clients and performs the mutation with ctx.issues.update, while declaring the required issues.update capability in the manifest.
Constraint: Authenticated Paperclip issue update routes reject anonymous PATCH requests
Rejected: Keep HTTP PATCH and inject board credentials | fragile and duplicates host authorization rules
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Button handlers should use SDK host mutations for issue state changes; avoid raw Paperclip PATCH calls
Tested: npm test; npm run typecheck
Not-tested: Live assign/reopen button behavior for mapped and unmapped Discord users after merge
* Clarify Discord self-assignment failures before users hit backend errors
The live smoke test showed that the assign button now reaches Paperclip correctly,
but the Discord UX still surfaces raw backend errors like `Assignee user not found`
and `Issue can only have one assignee`. Pre-checking assignment state and
translating the unmapped-user failure makes the Discord path understandable.
Constraint: Discord users may not exist as Paperclip board users, so self-assignment cannot always succeed
Rejected: Silently swallow assign failures | hides actionable identity/config problems
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep Discord-side button feedback specific and actionable when backend policy blocks assignment
Tested: Local typecheck; local build; button regression tests
Not-tested: Live redeploy on the Paperclip instance
---------
Co-authored-by: Kfir <suukpehoy@gmail.com>1 parent 099b88e commit 0f27c4c
3 files changed
Lines changed: 106 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
1301 | | - | |
| 1289 | + | |
| 1290 | + | |
1302 | 1291 | | |
1303 | 1292 | | |
1304 | 1293 | | |
| |||
1322 | 1311 | | |
1323 | 1312 | | |
1324 | 1313 | | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
1330 | 1325 | | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | 1326 | | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
1338 | 1333 | | |
1339 | 1334 | | |
1340 | | - | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
1341 | 1340 | | |
1342 | 1341 | | |
1343 | 1342 | | |
| |||
1497 | 1496 | | |
1498 | 1497 | | |
1499 | 1498 | | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
1500 | 1511 | | |
1501 | 1512 | | |
1502 | 1513 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
1101 | 1103 | | |
1102 | 1104 | | |
1103 | 1105 | | |
1104 | | - | |
1105 | 1106 | | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
1106 | 1110 | | |
1107 | 1111 | | |
1108 | 1112 | | |
| |||
1114 | 1118 | | |
1115 | 1119 | | |
1116 | 1120 | | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
| 1121 | + | |
1121 | 1122 | | |
1122 | 1123 | | |
1123 | 1124 | | |
| |||
1126 | 1127 | | |
1127 | 1128 | | |
1128 | 1129 | | |
1129 | | - | |
1130 | 1130 | | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
1131 | 1134 | | |
1132 | 1135 | | |
1133 | 1136 | | |
| |||
1144 | 1147 | | |
1145 | 1148 | | |
1146 | 1149 | | |
1147 | | - | |
1148 | | - | |
| 1150 | + | |
1149 | 1151 | | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
1150 | 1155 | | |
1151 | 1156 | | |
1152 | 1157 | | |
| |||
1157 | 1162 | | |
1158 | 1163 | | |
1159 | 1164 | | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
| 1165 | + | |
1163 | 1166 | | |
1164 | 1167 | | |
1165 | 1168 | | |
1166 | 1169 | | |
1167 | | - | |
1168 | | - | |
| 1170 | + | |
1169 | 1171 | | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1170 | 1175 | | |
1171 | 1176 | | |
1172 | 1177 | | |
| |||
1177 | 1182 | | |
1178 | 1183 | | |
1179 | 1184 | | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
| 1185 | + | |
1184 | 1186 | | |
1185 | 1187 | | |
1186 | 1188 | | |
1187 | 1189 | | |
1188 | 1190 | | |
1189 | | - | |
1190 | | - | |
| 1191 | + | |
1191 | 1192 | | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1192 | 1196 | | |
1193 | 1197 | | |
1194 | 1198 | | |
| |||
1204 | 1208 | | |
1205 | 1209 | | |
1206 | 1210 | | |
1207 | | - | |
1208 | | - | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
1209 | 1253 | | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
1210 | 1257 | | |
1211 | 1258 | | |
1212 | 1259 | | |
| |||
1217 | 1264 | | |
1218 | 1265 | | |
1219 | 1266 | | |
1220 | | - | |
1221 | | - | |
| 1267 | + | |
1222 | 1268 | | |
1223 | 1269 | | |
1224 | 1270 | | |
| |||
0 commit comments